summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-03-22 13:55:17 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-03-22 13:55:17 +0000
commit0339bee5b1be39669606c4ba57edd42a0bacf0ff (patch)
tree79e8775da8121ff32327da6d1e732ca0264eaf24
parent1aafce4bb4b158349dcac1166aa049960461a686 (diff)
parent0e2f2ff383ecc08aabb83c62670324ee2ca28bc1 (diff)
Merge "Optimizing: Fix a new valgrind error in image_test."
-rw-r--r--compiler/optimizing/induction_var_analysis.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/optimizing/induction_var_analysis.cc b/compiler/optimizing/induction_var_analysis.cc
index 8d24e26dda..266cb10ab3 100644
--- a/compiler/optimizing/induction_var_analysis.cc
+++ b/compiler/optimizing/induction_var_analysis.cc
@@ -789,7 +789,9 @@ bool HInductionVarAnalysis::FitsNarrowerControl(InductionInfo* lower_expr,
min++;
}
// Do both bounds fit the range?
- int64_t value;
+ // Note: The `value` is initialized to please valgrind - the compiler can reorder
+ // the return value check with the `value` check, b/27651442 .
+ int64_t value = 0;
return IsAtLeast(lower_expr, &value) && value >= min &&
IsAtMost(lower_expr, &value) && value <= max &&
IsAtLeast(upper_expr, &value) && value >= min &&