[llvm] [InstCombine] Remove AllOnes fallbacks in getMaskedTypeForICmpPair() (PR #104941)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 08:26:54 PDT 2024


https://github.com/dtcxzyw requested changes to this pull request.

Regression:
```
define i1 @test(i32 %104, i32 %106, i32 noundef %.fr.i) {
  %206 = icmp ne i32 %104, 0
  %207 = icmp ne i32 %106, 63
  %or.cond19.i = select i1 %206, i1 true, i1 %207
  %208 = icmp ne i32 %.fr.i, 0
  %or.cond21.i = or i1 %or.cond19.i, %208
  ret i1 %or.cond21.i
}
```
should be folded into
```
define i1 @test(i32 %0, i32 %1, i32 noundef %.fr.i) {
  %3 = icmp ne i32 %1, 63
  %4 = or i32 %0, %.fr.i
  %5 = icmp ne i32 %4, 0
  %or.cond21.i = select i1 %5, i1 true, i1 %3
  ret i1 %or.cond21.i
}
```

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


More information about the llvm-commits mailing list