forked from OSchip/llvm-project
[X86] Remove a branch on SSE4.1 from LowerLoad
We should be able to use getExtendInVec with or without sse4.1 to produce a SIGN_EXTEND_VECTOR_INREG. llvm-svn: 347095
This commit is contained in:
parent
9e97054211
commit
567aaeb40d
|
@ -20327,20 +20327,8 @@ static SDValue LowerLoad(SDValue Op, const X86Subtarget &Subtarget,
|
|||
unsigned SizeRatio = RegSz / MemSz;
|
||||
|
||||
if (Ext == ISD::SEXTLOAD) {
|
||||
// If we have SSE4.1, we can directly emit a sext/sext_invec node.
|
||||
if (Subtarget.hasSSE41()) {
|
||||
SDValue Sext = getExtendInVec(/*Signed*/true, dl, RegVT, SlicedVec, DAG);
|
||||
return DAG.getMergeValues({Sext, TF}, dl);
|
||||
}
|
||||
|
||||
// Otherwise we'll use SIGN_EXTEND_VECTOR_INREG to sign extend the lowest
|
||||
// lanes.
|
||||
assert(TLI.isOperationLegalOrCustom(ISD::SIGN_EXTEND_VECTOR_INREG, RegVT) &&
|
||||
"We can't implement a sext load without SIGN_EXTEND_VECTOR_INREG!");
|
||||
|
||||
SDValue Shuff = DAG.getNode(ISD::SIGN_EXTEND_VECTOR_INREG, dl, RegVT,
|
||||
SlicedVec);
|
||||
return DAG.getMergeValues({Shuff, TF}, dl);
|
||||
SDValue Sext = getExtendInVec(/*Signed*/true, dl, RegVT, SlicedVec, DAG);
|
||||
return DAG.getMergeValues({Sext, TF}, dl);
|
||||
}
|
||||
|
||||
if (Ext == ISD::EXTLOAD && !Subtarget.hasBWI() && RegVT == MVT::v8i64 &&
|
||||
|
|
Loading…
Reference in New Issue