Issue |
63381
|
Summary |
llvm.uadd.sat.i64 doesn't know that the return value is >= the first operand
|
Labels |
|
Assignees |
|
Reporter |
saethlin
|
Rust demo: https://godbolt.org/z/d8MG583Tb
alive2: https://alive2.llvm.org/ce/z/Zj-Rvq
This:
```llvm
define noundef zeroext i1 @src(i64 noundef %x, i64 noundef %y) unnamed_addr #0 {
start:
%0 = tail call i64 @llvm.uadd.sat.i64(i64 %x, i64 %y)
%1 = icmp uge i64 %0, %x
ret i1 %1
}
```
Should be optimized to:
```llvm
define noundef zeroext i1 @tgt(i64 noundef %x, i64 noundef %y) unnamed_addr #0 {
start:
ret i1 true
}
```
But it isn't.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs