[llvm] [RISCV][P-ext] Change RISCVISD::SATI to use [1,bitwidth] for the immediate. (PR #230377)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 10 11:15:12 PDT 2026


================

----------------
topperc wrote:

```suggestion
// Fold (smax (smin X, (1 << C) - 1), -(1 << C)) -> riscv_sati X, C+1.
// Fold (smin (smax X, -(1 << C)), (1 << C) - 1) -> riscv_sati X, C+1.
```

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


More information about the llvm-commits mailing list