diff options
Diffstat (limited to 'compiler/optimizing/loop_optimization.cc')
-rw-r--r-- | compiler/optimizing/loop_optimization.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc index 6337361712..4710b32e9c 100644 --- a/compiler/optimizing/loop_optimization.cc +++ b/compiler/optimizing/loop_optimization.cc @@ -623,6 +623,12 @@ bool HLoopOptimization::VectorizeUse(LoopNode* node, } return true; } else if (instruction->IsArrayGet()) { + // Strings are different, with a different offset to the actual data + // and some compressed to save memory. For now, all cases are rejected + // to avoid the complexity. + if (instruction->AsArrayGet()->IsStringCharAt()) { + return false; + } // Accept a right-hand-side array base[index] for // (1) exact matching vector type, // (2) loop-invariant base, @@ -1015,6 +1021,10 @@ void HLoopOptimization::GenerateVecOp(HInstruction* org, for (size_t index = 0; index < inputs.size(); ++index) { new_invoke->SetArgumentAt(index, vector_map_->Get(inputs[index])); } + new_invoke->SetIntrinsic(invoke->GetIntrinsic(), + kNeedsEnvironmentOrCache, + kNoSideEffects, + kNoThrow); vector = new_invoke; } break; |