Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8211100

hotspot C1 issue with comparing long numbers on x86 32-bit

    Details

    • Subcomponent:
    • Introduced In Build:
      b14
    • Introduced In Version:
      11
    • Resolved In Build:
      b13
    • CPU:
      x86
    • OS:
      generic

      Backports

        Description

        Test case for this issue:

        public class app {
            public static void main(String[] args) {
                Integer cnt = 100;
                if (args.length > 0) {
                    cnt = Integer.parseInt(args[0]);
                }

                for (int i = 0; i < cnt; i++) {
                    test(4558828911L,
                         4294967296L);
                }
            }

            private static void test(long one, long two) {
                while (true) {
                    if (one >= two) {
                        break;
                    }
                }
            }
        }

        OPTS="-XX:+PrintCompilation -XX:CompileOnly=app.test -XX:CompileCommand=quiet"
        $JAVA_HOME/bin/java $OPTS app 10000

        The issue is specific to 32-bit where C1 generated code enters infinite loop.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dcherepanov Dmitry Cherepanov
                  Reporter:
                  dcherepanov Dmitry Cherepanov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: