diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-03-10 07:59:01 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-03-10 07:59:01 +0000 |
commit | 831ae495993a7a87d612f7b1cfeed82927e01d88 (patch) | |
tree | 94f361b4d85a03c22d30e2b5c99ec4c642db93f4 /llvm/lib/CodeGen | |
parent | f7c52a1d52f2fbb04f37d21496ed775469430ce8 (diff) | |
download | bcm5719-llvm-831ae495993a7a87d612f7b1cfeed82927e01d88.tar.gz bcm5719-llvm-831ae495993a7a87d612f7b1cfeed82927e01d88.zip |
Doh
llvm-svn: 48140
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 1b00855a671..3a8c46815c8 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -1102,12 +1102,13 @@ SDOperand DAGCombiner::visitSUB(SDNode *N) { } // fold (sub x, x) -> 0 - if (N0 == N1) + if (N0 == N1) { if (ISD::isBuildVectorAllZeros(N0.Val)) // Zero vectors might be normalized to a particular vector type to ensure // they are CSE'd. Return it as it is. return N0; return DAG.getConstant(0, N->getValueType(0)); + } // fold (sub c1, c2) -> c1-c2 if (N0C && N1C) return DAG.getNode(ISD::SUB, VT, N0, N1); |