diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2011-10-14 23:58:49 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2011-10-14 23:58:49 +0000 |
| commit | 74d1da5a050592db3b17a68b1f4a0eacbfe90db2 (patch) | |
| tree | 82e29cb80e2495a573ccb6e33713e9a053f5fa14 /llvm/lib/Target | |
| parent | 9e0cd1ee17911cd9279ea49a3fdc6c383c5d30df (diff) | |
| download | bcm5719-llvm-74d1da5a050592db3b17a68b1f4a0eacbfe90db2.tar.gz bcm5719-llvm-74d1da5a050592db3b17a68b1f4a0eacbfe90db2.zip | |
Add missing correctness check to ARMTargetLowering::ReconstructShuffle. Fixes PR11129.
llvm-svn: 142022
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index f1000de429f..6ead63f5ca2 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -4057,6 +4057,14 @@ SDValue ARMTargetLowering::ReconstructShuffle(SDValue Op, // A shuffle can only come from building a vector from various // elements of other vectors. return SDValue(); + } else if (V.getOperand(0).getValueType().getVectorElementType() != + VT.getVectorElementType()) { + // This code doesn't know how to handle shuffles where the vector + // element types do not match (this happens because type legalization + // promotes the return type of EXTRACT_VECTOR_ELT). + // FIXME: It might be appropriate to extend this code to handle + // mismatched types. + return SDValue(); } // Record this extraction against the appropriate vector if possible... |

