summaryrefslogtreecommitdiff
path: root/test/655-checker-simd-arm-opt/src/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/655-checker-simd-arm-opt/src/Main.java')
-rw-r--r--test/655-checker-simd-arm-opt/src/Main.java52
1 files changed, 30 insertions, 22 deletions
diff --git a/test/655-checker-simd-arm-opt/src/Main.java b/test/655-checker-simd-arm-opt/src/Main.java
index 7b61dd7951..c82f24f7ff 100644
--- a/test/655-checker-simd-arm-opt/src/Main.java
+++ b/test/655-checker-simd-arm-opt/src/Main.java
@@ -27,49 +27,57 @@ public class Main {
/// CHECK-START-ARM64: void Main.encodableConstants(byte[], short[], char[], int[], long[], float[], double[]) disassembly (after)
/// CHECK-DAG: <<C1:i\d+>> IntConstant 1
- /// CHECK-DAG: <<C2:i\d+>> IntConstant 2
- /// CHECK-DAG: <<C3:i\d+>> IntConstant 3
- /// CHECK-DAG: <<C4:i\d+>> IntConstant 4
- /// CHECK-DAG: <<L5:j\d+>> LongConstant 5
- /// CHECK-DAG: <<F2:f\d+>> FloatConstant 2
- /// CHECK-DAG: <<D20:d\d+>> DoubleConstant 20
+ /// CHECK-DAG: <<C2:i\d+>> IntConstant -128
+ /// CHECK-DAG: <<C3:i\d+>> IntConstant 127
+ /// CHECK-DAG: <<C4:i\d+>> IntConstant -219
+ /// CHECK-DAG: <<C5:i\d+>> IntConstant 219
+ /// CHECK-DAG: <<L6:j\d+>> LongConstant 219
+ /// CHECK-DAG: <<F7:f\d+>> FloatConstant 2
+ /// CHECK-DAG: <<F8:f\d+>> FloatConstant 14.34
+ /// CHECK-DAG: <<D9:d\d+>> DoubleConstant 20
+ /// CHECK-DAG: <<D10:d\d+>> DoubleConstant 0
//
/// CHECK-DAG: VecReplicateScalar [<<C1>>]
- /// CHECK-DAG: movi v{{[0-9]+}}.16b, #0x1
/// CHECK-DAG: VecReplicateScalar [<<C2>>]
- /// CHECK-DAG: movi v{{[0-9]+}}.8h, #0x2, lsl #0
/// CHECK-DAG: VecReplicateScalar [<<C3>>]
- /// CHECK-DAG: movi v{{[0-9]+}}.8h, #0x3, lsl #0
/// CHECK-DAG: VecReplicateScalar [<<C4>>]
- /// CHECK-DAG: movi v{{[0-9]+}}.4s, #0x4, lsl #0
- /// CHECK-DAG: VecReplicateScalar [<<L5>>]
- /// CHECK-DAG: dup v{{[0-9]+}}.2d, x{{[0-9]+}}
- /// CHECK-DAG: VecReplicateScalar [<<F2>>]
- /// CHECK-DAG: fmov v{{[0-9]+}}.4s, #0x0
- /// CHECK-DAG: VecReplicateScalar [<<D20>>]
- /// CHECK-DAG: fmov v{{[0-9]+}}.2d, #0x34
+ /// CHECK-DAG: VecReplicateScalar [<<C5>>]
+ /// CHECK-DAG: VecReplicateScalar [<<L6>>]
+ /// CHECK-DAG: VecReplicateScalar [<<F7>>]
+ /// CHECK-DAG: VecReplicateScalar [<<F8>>]
+ /// CHECK-DAG: VecReplicateScalar [<<D9>>]
+ /// CHECK-DAG: VecReplicateScalar [<<D10>>]
private static void encodableConstants(byte[] b, short[] s, char[] c, int[] a, long[] l, float[] f, double[] d) {
for (int i = 0; i < ARRAY_SIZE; i++) {
b[i] += 1;
}
for (int i = 0; i < ARRAY_SIZE; i++) {
- s[i] += 2;
+ s[i] += -128;
}
for (int i = 0; i < ARRAY_SIZE; i++) {
- c[i] += 3;
+ c[i] += 127;
}
for (int i = 0; i < ARRAY_SIZE; i++) {
- a[i] += 4;
+ a[i] += -219;
}
for (int i = 0; i < ARRAY_SIZE; i++) {
- l[i] += 5;
+ a[i] += 219;
+ }
+ for (int i = 0; i < ARRAY_SIZE; i++) {
+ l[i] += 219;
}
for (int i = 0; i < ARRAY_SIZE; i++) {
f[i] += 2.0f;
}
for (int i = 0; i < ARRAY_SIZE; i++) {
+ f[i] += 14.34f;
+ }
+ for (int i = 0; i < ARRAY_SIZE; i++) {
d[i] += 20.0;
}
+ for (int i = 0; i < ARRAY_SIZE; i++) {
+ d[i] += 0.0;
+ }
}
private static int sumArray(byte[] b, short[] s, char[] c, int[] a, long[] l, float[] f, double[] d) {
@@ -80,7 +88,7 @@ public class Main {
return sum;
}
- public static final int ARRAY_SIZE = 100;
+ public static final int ARRAY_SIZE = 128;
public static void main(String[] args) {
byte[] b = new byte[ARRAY_SIZE];
@@ -92,7 +100,7 @@ public class Main {
double[] d = new double[ARRAY_SIZE];
encodableConstants(b, s, c, a, l, f, d);
- expectEquals(3700, sumArray(b, s, c, a, l, f, d));
+ expectEquals(32640, sumArray(b, s, c, a, l, f, d));
System.out.println("passed");
}