diff options
| author | Jim Grosbach <grosbach@apple.com> | 2012-07-25 17:02:47 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2012-07-25 17:02:47 +0000 |
| commit | 6df755cc4ed600add9ccd70a24d588c8521a41e9 (patch) | |
| tree | 186bc72ec5bade770a769385898994761e18cd8b /llvm/lib/Target/ARM | |
| parent | c6fd3deee6e9b98a83a87a6243c3de2c8e2a5fdb (diff) | |
| download | bcm5719-llvm-6df755cc4ed600add9ccd70a24d588c8521a41e9.tar.gz bcm5719-llvm-6df755cc4ed600add9ccd70a24d588c8521a41e9.zip | |
ARM: Don't assume an SDNode is a constant.
Before accessing a node as a ConstandSDNode, make sure it actually is one.
No testcase of non-trivial size.
rdar://11948669
llvm-svn: 160735
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index 04370c095cd..9d8b7dff108 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -4271,6 +4271,10 @@ SDValue ARMTargetLowering::ReconstructShuffle(SDValue Op, // Record this extraction against the appropriate vector if possible... SDValue SourceVec = V.getOperand(0); + // If the element number isn't a constant, we can't effectively + // analyze what's going on. + if (!isa<ConstantSDNode>(V.getOperand(1))) + return SDValue(); unsigned EltNo = cast<ConstantSDNode>(V.getOperand(1))->getZExtValue(); bool FoundSource = false; for (unsigned j = 0; j < SourceVecs.size(); ++j) { |

