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

ArrayFill with store on backedge needs to reduce length by 1

    XMLWordPrintable

Details

    • b06

    Backports

      Description

        Please change the generic bug title to something more descriptive once the root cause is known.

        The attached Java Fuzzer test results in a wrong execution with C2 compared to a run with the interpreter/C1 after JDK-8247307 on aarch64 and x64:
        - aarch64: fails after JDK-8247307 since -XX:+OptimizeFill is set by default
        - x64: only fails with -XX:UseAVX=3 (and before JDK-8275047, -XX:+OptimizeFill must be set as it was false by default):

        To reproduce:
        $ java -Xint Test.java > interpreter.log
        $ java -XX:-TieredCompilation -Xcomp -XX:CompileOnly=Test (-XX:UseAVX=3) Test.java > c2_test.log
        $ java -XX:-TieredCompilation -Xcomp -XX:CompileOnly=Reduced (-XX:UseAVX=3) Reduced.java > c2_reduced.log

        $ diff interpreter.log c2_test.log:
        7c7
        < vMeth1_check_sum: 585775794890188912
        ---
        > vMeth1_check_sum: 585775794890188648
        16c16
        < vMeth1_check_sum: 1171551947176573060
        ---
        > vMeth1_check_sum: 1171551947176572796
        25c25
        < vMeth1_check_sum: 1757328099462957208
        ---
        > vMeth1_check_sum: 1757328099462956944
        34c34
        < vMeth1_check_sum: 2343104251749341356
        ---
        > vMeth1_check_sum: 2343104251749341092
        43c43
        < vMeth1_check_sum: 2928880404035725504
        ---
        > vMeth1_check_sum: 2928880404035725240
        52c52
        < vMeth1_check_sum: 3514656556322109652
        ---
        > vMeth1_check_sum: 3514656556322109388
        61c61
        < vMeth1_check_sum: 4100432708608493800
        ---
        > vMeth1_check_sum: 4100432708608493536
        70c70
        < vMeth1_check_sum: 4686208860894877948
        ---
        > vMeth1_check_sum: 4686208860894877684
        79c79
        < vMeth1_check_sum: 5271985013181262096
        ---
        > vMeth1_check_sum: 5271985013181261832
        88c88
        < vMeth1_check_sum: 5857761165467646244
        ---
        > vMeth1_check_sum: 5857761165467645980

        $ diff interpreter.log c2_reduced.log:
        134c134
        < iArrFld[63]: 0
        ---
        > iArrFld[63]: 4
        204c204
        < iArrFld[63]: 0
        ---
        > iArrFld[63]: 4
        274c274
        < iArrFld[63]: 0
        ---
        > iArrFld[63]: 4
        344c344
        < iArrFld[63]: 0
        ---
        > iArrFld[63]: 4
        414c414
        < iArrFld[63]: 0
        ---
        > iArrFld[63]: 4
        484c484
        < iArrFld[63]: 0
        ---
        > iArrFld[63]: 4
        554c554
        < iArrFld[63]: 0
        ---
        > iArrFld[63]: 4
        624c624
        < iArrFld[63]: 0
        ---
        > iArrFld[63]: 4
        694c694
        < iArrFld[63]: 0
        ---
        > iArrFld[63]: 4

        Attachments

          1. FuzzerUtils.java
            13 kB
          2. Reduced.java
            0.6 kB
          3. Test.java
            7 kB

          Issue Links

            Activity

              People

                epeter Emanuel Peter
                chagedorn Christian Hagedorn
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: