[llvm] [RISCV] Combine trunc (srl zext (x), zext (y)) to srl (x, umin (y, scalarsizeinbits(y) - 1)) (PR #69092)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 10:49:30 PDT 2023


lukel97 wrote:

Specifically I think #65728 is fine because sra has the property that ` ∀ n : nat. (sra x, sew-1) = (sra x, sew-1+n)`, but srl doesn't i.e. `(srl x, sew-1) != (srl x, sew)`

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


More information about the llvm-commits mailing list