[X86][AVX] SimplifyDemandedVectorEltsForTargetNode - use getBROADCAST_LOAD helper. NFCI.

Reduce width of X86ISD::SUBV_BROADCAST_LOAD node.
This commit is contained in:
Simon Pilgrim 2021-11-02 13:07:36 +00:00
parent 8ca666a280
commit e173631dd1
1 changed files with 5 additions and 9 deletions

View File

@ -40122,15 +40122,11 @@ bool X86TargetLowering::SimplifyDemandedVectorEltsForTargetNode(
SDLoc DL(Op);
EVT BcstVT = EVT::getVectorVT(*TLO.DAG.getContext(), VT.getScalarType(),
ExtSizeInBits / VT.getScalarSizeInBits());
SDVTList Tys = TLO.DAG.getVTList(BcstVT, MVT::Other);
SDValue Ops[] = {MemIntr->getOperand(0), MemIntr->getOperand(1)};
SDValue Bcst =
TLO.DAG.getMemIntrinsicNode(X86ISD::SUBV_BROADCAST_LOAD, DL, Tys,
Ops, MemVT, MemIntr->getMemOperand());
TLO.DAG.makeEquivalentMemoryOrdering(SDValue(MemIntr, 1),
Bcst.getValue(1));
return TLO.CombineTo(Op, insertSubVector(TLO.DAG.getUNDEF(VT), Bcst, 0,
TLO.DAG, DL, ExtSizeInBits));
if (SDValue BcstLd =
getBROADCAST_LOAD(Opc, DL, BcstVT, MemVT, MemIntr, 0, TLO.DAG))
return TLO.CombineTo(Op,
insertSubVector(TLO.DAG.getUNDEF(VT), BcstLd, 0,
TLO.DAG, DL, ExtSizeInBits));
}
break;
}