[llvm] r340130 - [X86] Use SDValue::operator== instead of DAG.isEqualTo in strictly integer matching.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 18 12:16:56 PDT 2018


Author: ctopper
Date: Sat Aug 18 12:16:56 2018
New Revision: 340130

URL: http://llvm.org/viewvc/llvm-project?rev=340130&view=rev
Log:
[X86] Use SDValue::operator== instead of DAG.isEqualTo in strictly integer matching.

isEqualTo is more useful for floating point. operator== is sufficient for integer.

Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=340130&r1=340129&r2=340130&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sat Aug 18 12:16:56 2018
@@ -33046,7 +33046,7 @@ static SDValue combineSelect(SDNode *N,
     }
 
     if (Other.getNode() && Other->getNumOperands() == 2 &&
-        DAG.isEqualTo(Other->getOperand(0), Cond.getOperand(0))) {
+        Other->getOperand(0) == Cond.getOperand(0)) {
       SDValue OpLHS = Other->getOperand(0), OpRHS = Other->getOperand(1);
       SDValue CondRHS = Cond->getOperand(1);
 
@@ -33059,7 +33059,7 @@ static SDValue combineSelect(SDNode *N,
       // x >= y ? x-y : 0 --> subus x, y
       // x >  y ? x-y : 0 --> subus x, y
       if ((CC == ISD::SETUGE || CC == ISD::SETUGT) &&
-          Other->getOpcode() == ISD::SUB && DAG.isEqualTo(OpRHS, CondRHS))
+          Other->getOpcode() == ISD::SUB && OpRHS == CondRHS)
         return SplitOpsAndApply(DAG, Subtarget, DL, VT, { OpLHS, OpRHS },
                                 SUBUSBuilder);
 




More information about the llvm-commits mailing list