[llvm] [RISCV] Allow folding vmerge with implicit passthru when true has tied dest (PR #78565)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 4 07:40:04 PDT 2024


lukel97 wrote:

Sending out one last ping before I land this. I've rebased it and done another look over, it still seems correct to me.

This PR allows the transform to happen when both the vmerge and the true node have passsthru operands, AND vmerge's passthru is implicit. 

It was most likely restricted previously because when vmerge's passthru is implicit the policy becomes tail agnostic. 

But even if both the vmerge and true node have passthru operands, its still correct to do the transform and use a tail agnostic policy.

Because the original vmerge's tail was implicit anyway, so we can clobber the resulting node's tail with a tail agnostic policy (the VL is the same)

https://github.com/llvm/llvm-project/pull/78565


More information about the llvm-commits mailing list