[14] RFR(XXS):8236364:TEMP vector registers could be incorrectly assigned upper bank xmm registers after Generic Operands (JDK-8234391)

Viswanathan, Sandhya sandhya.viswanathan at intel.com
Fri Dec 20 00:39:40 UTC 2019


TEMP vector registers could be incorrectly assigned upper bank xmm registers after Generic Operands (JDK-8234391<https://bugs.openjdk.java.net/browse/JDK-8234391>)

With Generic Operands (JDK-8234391), TEMP is now specialized to a vector register of max_vector_size(). There is a correctness issue with this.
Say if we have an ad file instruct which had TEMP as vecX or vecY and it was required that the vector register be limited to xmm0-15 for KNL but not for SKX.
Now we replaced that TEMP by max_vector_size(), the Matcher::specialize_generic_vector_operand() sets the temp to vecZ which has the range xmm0-31.

As a background: vecX/vecY is the entire range (xmm0-xmm31) for SKX and (xmm0-xmm15) for KNL.
                                vecZ is entire range (xmm0-xmm31) for both SKX and KNL.

Such cases arise for add and mul reduction rules and the long replicates in x86.ad.

The fix proposed for JDK 14 is to specialize the TEMP to legVecZ instead for KNL, thereby limiting it to xmm0-15.

JBS: https://bugs.openjdk.java.net/browse/JDK-8236364
Webrev: http://cr.openjdk.java.net/~sviswanathan/8236364/webrev.00/

Best Regards,
Sandhya





More information about the hotspot-compiler-dev mailing list