[llvm] Support replacing `add rd, Zero, Zero` with `c.li rd, 0` (PR #86937)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 07:19:09 PDT 2024


topperc wrote:

Why should add rd, Zero, Zero be special? If we support this, shouldn't we do it for And, Or, Xor, Sll, Srl, Sra that all produce 0 with x0, x0 arguments.

Given the number of cases, I don't think we should do this.

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


More information about the llvm-commits mailing list