< prev index next >
test/compiler/c2/Test6805724.java
Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke
*** 26,38 ****
* @bug 6805724
* @summary ModLNode::Ideal() generates functionally incorrect graph
* when divisor is any (2^k-1) constant.
* @modules java.base/jdk.internal.misc
* @library /testlibrary
! * @run main/othervm -Xcomp -XX:CompileOnly=Test6805724.fcomp Test6805724
*/
import jdk.test.lib.Utils;
public class Test6805724 implements Runnable {
// Initialize DIVISOR so that it is final in this class.
static final long DIVISOR; // 2^k-1 constant
--- 26,43 ----
* @bug 6805724
* @summary ModLNode::Ideal() generates functionally incorrect graph
* when divisor is any (2^k-1) constant.
* @modules java.base/jdk.internal.misc
* @library /testlibrary
! *
! * @run main/othervm -Xcomp
! * -XX:CompileCommand=compileonly,compiler.c2.Test6805724::fcomp
! * compiler.c2.Test6805724
*/
+ package compiler.c2;
+
import jdk.test.lib.Utils;
public class Test6805724 implements Runnable {
// Initialize DIVISOR so that it is final in this class.
static final long DIVISOR; // 2^k-1 constant
*** 64,83 ****
if (result != expected)
throw new InternalError(result + " != " + expected);
}
public static void main(String args[]) throws Exception {
! Class cl = Class.forName("Test6805724");
ClassLoader apploader = cl.getClassLoader();
// Iterate over all 2^k-1 divisors.
for (int k = 1; k < Long.SIZE; k++) {
long divisor = (1L << k) - 1;
System.setProperty("divisor", "" + divisor);
ClassLoader loader
= Utils.getTestClassPathURLClassLoader(apploader.getParent());
! Class c = loader.loadClass("Test6805724");
Runnable r = (Runnable) c.newInstance();
r.run();
}
}
}
--- 69,88 ----
if (result != expected)
throw new InternalError(result + " != " + expected);
}
public static void main(String args[]) throws Exception {
! Class cl = Test6805724.class;
ClassLoader apploader = cl.getClassLoader();
// Iterate over all 2^k-1 divisors.
for (int k = 1; k < Long.SIZE; k++) {
long divisor = (1L << k) - 1;
System.setProperty("divisor", "" + divisor);
ClassLoader loader
= Utils.getTestClassPathURLClassLoader(apploader.getParent());
! Class c = loader.loadClass(Test6805724.class.getName());
Runnable r = (Runnable) c.newInstance();
r.run();
}
}
}
< prev index next >