[llvm] Add late optimization pass for riscv (PR #117060)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 11:19:23 PST 2024


preames wrote:

> > I can't find any target which implements this "trivially evaluated cond branch -> unconditional branch" in analyzeBranch, but I also can't find any reason why you can't do this if AllowModify=true.
> 
> Are you suggesting analyzeBranch should look through copies to figure this out?

No, I was suggesting that after copy propagation that analyzeBranch could perform at least the conversion to the unconditional branch.  Though honestly, recognizing the ADDI XN, x0, 0 idiom might not be crazy either.

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


More information about the llvm-commits mailing list