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

C2: assert(BoolTest(btest).is_canonical()) failure

    XMLWordPrintable

Details

    • b14
    • Verified

    Backports

      Description

        I found this running some ctw tests:

        # Internal Error (/home/roland/jdk-jdk/src/hotspot/share/opto/parse2.cpp:1493), pid=3306856, tid=3306871
        # assert(BoolTest(btest).is_canonical()) failed: sanity

        It can be reproduced with the following test case:
        public class TestUnsignedCompareIntoEqualityNotCanonical {
            public static void main(String[] args) {
                for (int i = 0; i < 20_000; i++) {
                    test(0);
                    test(1);
                }
            }

            private static int test(int x) {
                if (Integer.compareUnsigned(0, x) >= 0) {
                    return 42;
                }
                return -42;
            }
        }

        Attachments

          Issue Links

            Activity

              People

                roland Roland Westrelin
                roland Roland Westrelin
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: