RFR: 8342393: Promote commutative vector IR node sharing [v14]
Emanuel Peter
epeter at openjdk.org
Thu Jan 23 10:29:51 UTC 2025
On Thu, 23 Jan 2025 10:22:29 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> src/hotspot/share/opto/phaseX.cpp line 75:
>>
>>> 73: // the result of the operation is corresponding lane of its first operand.
>>> 74: // i.e. RES = VEC1.lanewise(OPER, VEC2, MASK) is semantically equivalent to
>>> 75: // RES = VEC1.BLEND(VEC1.lanewise(OPER, VEC2), MASK)
>>
>> I think you are missing an argument to the BLEND, right? `VEC1` should be in there for the `false` case.
>
> BLEND is operating over VEC1 and result of VEC1.lanewise(OPER, VEC2) under influence of MASK.
So it should not be `VEC1.BLEND(VEC1.lanewise(OPER, VEC2), MASK)`, but one of these:
VEC1.BLEND(VEC1.lanewise(OPER, VEC2), VEC1, MASK)
VEC1.BLEND(VEC1, VEC1.lanewise(OPER, VEC2), MASK)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22863#discussion_r1926733799
More information about the hotspot-compiler-dev
mailing list