diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2010-06-28 23:40:25 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2010-06-28 23:40:25 +0000 |
| commit | 269a89fd3af2e7332e99e8aae695633bd98c3ab8 (patch) | |
| tree | 21ea12381a2d3e2e2686917f4e31ce7991c608ea /llvm/lib/CodeGen | |
| parent | d200eda487647970a761b5b9db3706f552c87ba4 (diff) | |
| download | bcm5719-llvm-269a89fd3af2e7332e99e8aae695633bd98c3ab8.tar.gz bcm5719-llvm-269a89fd3af2e7332e99e8aae695633bd98c3ab8.zip | |
Unlike other targets, ARM now uses BUILD_VECTORs post-legalization so they
can't be changed arbitrarily by the DAGCombiner without checking if it is
running after legalization.
llvm-svn: 107097
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 d817c484334..ad9d85346a9 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -2322,7 +2322,8 @@ SDValue DAGCombiner::visitOR(SDNode *N) { } // fold (or x, undef) -> -1 - if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) { + if (!LegalOperations && + (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF)) { EVT EltVT = VT.isVector() ? VT.getVectorElementType() : VT; return DAG.getConstant(APInt::getAllOnesValue(EltVT.getSizeInBits()), VT); } |

