test/compiler/intrinsics/mathexact/AddExactILoopDependentTest.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff test/compiler/intrinsics/mathexact/AddExactILoopDependentTest.java
test/compiler/intrinsics/mathexact/AddExactILoopDependentTest.java
Print this page
rev 5462 : 8026844: Various Math functions needs intrinsification
Reviewed-by: duke
*** 23,48 ****
/*
* @test
* @bug 8024924
* @summary Test non constant addExact
! * @compile LoopDependentTest.java Verify.java
! * @run main LoopDependentTest
*
*/
! import java.lang.ArithmeticException;
!
! public class LoopDependentTest {
! public static java.util.Random rnd = new java.util.Random();
!
public static void main(String[] args) {
! int rnd1 = rnd.nextInt(), rnd2 = rnd.nextInt();
! for (int i = 0; i < 50000; ++i) {
! Verify.verify(rnd1 + i, rnd2 + i);
! Verify.verify(rnd1 + i, rnd2 + (i & 0xff));
! Verify.verify(rnd1 - i, rnd2 - (i & 0xff));
! Verify.verify(rnd1 + i + 1, rnd2 + i + 2);
! Verify.verify(rnd1 + i * 2, rnd2 + i);
! }
}
}
--- 23,37 ----
/*
* @test
* @bug 8024924
* @summary Test non constant addExact
! * @compile AddExactILoopDependentTest.java Verify.java
! * @run main/timeout=200 AddExactILoopDependentTest
*
*/
! public class AddExactILoopDependentTest {
public static void main(String[] args) {
! Verify.LoopDependentTest.verify(new Verify.AddExactI());
}
}
test/compiler/intrinsics/mathexact/AddExactILoopDependentTest.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File