[InstCombine] Missed fold: icmp(fptosi(x), c) -> fcmp(x,c)
Open
llvm:instcombine
missed-optimization
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```llvm
define i1 @src(float %x) {
entry:
%n0 = fptosi float %x to i32
%r = icmp eq i32 %n0, -1000000000
ret i1 %r
}
define i1 @tgt(float %x) {
entry:
%r = fcmp oeq float %x, -1.000000e+09
ret i1 %r
}
```
Alive proof: https://alive2.llvm.org/ce/z/Zkm4CJ
Contributor guide
Assessment
This issue has not been assessed yet.