Mercurial > hg > truffle
comparison test/compiler/intrinsics/mathexact/Verify.java @ 17726:085b304a1cc5
8027754: Enable loop optimizations for loops with MathExact inside
Reviewed-by: kvn, iveresov
author | rbackman |
---|---|
date | Thu, 23 Jan 2014 12:08:28 +0100 |
parents | 59e8ad757e19 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
17725:b4ce4e9eb97d | 17726:085b304a1cc5 |
---|---|
158 } | 158 } |
159 } | 159 } |
160 | 160 |
161 public static class NonConstantTest { | 161 public static class NonConstantTest { |
162 public static java.util.Random rnd = new java.util.Random(); | 162 public static java.util.Random rnd = new java.util.Random(); |
163 public static int[] values = new int[] { Integer.MAX_VALUE, Integer.MIN_VALUE }; | |
163 | 164 |
164 public static void verify(BinaryMethod method) { | 165 public static void verify(BinaryMethod method) { |
165 for (int i = 0; i < 50000; ++i) { | 166 for (int i = 0; i < 50000; ++i) { |
166 int rnd1 = rnd.nextInt(), rnd2 = rnd.nextInt(); | 167 int rnd1 = rnd.nextInt(), rnd2 = rnd.nextInt(); |
167 Verify.verifyBinary(rnd1, rnd2, method); | 168 Verify.verifyBinary(rnd1, rnd2, method); |
168 Verify.verifyBinary(rnd1, rnd2 + 1, method); | 169 Verify.verifyBinary(rnd1, rnd2 + 1, method); |
169 Verify.verifyBinary(rnd1 + 1, rnd2, method); | 170 Verify.verifyBinary(rnd1 + 1, rnd2, method); |
170 Verify.verifyBinary(rnd1 - 1, rnd2, method); | 171 Verify.verifyBinary(rnd1 - 1, rnd2, method); |
171 Verify.verifyBinary(rnd1, rnd2 - 1, method); | 172 Verify.verifyBinary(rnd1, rnd2 - 1, method); |
173 Verify.verifyBinary(0, values[0], method); | |
174 Verify.verifyBinary(values[0], 0, method); | |
175 Verify.verifyBinary(0, values[1], method); | |
176 Verify.verifyBinary(values[1], 0, method); | |
172 } | 177 } |
173 } | 178 } |
174 } | 179 } |
175 | 180 |
176 public static class NonConstantLongTest { | 181 public static class NonConstantLongTest { |