aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-12-17 00:40:05 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-12-17 00:40:05 +0000
commit4c2b001f1359d10807c89ff0480e8799a1adbe96 (patch)
tree80f8239550138faa647336bd6b6d0aacb5d36768 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentcaedfbc6ae4cf039721fcfdb6fb16b4e78002500 (diff)
Revert this dag combine change:
Fold (zext (and x, cst)) -> (and (zext x), cst) DAG combiner likes to optimize expression in the other way so this would end up cause an infinite looping. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91574 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 2b52187860..6cef23981c 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3202,19 +3202,6 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
X, DAG.getConstant(Mask, VT));
}
- // Fold (zext (and x, cst)) -> (and (zext x), cst)
- if (N0.getOpcode() == ISD::AND &&
- N0.getOperand(1).getOpcode() == ISD::Constant &&
- N0.getOperand(0).getOpcode() != ISD::TRUNCATE &&
- N0.getOperand(0).hasOneUse()) {
- APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
- Mask.zext(VT.getSizeInBits());
- return DAG.getNode(ISD::AND, N->getDebugLoc(), VT,
- DAG.getNode(ISD::ZERO_EXTEND, N->getDebugLoc(), VT,
- N0.getOperand(0)),
- DAG.getConstant(Mask, VT));
- }
-
// fold (zext (load x)) -> (zext (truncate (zextload x)))
if (ISD::isNON_EXTLoad(N0.getNode()) &&
((!LegalOperations && !cast<LoadSDNode>(N0)->isVolatile()) ||