Optimizing: Fix valgrind error in image_test64.
Bug: 27651442
Change-Id: Id9b80c6015dbc3b82966766ca4ad010be770f116
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc
index 69dad69..8daa46c 100644
--- a/compiler/optimizing/instruction_simplifier.cc
+++ b/compiler/optimizing/instruction_simplifier.cc
@@ -469,7 +469,9 @@
return;
}
- bool outcome;
+ // Note: The `outcome` is initialized to please valgrind - the compiler can reorder
+ // the return value check with the `outcome` check, b/27651442 .
+ bool outcome = false;
if (TypeCheckHasKnownOutcome(load_class, object, &outcome)) {
if (outcome) {
check_cast->GetBlock()->RemoveInstruction(check_cast);