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

range check CastII nodes should not be split through Phi

    Details

    • Subcomponent:
    • Resolved In Build:
      b108

      Backports

        Description

        Reported by Michael Berg for vectorization optimizations.
        In cases like this:

          public static float sumListReduction(float[] a, float[] b, float[] c, float[] d, float total, int process_len)
          {
            for(int i = 0; i < process_len; i++)
            {
              d[i]= (a[i] * b[i]) + (a[i] * c[i]) + (b[i] * c[i]);
            }

            total += d[0];
            total += d[process_len-1];
            return total;
          }

        Range check CastII nodes are split through Phis which causes new Phis to be created that are unrelated to the trip Phi and prevent further optimization:

        Phi 735 718 43 384 [ 784 384 ] bci = 10 debug_orig = dump_spec = #int:>=1:www #tripcount debug_idx = 17200735 line = 32 type = int:

        Phi 921 718 43 384 [ 727 ] bci = 16 debug_orig = dump_spec = #int:1..max-1:www debug_idx = 23800921 line = 32 type = int:

        ILW=M(prevent optimization)M(some code with loops)H(none)=P3

          Issue Links

            Activity

            Hide
            thartmann Tobias Hartmann added a comment -
            Should we backport this to 8? Because JDK-6675699 was backported to 8u82.
            Show
            thartmann Tobias Hartmann added a comment - Should we backport this to 8? Because JDK-6675699 was backported to 8u82.
            Hide
            roland Roland Westrelin added a comment -
            regarding lack of test case: change affects code generation which cannot be observed from a test case
            Show
            roland Roland Westrelin added a comment - regarding lack of test case: change affects code generation which cannot be observed from a test case
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/a63cf6a69972
            User: roland
            Date: 2016-02-15 10:44:11 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/a63cf6a69972 User: roland Date: 2016-02-15 10:44:11 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/a63cf6a69972
            User: lana
            Date: 2016-03-02 19:34:38 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/a63cf6a69972 User: lana Date: 2016-03-02 19:34:38 +0000

              People

              • Assignee:
                roland Roland Westrelin
                Reporter:
                roland Roland Westrelin
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: