[llvm] [InstCombine] Teach foldSelectOpOp about samesign (PR #122723)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 07:25:22 PST 2025
asmok-g wrote:
A bit of an incomplete hint; I think the most interesting diff in IR is:
there are two missing `add`s before icmp
```
- %195 = ashr exact i32 %194, 13
- %196 = add nsw i32 %195, -131072
- %197 = icmp ult i32 %196, -262144
...
+ %194 = ashr exact i32 %193, 13
+ %195 = icmp ugt i32 %194, 131071
```
and
```
- %111 = add nsw i32 %110, -131072
- %112 = icmp ult i32 %111, -262144
- %113 = select i1 %112, i32 0, i32 %110
+ %111 = icmp ugt i32 %110, 131071
+ %112 = select i1 %111, i32 0, i32 %110
```
https://github.com/llvm/llvm-project/pull/122723
More information about the llvm-commits
mailing list