mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
Add double precision test to CMoveLConstants.java
This commit is contained in:
parent
09d1e44d77
commit
0058e3e8f5
@ -67,14 +67,28 @@ public class CMoveLConstants {
|
|||||||
return a > b ? 1L : 0L;
|
return a > b ? 1L : 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@IR(counts = {IRNode.X86_CMOVEL_IMM01UCF, "1"},
|
||||||
|
applyIfPlatform = {"x64", "true"},
|
||||||
|
applyIfCPUFeatureOr = {"apx_f", "false", "avx10_2", "false"},
|
||||||
|
phase = CompilePhase.FINAL_CODE)
|
||||||
|
@IR(counts = {IRNode.X86_CMOVEL_IMM01UCFE, "1"},
|
||||||
|
applyIfPlatform = {"x64", "true"},
|
||||||
|
applyIfCPUFeatureAnd = {"apx_f", "true", "avx10_2", "true"},
|
||||||
|
phase = CompilePhase.FINAL_CODE)
|
||||||
|
public static long testDouble(double a, double b) {
|
||||||
|
return a > b ? 1L : 0L;
|
||||||
|
}
|
||||||
|
|
||||||
@DontCompile
|
@DontCompile
|
||||||
public void assertResults(int a, int b) {
|
public void assertResults(int a, int b) {
|
||||||
Asserts.assertEQ(a > b ? 1L : 0L, testSigned(a, b));
|
Asserts.assertEQ(a > b ? 1L : 0L, testSigned(a, b));
|
||||||
Asserts.assertEQ(Integer.compareUnsigned(a, b) > 0 ? 1L : 0L, testUnsigned(a, b));
|
Asserts.assertEQ(Integer.compareUnsigned(a, b) > 0 ? 1L : 0L, testUnsigned(a, b));
|
||||||
Asserts.assertEQ((float) a > (float) b ? 1L : 0L, testFloat(a, b));
|
Asserts.assertEQ((float) a > (float) b ? 1L : 0L, testFloat(a, b));
|
||||||
|
Asserts.assertEQ((double) a > (double) b ? 1L : 0L, testDouble(a, b));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Run(test = {"testSigned", "testUnsigned", "testFloat"})
|
@Run(test = {"testSigned", "testUnsigned", "testFloat", "testDouble"})
|
||||||
public void runMethod() {
|
public void runMethod() {
|
||||||
assertResults(10, 20);
|
assertResults(10, 20);
|
||||||
assertResults(20, 10);
|
assertResults(20, 10);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user