[PATCH] D49238: [InstCombine] add more SPFofSPF folding

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 08:57:18 PDT 2018


RKSimon added a reviewer: RKSimon.
RKSimon added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4658
+      }
     }
 
----------------
Is this better?
```
    if (match(TrueVal, MaybeSExtLHS)) {
        LHS = TrueVal;
        RHS = FalseVal;
    } else {
        LHS = FalseVal;
        RHS = TrueVal;
    }
  if (CmpUsesNegatedOp)
    std::swap(LHS, RHS);
```


https://reviews.llvm.org/D49238





More information about the llvm-commits mailing list