[llvm] [InstCombine] Fold fcmp ogt (x - y), 0 into fcmp ogt x, y #85245 (PR #85506)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Mar 22 05:38:16 PDT 2024
    
    
  
================
@@ -7972,6 +7972,11 @@ Instruction *InstCombinerImpl::visitFCmpInst(FCmpInst &I) {
   Constant *RHSC;
   if (match(Op0, m_Instruction(LHSI)) && match(Op1, m_Constant(RHSC))) {
     switch (LHSI->getOpcode()) {
+    case Instruction::FSub:
+      if (Pred == FCmpInst::FCMP_OGT && match(RHSC, m_PosZeroFP()) &&
----------------
SahilPatidar wrote:
As you suggested, I've already incorporated fast flags into the `fsub` operation for some tests. Additionally, I couldn't locate another version of `isKnownNeverInfinity` that accepts flags
https://github.com/llvm/llvm-project/pull/85506
    
    
More information about the llvm-commits
mailing list