From 74d1da5a050592db3b17a68b1f4a0eacbfe90db2 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 14 Oct 2011 23:58:49 +0000 Subject: Add missing correctness check to ARMTargetLowering::ReconstructShuffle. Fixes PR11129. llvm-svn: 142022 --- llvm/lib/Target/ARM/ARMISelLowering.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'llvm/lib/Target') 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... -- cgit v1.2.3