]> granicus.if.org Git - llvm/commitdiff
[DAGCombiner] Remove code for optimizing select (xor Cond, 0), X, Y -> select Cond...
authorCraig Topper <craig.topper@gmail.com>
Tue, 10 Jan 2017 04:12:19 +0000 (04:12 +0000)
committerCraig Topper <craig.topper@gmail.com>
Tue, 10 Jan 2017 04:12:19 +0000 (04:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291534 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 4632484055d2eecc47bce4de99fbc31d2d864172..5a30c85ec8cf07ae11eb3655a4ee10a8cbb1aca8 100644 (file)
@@ -5470,7 +5470,6 @@ SDValue DAGCombiner::visitSELECT(SDNode *N) {
   }
 
   // select (xor Cond, 1), X, Y -> select Cond, Y, X
-  // select (xor Cond, 0), X, Y -> selext Cond, X, Y
   if (VT0 == MVT::i1) {
     if (N0->getOpcode() == ISD::XOR) {
       if (auto *C = dyn_cast<ConstantSDNode>(N0->getOperand(1))) {
@@ -5478,9 +5477,6 @@ SDValue DAGCombiner::visitSELECT(SDNode *N) {
         if (C->isOne())
           return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(),
                              Cond0, N2, N1);
-        else
-          return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(),
-                             Cond0, N1, N2);
       }
     }
   }