From 30fdda8b5f91fa8fc63a59c8cf35892a05f116e4 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 16 Jan 2019 18:15:31 +0000 Subject: [PATCH] [X86] getFauxShuffleMask - bail for non-byte aligned shuffle types Remove the existing assertion and just return false for unexpected shuffle value types ( mainly....). Found while updating combineX86ShufflesRecursively to run within SimplifyDemandedVectorElts/SimplifyDemandedBits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351365 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ISelLowering.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index f0f5f6fc181..9e17f4c455a 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -6483,8 +6483,8 @@ static bool getFauxShuffleMask(SDValue N, SmallVectorImpl &Mask, unsigned NumElts = VT.getVectorNumElements(); unsigned NumSizeInBits = VT.getSizeInBits(); unsigned NumBitsPerElt = VT.getScalarSizeInBits(); - assert((NumBitsPerElt % 8) == 0 && (NumSizeInBits % 8) == 0 && - "Expected byte aligned value types"); + if ((NumBitsPerElt % 8) != 0 || (NumSizeInBits % 8) != 0) + return false; unsigned Opcode = N.getOpcode(); switch (Opcode) { -- 2.50.1