From 300b39cdac57e0ab8009eaead62af9f8b3671fa6 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 17 Jun 2019 23:08:09 +0000 Subject: [PATCH] [X86] Make an assert in LowerSCALAR_TO_VECTOR stricter to make it clear what types are allowed here. NFC Make it clear that only integer type with i32 or smaller elements shoudl get to this part of the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363629 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 42fcb5e92e9..ddcf6896292 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -17175,7 +17175,8 @@ static SDValue LowerSCALAR_TO_VECTOR(SDValue Op, const X86Subtarget &Subtarget, // Insert the 128-bit vector. return insert128BitVector(DAG.getUNDEF(OpVT), Op, 0, DAG, dl); } - assert(OpVT.is128BitVector() && "Expected an SSE type!"); + assert(OpVT.is128BitVector() && OpVT.isInteger() && OpVT != MVT::v2i64 && + "Expected an SSE type!"); // Pass through a v4i32 SCALAR_TO_VECTOR as that's what we use in tblgen. if (OpVT == MVT::v4i32) -- 2.40.0