diff options
author | 2018-04-18 17:27:43 +0000 | |
---|---|---|
committer | 2018-04-18 17:27:43 +0000 | |
commit | 740a50992ea1a200068eb4486a172a151c9b329c (patch) | |
tree | 398d9bbd027743a233034d4977821c0275a918e7 /compiler/optimizing/loop_optimization.cc | |
parent | 63fe8dc454298852ae31cfc2692108488a58c650 (diff) | |
parent | 6d05700c620d2bca95fd046969753f71aa015ab4 (diff) |
Merge "Run GVN earlier."
Diffstat (limited to 'compiler/optimizing/loop_optimization.cc')
-rw-r--r-- | compiler/optimizing/loop_optimization.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc index c0c721de63..1462404932 100644 --- a/compiler/optimizing/loop_optimization.cc +++ b/compiler/optimizing/loop_optimization.cc @@ -1353,6 +1353,11 @@ bool HLoopOptimization::VectorizeDef(LoopNode* node, HInstruction* index = instruction->InputAt(1); HInstruction* value = instruction->InputAt(2); HInstruction* offset = nullptr; + // For narrow types, explicit type conversion may have been + // optimized way, so set the no hi bits restriction here. + if (DataType::Size(type) <= 2) { + restrictions |= kNoHiBits; + } if (TrySetVectorType(type, &restrictions) && node->loop_info->IsDefinedOutOfTheLoop(base) && induction_range_.IsUnitStride(instruction, index, graph_, &offset) && |