summaryrefslogtreecommitdiff
path: root/test/640-checker-byte-simd/src/Main.java
diff options
context:
space:
mode:
author Aart Bik <ajcbik@google.com> 2017-05-01 16:50:45 -0700
committer Aart Bik <ajcbik@google.com> 2017-05-01 16:50:45 -0700
commit65ffd8ef044465c47d4f97ab2556310f9ee30a01 (patch)
treeb520b0071f80d6c6f9c4cc649a079969ef3e0d20 /test/640-checker-byte-simd/src/Main.java
parentc009d14ce52bca0de34b441f8a575b0d36c1d69e (diff)
Bug fix on shift that exceeds "lane width".
Rationale: ARM is a bit less forgiving on shifting more than the lane width of the SIMD instruction (rejecting such cases is no loss, since it yields 0 anyway and should be optimized differently). Bug: 37776122 Test: test-art-target, test-art-host Change-Id: I22d04afbfce82b4593f17c2f48c1fd5a0805d305
Diffstat (limited to 'test/640-checker-byte-simd/src/Main.java')
-rw-r--r--test/640-checker-byte-simd/src/Main.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/640-checker-byte-simd/src/Main.java b/test/640-checker-byte-simd/src/Main.java
index 0f7452b045..10b20b83b0 100644
--- a/test/640-checker-byte-simd/src/Main.java
+++ b/test/640-checker-byte-simd/src/Main.java
@@ -179,6 +179,11 @@ public class Main {
a[i] >>>= 33; // 1, since & 31
}
+ static void shl9() {
+ for (int i = 0; i < 128; i++)
+ a[i] <<= 9; // yields all-zeros
+ }
+
//
// Loop bounds.
//
@@ -259,6 +264,10 @@ public class Main {
shr33();
for (int i = 0; i < 128; i++) {
expectEquals((byte) 0x09, a[i], "shr33");
+ }
+ shl9();
+ for (int i = 0; i < 128; i++) {
+ expectEquals((byte) 0x00, a[i], "shl9");
a[i] = (byte) 0xf0; // reset
}
not();