< prev index next >

test/compiler/loopopts/TestPredicateLostDependency.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke


   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 
  25 /**
  26  * @test
  27  * @bug 8069191
  28  * @summary predicate moved out of loops and CastPP removal causes dependency to be lost
  29  * @run main/othervm -Xcomp -XX:CompileOnly=TestPredicateLostDependency.m1 -XX:+IgnoreUnrecognizedVMOptions -XX:+StressGCM TestPredicateLostDependency
  30  *




  31  */
  32 


  33 public class TestPredicateLostDependency {
  34     static class A {
  35         int i;
  36     }
  37 
  38     static class B extends A {
  39     }
  40 
  41     static boolean crash = false;
  42 
  43     static boolean m2() {
  44         return crash;
  45     }
  46 
  47     static int m3(float[] arr) {
  48         return 0;
  49     }
  50 
  51     static float m1(A aa) {
  52         float res = 0;




   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 
  25 /**
  26  * @test
  27  * @bug 8069191
  28  * @summary predicate moved out of loops and CastPP removal causes dependency to be lost

  29  *
  30  * @run main/othervm -Xcomp -XX:+IgnoreUnrecognizedVMOptions -XX:+StressGCM
  31  *                   -XX:CompileCommand=compileonly,compiler.loopopts.TestPredicateLostDependency::m1
  32  *                   compiler.loopopts.TestPredicateLostDependency
  33  *
  34  */
  35 
  36 package compiler.loopopts;
  37 
  38 public class TestPredicateLostDependency {
  39     static class A {
  40         int i;
  41     }
  42 
  43     static class B extends A {
  44     }
  45 
  46     static boolean crash = false;
  47 
  48     static boolean m2() {
  49         return crash;
  50     }
  51 
  52     static int m3(float[] arr) {
  53         return 0;
  54     }
  55 
  56     static float m1(A aa) {
  57         float res = 0;


< prev index next >