[llvm] [InstCombine] Respect `samesign` flag in `foldAndOrOfICmpsWithConstEq` (PR #112475)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 23:18:35 PDT 2024


dtcxzyw wrote:

Unfortunately this approach doesn't fix the following case:
```
define i1 @sge_and_max_logical(i8 %x, i8 %y)  {
  %cmp = icmp sge i8 %x, %y
  %cmpeq = icmp samesign eq i8 %x, 127
  %r = select i1 %cmp, i1 %cmpeq, i1 false
  ret i1 %r
}
```


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


More information about the llvm-commits mailing list