RFR: 8371065: C2 SuperWord: VTransformLoopPhiNode::apply set wrong type, led to wrong constant folding of phi [v2]

Emanuel Peter epeter at openjdk.org
Mon Nov 10 09:19:05 UTC 2025


On Sat, 8 Nov 2025 15:59:50 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   add diagnostic flag for product build
>
> That may be more preferable. Or we can track the type in `VTransformLoopPhiNode` and change it when we decide to do the transformation, at the same time as other nodes in the loop? I see that `VTransformLoopPhiNode::apply` returns a `make_scalar`, which seems confusing if it can be a vector, too. Or we can have `VTransformScalarLoopPhi` and `VTransformVectorLoopPhi` as separate classes, but it seems like it will result in some unnecessary duplication.
> 
> These are just suggestions, and my expertise in the superword vectorizer is definitely lacking, please make the decision that you think is best.

@merykitty Yeah, the modeling is not yet perfect in `VTransform`. We can keep perfecting it as the need arises. I'll do some experiments now, and note some down for later :)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28113#issuecomment-3510363872


More information about the hotspot-compiler-dev mailing list