RFR: 8300865: C2: product reduction in ProdRed_Double is not vectorized [v3]
Emanuel Peter
epeter at openjdk.org
Tue May 30 09:19:55 UTC 2023
On Tue, 23 May 2023 22:35:04 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> 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
>
> Sandhya Viswanathan has updated the pull request incrementally with one additional commit since the last revision:
>
> change to superword_max_vector_size
Thanks for the fix! Looks good.
-------------
Marked as reviewed by epeter (Committer).
PR Review: https://git.openjdk.org/jdk/pull/14065#pullrequestreview-1450493207
More information about the hotspot-compiler-dev
mailing list