Fix bug in vectorization of charAt, with regression test

Rationale:
String array get instruction cannot be vectorized
in a straightforward way, since compression has
to be dealt with. So rejected for now.

Test: test-art-target, test-art-host
Bug: 37151445
Change-Id: I16112cb8b1be30babd8ec07af5976db0369f8c28
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc
index 8eeff1f..cf7acb3 100644
--- a/compiler/optimizing/loop_optimization.cc
+++ b/compiler/optimizing/loop_optimization.cc
@@ -623,6 +623,12 @@
     }
     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,