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

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 5 10:44:05 PDT 2024


topperc 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 undef (its passthru was implicit), so we can clobber the resulting node's tail with a tail agnostic policy (the VL is the same)

Everywhere you wrote "implicit" did you meant "implicit_def"?

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


More information about the llvm-commits mailing list