diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2010-05-21 21:05:32 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2010-05-21 21:05:32 +0000 |
| commit | 9c38d5ce139e13148f4db86582463a313f53cdc0 (patch) | |
| tree | aa5d4b7edd47a48dd661a7481e61950f6d93b097 /lib/CodeGen | |
| parent | 4f6dae3022a364e3b152881ef065dbd3b1238fc0 (diff) | |
| download | external_llvm-9c38d5ce139e13148f4db86582463a313f53cdc0.zip external_llvm-9c38d5ce139e13148f4db86582463a313f53cdc0.tar.gz external_llvm-9c38d5ce139e13148f4db86582463a313f53cdc0.tar.bz2 | |
Change CodeGen/ARM/2009-11-02-NegativeLane.ll to use 16-bit vector elements
so that it will continue to test what it was meant to test when I commit a
separate change for better support of BUILD_VECTOR and VECTOR_SHUFFLE for Neon.
Fix a DAG combiner crash exposed by this test change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 0ea46af..d575e8a 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -6413,6 +6413,13 @@ SDValue DAGCombiner::SimplifyVBinOp(SDNode *N) { break; } + // If the vector element type is not legal, the BUILD_VECTOR operands + // are promoted and implicitly truncated. Make that explicit here. + if (LHSOp.getValueType() != EltType) + LHSOp = DAG.getNode(ISD::TRUNCATE, LHS.getDebugLoc(), EltType, LHSOp); + if (RHSOp.getValueType() != EltType) + RHSOp = DAG.getNode(ISD::TRUNCATE, RHS.getDebugLoc(), EltType, RHSOp); + SDValue FoldOp = DAG.getNode(N->getOpcode(), LHS.getDebugLoc(), EltType, LHSOp, RHSOp); if (FoldOp.getOpcode() != ISD::UNDEF && |
