diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2014-06-12 16:04:47 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2014-06-12 16:04:47 +0000 |
commit | 82a51defb68afcb3c9ce3a16133f7e45922ec6a5 (patch) | |
tree | 11c557ac03606b71ba844dc1cc5addae2c399ac3 /lib | |
parent | 5eba90a861ff19cc2c49c7074565541978cfc83f (diff) | |
download | llvm-82a51defb68afcb3c9ce3a16133f7e45922ec6a5.tar.gz llvm-82a51defb68afcb3c9ce3a16133f7e45922ec6a5.tar.bz2 llvm-82a51defb68afcb3c9ce3a16133f7e45922ec6a5.tar.xz |
Revert "SelectionDAG: Enable (and (setcc x), (setcc y)) -> (setcc (and x, y)) for vectors"
This reverts commit r210540, adds a testcase for the regression it
caused, and marks the R600 test it was supposed to fix as XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210792 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 3235e76914..0f5018484d 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -2758,24 +2758,24 @@ SDValue DAGCombiner::visitAND(SDNode *N) { ISD::CondCode Op0 = cast<CondCodeSDNode>(CC0)->get(); ISD::CondCode Op1 = cast<CondCodeSDNode>(CC1)->get(); - if (LR == RR && Op0 == Op1 && + if (LR == RR && isa<ConstantSDNode>(LR) && Op0 == Op1 && LL.getValueType().isInteger()) { // fold (and (seteq X, 0), (seteq Y, 0)) -> (seteq (or X, Y), 0) - if (TLI.isConstFalseVal(LR.getNode()) && Op1 == ISD::SETEQ) { + if (cast<ConstantSDNode>(LR)->isNullValue() && Op1 == ISD::SETEQ) { SDValue ORNode = DAG.getNode(ISD::OR, SDLoc(N0), LR.getValueType(), LL, RL); AddToWorkList(ORNode.getNode()); return DAG.getSetCC(SDLoc(N), VT, ORNode, LR, Op1); } // fold (and (seteq X, -1), (seteq Y, -1)) -> (seteq (and X, Y), -1) - if (TLI.isConstTrueVal(LR.getNode()) && Op1 == ISD::SETEQ) { + if (cast<ConstantSDNode>(LR)->isAllOnesValue() && Op1 == ISD::SETEQ) { SDValue ANDNode = DAG.getNode(ISD::AND, SDLoc(N0), LR.getValueType(), LL, RL); AddToWorkList(ANDNode.getNode()); return DAG.getSetCC(SDLoc(N), VT, ANDNode, LR, Op1); } // fold (and (setgt X, -1), (setgt Y, -1)) -> (setgt (or X, Y), -1) - if (TLI.isConstTrueVal(LR.getNode()) && Op1 == ISD::SETGT) { + if (cast<ConstantSDNode>(LR)->isAllOnesValue() && Op1 == ISD::SETGT) { SDValue ORNode = DAG.getNode(ISD::OR, SDLoc(N0), LR.getValueType(), LL, RL); AddToWorkList(ORNode.getNode()); |