RFR: 8300865: C2: product reduction in ProdRed_Double is not vectorized
Sandhya Viswanathan
sviswanathan at openjdk.org
Mon May 22 17:05:15 UTC 2023
This PR fixes the problem with double reduction on x86_64.
In the test compiler.loopopts.superword.ProdRed_Double, the product reduction loop in prodReductionImplement() was not getting vectorized when run as follows:
jtreg -XX:CompileCommand=PrintAssembly,compiler.loopopts.superword.ProdRed_Double::prodReductionImplement compiler/loopopts/superword/ProdRed_Double.java
The print assembly generated in the pid-xxx.log output in JTwork/scratch directory was not showing any vector_reduction_double node.
This was happening as the ReductionNode::implemented was passed a vector size of one element. For the vector reduction implemented we need to check with at least vector size of two elements.
With this PR the vector_reduction_double node is generated.
Please review.
Best Regards,
Sandhya
-------------
Commit messages:
- Update IR test
- 8300865: C2: product reduction in ProdRed_Double is not vectorized
Changes: https://git.openjdk.org/jdk/pull/14065/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14065&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8300865
Stats: 9 lines in 2 files changed: 6 ins; 2 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/14065.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14065/head:pull/14065
PR: https://git.openjdk.org/jdk/pull/14065
More information about the hotspot-compiler-dev
mailing list