< prev index next >

test/hotspot/jtreg/compiler/c2/cmove/TestFPComparison2.java

Print this page

   1 /*
   2  * Copyright (c) 2025, Rivos Inc. All rights reserved.

   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  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 package compiler.c2.irTests;
  25 
  26 import compiler.lib.ir_framework.*;
  27 import java.util.List;
  28 
  29 /*
  30  * @test
  31  * @bug 8358892 8357551
  32  * @summary The test is to trigger code path of BoolTest::ge/gt in C2_MacroAssembler::enc_cmove_cmp_fp
  33  * @requires vm.debug
  34  * @library /test/lib /
  35  * @run driver ${test.main.class}
  36  */
  37 public class TestFPComparison2 {
  38     static final double[] DOUBLES = new double[] {
  39         Double.NEGATIVE_INFINITY,
  40         -Double.MAX_VALUE,
  41         -1.0,
  42         -Double.MIN_VALUE,
  43         -0.0,
  44         0.0,

   1 /*
   2  * Copyright (c) 2025, Rivos Inc. All rights reserved.
   3  * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  */
  24 
  25 package compiler.c2.cmove;
  26 
  27 import compiler.lib.ir_framework.*;
  28 import java.util.List;
  29 
  30 /*
  31  * @test
  32  * @bug 8358892 8357551
  33  * @summary The test is to trigger code path of BoolTest::ge/gt in C2_MacroAssembler::enc_cmove_cmp_fp
  34  * @requires vm.debug
  35  * @library /test/lib /
  36  * @run driver ${test.main.class}
  37  */
  38 public class TestFPComparison2 {
  39     static final double[] DOUBLES = new double[] {
  40         Double.NEGATIVE_INFINITY,
  41         -Double.MAX_VALUE,
  42         -1.0,
  43         -Double.MIN_VALUE,
  44         -0.0,
  45         0.0,
< prev index next >