| Issue |
115466
|
| Summary |
[InstCombine] Missed optimization: icmp pred (ext X), (ext_inreg Y) -> icmp pred X, trunc nsw/nuw (ext_inreg Y)
|
| Labels |
llvm:instcombine,
missed-optimization
|
| Assignees |
dtcxzyw
|
| Reporter |
dtcxzyw
|
Alive2: https://alive2.llvm.org/ce/z/7xRX6r
```
define i1 @src(i16 %v19, i64 %v20) {
entry:
%0 = trunc i64 %v20 to i32
%conv2 = and i32 %0, 65535
%conv3 = zext i16 %v19 to i32
%cmp = icmp ugt i32 %conv2, %conv3
ret i1 %cmp
}
define i1 @tgt(i16 %v19, i64 %v20) {
entry:
%0 = trunc i64 %v20 to i16
%cmp = icmp ugt i16 %0, %v19
ret i1 %cmp
}
```
This pattern exists in qemu/linux/spike/...
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs