diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-03-12 02:05:05 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-03-12 02:05:05 +0000 |
commit | 0cec956d814123140759cd25fec8f07e65b43849 (patch) | |
tree | bf8d3d21fb3b555a5c6ee2d0ffb7e9c1877304eb /lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | d5f1627d2c6b96a3fc4dc3025043912fb7b00687 (diff) |
Total brain cramp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 4592971336..5a6077a3ca 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -1103,7 +1103,7 @@ SDOperand DAGCombiner::visitSUB(SDNode *N) { // fold (sub x, x) -> 0 if (N0 == N1) { - if (!AfterLegalize || !MVT::isVector(VT)) + if (AfterLegalize && ISD::isBuildVectorAllZeros(N0.Val)) // For example, zero vectors might be normalized to a particular vector // type to ensure they are CSE'd. Avoid issuing zero vector nodes of // *unexpected* type after legalization. |