Skip to content

Commit 3223d41

Browse files
committed
[X86] Fix lowering to illegal type in LowerINSERT_VECTOR_ELT
Differential Revision: https://reviews.llvm.org/D106780
1 parent 3dca839 commit 3223d41

File tree

2 files changed

+576
-14
lines changed

2 files changed

+576
-14
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18970,6 +18970,9 @@ SDValue X86TargetLowering::LowerINSERT_VECTOR_ELT(SDValue Op,
1897018970

1897118971
MVT IdxSVT = MVT::getIntegerVT(EltSizeInBits);
1897218972
MVT IdxVT = MVT::getVectorVT(IdxSVT, NumElts);
18973+
if (!isTypeLegal(IdxSVT) || !isTypeLegal(IdxVT))
18974+
return SDValue();
18975+
1897318976
SDValue IdxExt = DAG.getZExtOrTrunc(N2, dl, IdxSVT);
1897418977
SDValue IdxSplat = DAG.getSplatBuildVector(IdxVT, dl, IdxExt);
1897518978
SDValue EltSplat = DAG.getSplatBuildVector(VT, dl, N1);

0 commit comments

Comments
 (0)