Skip to content

Commit

Permalink
[X86] Fix lowering to illegal type in LowerINSERT_VECTOR_ELT
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangzh1 committed Jul 28, 2021
1 parent 2f7511c commit 6ff73ef
Show file tree
Hide file tree
Showing 2 changed files with 576 additions and 14 deletions.
3 changes: 3 additions & 0 deletions llvm/lib/Target/X86/X86ISelLowering.cpp
Expand Up @@ -18970,6 +18970,9 @@ SDValue X86TargetLowering::LowerINSERT_VECTOR_ELT(SDValue Op,

MVT IdxSVT = MVT::getIntegerVT(EltSizeInBits);
MVT IdxVT = MVT::getVectorVT(IdxSVT, NumElts);
if (!isTypeLegal(IdxSVT) || !isTypeLegal(IdxVT))
return SDValue();

SDValue IdxExt = DAG.getZExtOrTrunc(N2, dl, IdxSVT);
SDValue IdxSplat = DAG.getSplatBuildVector(IdxVT, dl, IdxExt);
SDValue EltSplat = DAG.getSplatBuildVector(VT, dl, N1);
Expand Down

0 comments on commit 6ff73ef

Please sign in to comment.