ARM64: Support 128-bit registers for SIMD.
Test: test-art-host, test-art-target
Change-Id: Ifb931a99d34ea77602a0e0781040ed092de9faaa
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc
index bf18cc9..ec02127 100644
--- a/compiler/optimizing/loop_optimization.cc
+++ b/compiler/optimizing/loop_optimization.cc
@@ -770,22 +770,21 @@
return false;
case kArm64:
// Allow vectorization for all ARM devices, because Android assumes that
- // ARMv8 AArch64 always supports advanced SIMD. For now, only D registers
- // (64-bit vectors) not Q registers (128-bit vectors).
+ // ARMv8 AArch64 always supports advanced SIMD.
switch (type) {
case Primitive::kPrimBoolean:
case Primitive::kPrimByte:
*restrictions |= kNoDiv | kNoAbs;
- return TrySetVectorLength(8);
+ return TrySetVectorLength(16);
case Primitive::kPrimChar:
case Primitive::kPrimShort:
*restrictions |= kNoDiv | kNoAbs;
- return TrySetVectorLength(4);
+ return TrySetVectorLength(8);
case Primitive::kPrimInt:
*restrictions |= kNoDiv;
- return TrySetVectorLength(2);
+ return TrySetVectorLength(4);
case Primitive::kPrimFloat:
- return TrySetVectorLength(2);
+ return TrySetVectorLength(4);
default:
return false;
}