summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-05-10 14:09:52 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-05-10 14:09:52 +0000
commita5d59333b350ddb512359a65cefd59ced5c49b57 (patch)
treebc300facaed5b9fde291ff9b0e6c75e40e482927 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentb8c38756180df345534d4c816f648a9d74760f42 (diff)
downloadbcm5719-llvm-a5d59333b350ddb512359a65cefd59ced5c49b57.tar.gz
bcm5719-llvm-a5d59333b350ddb512359a65cefd59ced5c49b57.zip
DAGCombiner: Generate a correct constant for vector types when folding (xor (and)) into (and (not)).
PR15948. llvm-svn: 181597
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 700ee12072c..c54dffbb132 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3464,8 +3464,7 @@ SDValue DAGCombiner::visitXOR(SDNode *N) {
if (N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() &&
N0->getOperand(1) == N1) {
SDValue X = N0->getOperand(0);
- SDValue NotX = DAG.getNode(ISD::XOR, X.getDebugLoc(), VT, X,
- DAG.getConstant(APInt::getAllOnesValue(VT.getSizeInBits()), VT));
+ SDValue NotX = DAG.getNOT(X.getDebugLoc(), X, VT);
AddToWorkList(NotX.getNode());
return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, NotX, N1);
}
OpenPOWER on IntegriCloud