< prev index next >

test/compiler/c2/Test6805724.java

Print this page




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @bug 6805724
  27  * @summary ModLNode::Ideal() generates functionally incorrect graph
  28  *          when divisor is any (2^k-1) constant.
  29  * @modules java.base/jdk.internal.misc
  30  * @library /testlibrary
  31  *
  32  * @run main/othervm -Xcomp
  33  *      -XX:CompileCommand=compileonly,compiler.c2.Test6805724::fcomp
  34  *      compiler.c2.Test6805724
  35  */
  36 
  37 package compiler.c2;
  38 
  39 import jdk.test.lib.Utils;
  40 
  41 public class Test6805724 implements Runnable {
  42     // Initialize DIVISOR so that it is final in this class.
  43     static final long DIVISOR;  // 2^k-1 constant
  44 
  45     static {
  46         long value = 0;
  47         try {
  48             value = Long.decode(System.getProperty("divisor"));
  49         } catch (Throwable t) {
  50             // This one is required for the Class.forName() in main.




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @bug 6805724
  27  * @summary ModLNode::Ideal() generates functionally incorrect graph
  28  *          when divisor is any (2^k-1) constant.
  29  * @modules java.base/jdk.internal.misc
  30  * @library /test/lib
  31  *
  32  * @run main/othervm -Xcomp
  33  *      -XX:CompileCommand=compileonly,compiler.c2.Test6805724::fcomp
  34  *      compiler.c2.Test6805724
  35  */
  36 
  37 package compiler.c2;
  38 
  39 import jdk.test.lib.Utils;
  40 
  41 public class Test6805724 implements Runnable {
  42     // Initialize DIVISOR so that it is final in this class.
  43     static final long DIVISOR;  // 2^k-1 constant
  44 
  45     static {
  46         long value = 0;
  47         try {
  48             value = Long.decode(System.getProperty("divisor"));
  49         } catch (Throwable t) {
  50             // This one is required for the Class.forName() in main.


< prev index next >