summaryrefslogtreecommitdiff
path: root/compiler/optimizing/induction_var_range.cc
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2018-03-05 17:53:15 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-03-05 17:53:15 +0000
commit4927ba0f5011b7394e52dca2c3cec52f265f8529 (patch)
tree9214177a5617f2024dcf2b75b016e2b5c063d3c6 /compiler/optimizing/induction_var_range.cc
parent7664e3473747565d438afb19f1cf7edb5a57e5e9 (diff)
parent3dad341ed027b760d9b4ee402cb2c93ac484a07a (diff)
Merge "Introduce ABS as HIR nodes."
Diffstat (limited to 'compiler/optimizing/induction_var_range.cc')
-rw-r--r--compiler/optimizing/induction_var_range.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/optimizing/induction_var_range.cc b/compiler/optimizing/induction_var_range.cc
index 99dec11240..d699d01ecb 100644
--- a/compiler/optimizing/induction_var_range.cc
+++ b/compiler/optimizing/induction_var_range.cc
@@ -85,15 +85,14 @@ static bool IsGEZero(HInstruction* instruction) {
// Instruction MIN(>=0, >=0) is >= 0.
return IsGEZero(instruction->InputAt(0)) &&
IsGEZero(instruction->InputAt(1));
- case Intrinsics::kMathAbsInt:
- case Intrinsics::kMathAbsLong:
- // Instruction ABS(>=0) is >= 0.
- // NOTE: ABS(minint) = minint prevents assuming
- // >= 0 without looking at the argument.
- return IsGEZero(instruction->InputAt(0));
default:
break;
}
+ } else if (instruction->IsAbs()) {
+ // Instruction ABS(>=0) is >= 0.
+ // NOTE: ABS(minint) = minint prevents assuming
+ // >= 0 without looking at the argument.
+ return IsGEZero(instruction->InputAt(0));
}
int64_t value = -1;
return IsInt64AndGet(instruction, &value) && value >= 0;