[X86] Use getOnesVector instead of using DAG.getConstant(-1).

llvm-svn: 311840
This commit is contained in:
Craig Topper 2017-08-27 03:26:04 +00:00
parent 13624cf980
commit 71dab64a57
1 changed files with 1 additions and 1 deletions

View File

@ -14412,7 +14412,7 @@ SDValue X86TargetLowering::LowerINSERT_VECTOR_ELT(SDValue Op,
for (unsigned i = 0; i != NumElts; ++i)
BlendMask.push_back(i == IdxVal ? i + NumElts : i);
SDValue CstVector = IsZeroElt ? getZeroVector(VT, Subtarget, DAG, dl)
: DAG.getConstant(-1, dl, VT);
: getOnesVector(VT, DAG, dl);
return DAG.getVectorShuffle(VT, dl, N0, CstVector, BlendMask);
}