[llvm] [InstCombine] Fold fcmp ogt (x - y), 0 into fcmp ogt x, y #85245 (PR #85506)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 02:48:24 PDT 2024
================
@@ -8047,7 +8047,7 @@ Instruction *InstCombinerImpl::visitFCmpInst(FCmpInst &I) {
case FCmpInst::FCMP_OEQ:
case FCmpInst::FCMP_OGE:
case FCmpInst::FCMP_OLE:
- // fsub x, y --> isnnan(x, y) && isninf(x, y)
+ // Skip optimization: fsub x, y guaranteed isInf(x, y).
----------------
arsenm wrote:
```suggestion
// Skip optimization: fsub x, y unless guaranteed !isinf(x) && !isinf(y).
```
https://github.com/llvm/llvm-project/pull/85506
More information about the llvm-commits
mailing list