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

SPECjvm2008-SOR.small has different unrolling depending on MaxVectorSize

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 19
    • hotspot

      SPECjvm2008-SOR.small innermost loop is not vectorizable but it still has extra unrolling depending on MaxVectorSize setting. Superword unroll analysis does not identify that the loop is not vectorizable.
      Please note that there is true dependency in the innermost loop so it cannot be vectorized.
        
      for (int p=0; p<num_iterations; p++) {
                  for (int i=1; i<Mm1; i++) {
                      Gi = G[i];
                      double[] Gim1 = G[i-1];
                      double[] Gip1 = G[i+1];
                      for (int j=1; j<Nm1; j++)
                          Gi[j] = omega_over_four * (Gim1[j] + Gip1[j] + Gi[j-1]
                                  + Gi[j+1]) + one_minus_omega * Gi[j];
                  }
        }

      In the above code snippet their is true dependency as Gi[j] depends on Gi[j-1] and so the loop cannot be vectorized.

            Unassigned Unassigned
            sviswanathan Sandhya Viswanathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: