diff options
author | 2020-10-06 12:57:45 +0000 | |
---|---|---|
committer | 2020-10-06 15:54:28 +0000 | |
commit | 8ecbc4e844fc3b73e6a5c5151eda914d53297180 (patch) | |
tree | 702ce0e2469b46bb63440d7b6ddb6a9e8b1637c2 /compiler/optimizing/bounds_check_elimination.cc | |
parent | cbbc8df2264e8ce0528e7b7bfe43e430e5bb3e81 (diff) |
Fix compiler crash in BCE.
Remove a bogus call to HInstruction::AsConstant() that
causes a crash if the instruction is not a constant.
Test: New test in 449-checker-bce-rem
Test: testrunner.py --host --optimizing -t 449-checker-bce-rem
Bug: 169669115
Change-Id: I7f962441b652538b2d1cc4238eb9ab66abc1286c
Diffstat (limited to 'compiler/optimizing/bounds_check_elimination.cc')
-rw-r--r-- | compiler/optimizing/bounds_check_elimination.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/bounds_check_elimination.cc b/compiler/optimizing/bounds_check_elimination.cc index 6f67662fe4..a8149f9163 100644 --- a/compiler/optimizing/bounds_check_elimination.cc +++ b/compiler/optimizing/bounds_check_elimination.cc @@ -1072,7 +1072,7 @@ class BCEVisitor : public HGraphVisitor { const_divisor = (1LL << n) - 1; } - if (div == nullptr || !IsInt64Value(div->GetRight()->AsConstant(), const_divisor) || + if (div == nullptr || !IsInt64Value(div->GetRight(), const_divisor) || div->GetLeft() != instruction->GetLeft()) { return false; } |