Skip to content

Conversation

lukel97
Copy link
Contributor

@lukel97 lukel97 commented Sep 3, 2025

Now that RISCVVectorPeephole can commute operands to fold vmerge into a pseudo to make it masked in #156499, we can remove the remaining VPatMultiplyAccVL_VV_VX/VPatFPMulAccVL_VV_VF_RM patterns.

It also looks like we can remove the vmerge_vl patterns for _TIED psuedos too. I suspect they're handled by convertAllOnesVMergeToVMv and foldVMV_V_V

Tested on SPEC CPU 2017 and llvm-test-suite to confirm there's no codegen change.

Fixes #141885

Now that RISCVVectorPeephole can commute operands to fold vmerge into a pseudo to make it masked in llvm#156499, we can remove the remaining VPatMultiplyAccVL_VV_VX/VPatFPMulAccVL_VV_VF_RM patterns.

It also looks like we can remove the vmerge_vl patterns for _TIED psuedos too.

Tested on SPEC CPU 2017 and llvm-test-suite to confirm there's no codegen change.

Fixes llvm#141885
Copy link
Contributor

@wangpc-pp wangpc-pp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice work!

@lukel97 lukel97 merged commit 22e7c36 into llvm:main Sep 3, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RISCV] Can we teach RISCVectorPeephole to commute FMA to fold vmerge?
2 participants