From 7adb688fe1213c6dcaf4d2adae3d8b7decf7c28a Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Tue, 7 Mar 2017 13:28:51 -0800 Subject: Improve isunit computation, some tests edits needed for SIMD. Rationale: Break-out CL of ART Vectorizer: number 4. The purpose is making the original CL smaller and easier to review. Bug: 34083438 Test: test-art-host Change-Id: I62a174944bbbe1e08f631f322c513eeaea14de26 --- compiler/optimizing/induction_var_range.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/induction_var_range.cc') diff --git a/compiler/optimizing/induction_var_range.cc b/compiler/optimizing/induction_var_range.cc index 3dfe17647c..d6513c8e34 100644 --- a/compiler/optimizing/induction_var_range.cc +++ b/compiler/optimizing/induction_var_range.cc @@ -390,7 +390,8 @@ bool InductionVarRange::IsUnitStride(HInstruction* instruction, HInductionVarAnalysis::InductionInfo* trip = nullptr; if (HasInductionInfo(instruction, instruction, &loop, &info, &trip)) { if (info->induction_class == HInductionVarAnalysis::kLinear && - info->op_b->operation == HInductionVarAnalysis::kFetch) { + info->op_b->operation == HInductionVarAnalysis::kFetch && + !HInductionVarAnalysis::IsNarrowingLinear(info)) { int64_t stride_value = 0; if (IsConstant(info->op_a, kExact, &stride_value) && stride_value == 1) { int64_t off_value = 0; -- cgit v1.2.3-59-g8ed1b