diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-04-11 19:46:48 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-04-11 19:46:53 +0000 |
commit | 60efed530d38893eb6c1ff2c4135ecf5320f8fff (patch) | |
tree | 62694f043981758f678b236d485b2185042a17a7 /compiler/optimizing/loop_optimization.cc | |
parent | e2dfd30e752ed94944cb6f614f1a4cf18d038677 (diff) | |
parent | 3101e58114b21876f77940d716385c54f697761b (diff) |
Merge "Fix bug in vectorization of charAt, with regression test"
Diffstat (limited to 'compiler/optimizing/loop_optimization.cc')
-rw-r--r-- | compiler/optimizing/loop_optimization.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc index 8eeff1f2f0..cf7acb36d1 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, |