diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-01-10 04:12:19 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-01-10 04:12:19 +0000 |
commit | d915d6ba57d144ddc765abfb056ee03223f6eac9 (patch) | |
tree | b9797ee427b653f9e60bf8c726f4e5ca3338d8c7 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | f45ecd6eb7f195c1840ba5d51c4c6af9cc1be2a8 (diff) | |
download | bcm5719-llvm-d915d6ba57d144ddc765abfb056ee03223f6eac9.tar.gz bcm5719-llvm-d915d6ba57d144ddc765abfb056ee03223f6eac9.zip |
[DAGCombiner] Remove code for optimizing select (xor Cond, 0), X, Y -> select Cond, X, Y. Just let combine on the xor itself take care of it.
llvm-svn: 291534
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 4632484055d..5a30c85ec8c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -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); } } } |