[14] RFR(S): 8230062: assert(i == p->size()-1) failed: must be last element of the pack
Christian Hagedorn
christian.hagedorn at oracle.com
Tue Sep 24 14:13:08 UTC 2019
Hi
Please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8230062
http://cr.openjdk.java.net/~chagedorn/8230062/webrev.00/
The assertion is too strong. There are cases where a reduction chain is
put into a superword pack but an intermediate result is used outside of
the loop (see test case and [1]). This triggers the assertion failure.
Moreover, it would be incorrect to 'continue' in the loop on line 2054
(= allowing a replacement with a vector instruction) and not exclude
this pack.
The fix simply adds the assertion check as a condition to the continue
statement. If we encounter such an intermediate result use outside of
the loop then is_vector_use() returns false and we do not use a vector
instruction (i.e. return false on line 2056).
Thank you!
Best regards,
Christian
[1]
https://bugs.openjdk.java.net/secure/attachment/84959/IntermediateResultUse.png
More information about the hotspot-compiler-dev
mailing list