RFR: 8333840: C2 SuperWord: wrong result for MulAddS2I when inputs permuted [v3]
Emanuel Peter
epeter at openjdk.org
Thu Jun 13 06:28:13 UTC 2024
On Wed, 12 Jun 2024 15:37:24 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> more refactoring
>
> src/hotspot/share/opto/superword.cpp line 2815:
>
>> 2813: if (VectorNode::is_muladds2i(use)) {
>> 2814: assert(1 <= u_idx && u_idx <= 4, "expected range for the 4 inputs");
>> 2815: return _packset.is_muladds2i_pack_with_pack_inputs(u_pk);
>
> Do we really need this assert? `is_muladds2i()` checks that use is MulAddS2I which by definition has 4 data inputs + control.
I can remove it.
> src/hotspot/share/opto/superword.cpp line 2846:
>
>> 2844: // v = MulAddS2I(a, b) = a0 * b0 + b1 + a1 (case 2)
>> 2845: // v = MulAddS2I(a, b) = a1 * b1 + a0 + b0 (case 3)
>> 2846: // v = MulAddS2I(a, b) = a1 * b1 + b0 + a0 (case 4)
>
> The same typo for second pair.
Will fix that, thanks for spotting it!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19619#discussion_r1637617781
PR Review Comment: https://git.openjdk.org/jdk/pull/19619#discussion_r1637618061
More information about the hotspot-compiler-dev
mailing list