[X86] Use SelectionDAG::getNot instead of implementing manually. NFC
authorCraig Topper <craig.topper@intel.com>
Sat, 24 Feb 2018 03:15:54 +0000 (03:15 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 24 Feb 2018 03:15:54 +0000 (03:15 +0000)
llvm-svn: 326020

llvm/lib/Target/X86/X86ISelLowering.cpp

index 537434f..25e1ada 100644 (file)
@@ -31484,8 +31484,7 @@ combineVSelectWithAllOnesOrZeros(SDNode *N, SelectionDAG &DAG,
   if (TValIsAllZeros  && Subtarget.hasAVX512() && Cond.hasOneUse() &&
       CondVT.getVectorElementType() == MVT::i1) {
     // Invert the cond to not(cond) : xor(op,allones)=not(op)
-    SDValue CondNew = DAG.getNode(ISD::XOR, DL, CondVT, Cond,
-                                  DAG.getAllOnesConstant(DL, CondVT));
+    SDValue CondNew = DAG.getNOT(DL, Cond, CondVT);
     // Vselect cond, op1, op2 = Vselect not(cond), op2, op1
     return DAG.getSelect(DL, VT, CondNew, RHS, LHS);
   }