[llvm] [InstCombine] When canoncicalizing clamp like, also consider certain sgt/slt cases (PR #153240)
Ryan Buchner via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 14 15:22:24 PDT 2025
bababuck wrote:
> I am fine with the IR change. But we may need to handle the new usat pattern on AArch64: https://godbolt.org/z/nq8P6Yssx
I don't see how `usat` applies here, this change is specifically looking at the following case: https://godbolt.org/z/MY1ErP1oK
```
if (x < 0) return 0
if (x > 256) return -1;
else return x;
```
https://github.com/llvm/llvm-project/pull/153240
More information about the llvm-commits
mailing list