diff options
Diffstat (limited to 'compiler/optimizing/bounds_check_elimination.cc')
-rw-r--r-- | compiler/optimizing/bounds_check_elimination.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/optimizing/bounds_check_elimination.cc b/compiler/optimizing/bounds_check_elimination.cc index 9d5e3fdca1..97b3725da1 100644 --- a/compiler/optimizing/bounds_check_elimination.cc +++ b/compiler/optimizing/bounds_check_elimination.cc @@ -335,12 +335,12 @@ class ArrayAccessInsideLoopFinder : public ValueObject { continue; } - DCHECK(!length_value->IsPhi()); if (length_value->IsPhi()) { - // Outer loop shouldn't collect bounds checks inside inner - // loop because the inner loop body doen't dominate - // outer loop's back edges. However just to be on the safe side, - // if there are any such cases, we just skip over them. + // When adding deoptimizations in outer loops, we might create + // a phi for the array length, and update all uses of the + // length in the loop to that phi. Therefore, inner loops having + // bounds checks on the same array will use that phi. + // TODO: handle these cases. continue; } |