test/hotspot/jtreg/compiler/codegen/Test6909839.java
author thartmann
Thu, 22 Mar 2018 08:39:51 +0100
changeset 49483 d374b1634589
parent 47216 71c04702a3d5
permissions -rw-r--r--
8199777: Deprecate -XX:+AggressiveOpts Summary: Deprecate -XX:+AggressiveOpts and remove it from testing. Reviewed-by: kvn, dholmes, shade
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4589
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
     1
/*
49483
d374b1634589 8199777: Deprecate -XX:+AggressiveOpts
thartmann
parents: 47216
diff changeset
     2
 * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
4589
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
     4
 *
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
     7
 * published by the Free Software Foundation.
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
     8
 *
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    13
 * accompanied this code).
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    14
 *
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4589
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4589
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4589
diff changeset
    21
 * questions.
4589
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    22
 */
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    23
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    24
/**
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    25
 * @test
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    26
 * @bug 6909839
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    27
 * @summary missing unsigned compare cases for some cmoves in sparc.ad
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    28
 *
49483
d374b1634589 8199777: Deprecate -XX:+AggressiveOpts
thartmann
parents: 47216
diff changeset
    29
 * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+EliminateAutoBox -XX:AutoBoxCacheMax=20000 -Xbatch compiler.codegen.Test6909839
4589
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    30
 */
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    31
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    32
package compiler.codegen;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    33
4589
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    34
public class Test6909839 {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    35
    public static void main(String[] args) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    36
        testi();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    37
        testi();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    38
        testi();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    39
        testui();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    40
        testui();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    41
        testui();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    42
        testdi();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    43
        testdi();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    44
        testdi();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    45
        testfi();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    46
        testfi();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    47
        testfi();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    48
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    49
        testl();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    50
        testl();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    51
        testl();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    52
        testul();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    53
        testul();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    54
        testul();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    55
        testdl();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    56
        testdl();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    57
        testdl();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    58
        testfl();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    59
        testfl();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    60
        testfl();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    61
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    62
        testf();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    63
        testf();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    64
        testf();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    65
        testuf();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    66
        testuf();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    67
        testuf();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    68
        testdf();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    69
        testdf();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    70
        testdf();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    71
        testff();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    72
        testff();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    73
        testff();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    74
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    75
        testd();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    76
        testd();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    77
        testd();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    78
        testud();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    79
        testud();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    80
        testud();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    81
        testdd();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    82
        testdd();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    83
        testdd();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    84
        testfd();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    85
        testfd();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    86
        testfd();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    87
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    88
        testp();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    89
        testp();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    90
        testp();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    91
        testup();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    92
        testup();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    93
        testup();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    94
        testdp();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    95
        testdp();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    96
        testdp();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    97
        testfp();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    98
        testfp();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
    99
        testfp();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   100
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   101
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   102
    static void testui() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   103
        int total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   104
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   105
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   106
            total += ((v >= 1 && v < 3) ? 1 : 2);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   107
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   108
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   109
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   110
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   111
    static void testdi() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   112
        int total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   113
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   114
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   115
            total += (v > 1.0) ? 1 : 2;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   116
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   117
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   118
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   119
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   120
    static void testfi() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   121
        int total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   122
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   123
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   124
            total += (v > 1.0f) ? 1 : 2;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   125
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   126
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   127
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   128
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   129
    static void testi() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   130
        int total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   131
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   132
            total += (i % 4 != 0) ? 1 : 2;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   133
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   134
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   135
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   136
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   137
    static void testul() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   138
        long total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   139
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   140
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   141
            total += ((v >= 1 && v < 3) ? 1L : 2L);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   142
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   143
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   144
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   145
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   146
    static void testdl() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   147
        long total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   148
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   149
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   150
            total += (v > 1.0) ? 1L : 2L;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   151
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   152
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   153
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   154
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   155
    static void testfl() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   156
        long total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   157
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   158
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   159
            total += (v > 1.0f) ? 1L : 2L;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   160
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   161
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   162
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   163
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   164
    static void testl() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   165
        long total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   166
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   167
            total += (i % 4 != 0) ? 1L : 2L;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   168
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   169
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   170
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   171
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   172
    static void testuf() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   173
        float total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   174
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   175
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   176
            total += ((v >= 1 && v < 3) ? 1.0f : 2.0f);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   177
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   178
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   179
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   180
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   181
    static void testdf() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   182
        float total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   183
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   184
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   185
            total += (v > 0.0) ? 1.0f : 2.0f;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   186
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   187
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   188
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   189
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   190
    static void testff() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   191
        float total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   192
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   193
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   194
            total += (v > 0.0f) ? 1.0f : 2.0f;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   195
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   196
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   197
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   198
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   199
    static void testf() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   200
        float total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   201
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   202
            total += (i % 4 != 0) ? 1.0f : 2.0f;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   203
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   204
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   205
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   206
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   207
    static void testud() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   208
        double total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   209
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   210
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   211
            total += ((v >= 1 && v < 3) ? 1.0d : 2.0d);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   212
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   213
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   214
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   215
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   216
    static void testdd() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   217
        double total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   218
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   219
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   220
            total += (v > 1.0) ? 1.0d : 2.0d;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   221
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   222
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   223
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   224
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   225
    static void testfd() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   226
        double total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   227
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   228
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   229
            total += (v > 1.0f) ? 1.0d : 2.0d;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   230
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   231
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   232
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   233
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   234
    static void testd() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   235
        double total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   236
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   237
            total += (i % 4 != 0) ? 1.0d : 2.0d;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   238
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   239
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   240
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   241
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   242
    static void testp() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   243
        Object a = new Object();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   244
        Object b = new Object();;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   245
        int total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   246
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   247
            total += ((i % 4 != 0) ? a : b).hashCode();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   248
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   249
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   250
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   251
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   252
    static void testup() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   253
        Object a = new Object();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   254
        Object b = new Object();;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   255
        int total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   256
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   257
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   258
            total += ((v >= 1 && v < 3) ? a : b).hashCode();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   259
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   260
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   261
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   262
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   263
    static void testdp() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   264
        Object a = new Object();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   265
        Object b = new Object();;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   266
        int total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   267
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   268
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   269
            total += ((v > 1.0) ? a : b).hashCode();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   270
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   271
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   272
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   273
    static void testfp() {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   274
        Object a = new Object();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   275
        Object b = new Object();;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   276
        int total = 0;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   277
        for (int i = 0 ; i < 10000; i++) {
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   278
            int v = i % 4;
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   279
            total += ((v > 1.0f) ? a : b).hashCode();
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   280
        }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   281
        System.out.println(total);
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   282
    }
2621c7da5a88 6909839: missing unsigned compare cases for some cmoves in sparc.ad
never
parents:
diff changeset
   283
}