From c815f155373556f146b94a732d8720d7769a9c4b Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 12 Jan 2015 22:38:08 +0000 Subject: [PATCH] [X86][SSE] Minor regression fix for r225551 r225551 vector byte shuffle optimization caused an assertion as fully zeroable vectors can be produced under certain circumstances. This fix drops the assert and returns a zero vector where the assert would have failed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225718 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ISelLowering.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index f455700d5ad..c36bd52fc55 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -9652,7 +9652,6 @@ static SDValue lowerV16I8VectorShuffle(SDValue Op, SDValue V1, SDValue V2, V2InUse |= (ZeroMask != V2Idx); } } - assert((V1InUse || V2InUse) && "Shuffling to a zeroable vector"); if (V1InUse) V1 = DAG.getNode(X86ISD::PSHUFB, DL, MVT::v16i8, V1, @@ -9668,6 +9667,8 @@ static SDValue lowerV16I8VectorShuffle(SDValue Op, SDValue V1, SDValue V2, return V1; // Single inputs are easy. if (V2InUse) return V2; // Single inputs are easy. + // Shuffling to a zeroable vector. + return getZeroVector(MVT::v16i8, Subtarget, DAG, DL); } // There are special ways we can lower some single-element blends. -- 2.34.1