From: Simon Pilgrim Date: Fri, 5 Oct 2018 21:44:19 +0000 (+0000) Subject: [X86][AVX] Limit getFauxShuffleMask INSERT_SUBVECTOR support to 2 inputs X-Git-Tag: llvmorg-8.0.0-rc1~7126 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc97118efe3135cdaa4aa697e9f92ca6ea294fd3;p=platform%2Fupstream%2Fllvm.git [X86][AVX] Limit getFauxShuffleMask INSERT_SUBVECTOR support to 2 inputs rL343853 didn't limit the number of subinputs, but we don't currently support faux shuffles with more than 2 total inputs, so put a limiter in place until this is fixed. Found by Artem Dergachev. llvm-svn: 343891 --- diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index f63fd3e..4a6d16f 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -6414,7 +6414,8 @@ static bool getFauxShuffleMask(SDValue N, SmallVectorImpl &Mask, Mask[i + InsertIdx] = (NumElts * (1 + InputIdx)) + ExtractIdx + M; } } - return true; + // TODO - Add support for more than 1 subinput. + return Ops.size() <= 2; } case ISD::SCALAR_TO_VECTOR: { // Match against a scalar_to_vector of an extract from a vector,