forked from OSchip/llvm-project
[X86] Use the pointer VT for the Scale node when lowering x86 gather/scatter intrinsics.
This is consistent with the target independent intrinsic handling. Not sure this really matters since we just pull the constant out using getZExtValue later. llvm-svn: 367736
This commit is contained in:
parent
37d24a696b
commit
45ea25289d
|
@ -23314,7 +23314,9 @@ static SDValue getAVX2GatherNode(unsigned Opc, SDValue Op, SelectionDAG &DAG,
|
|||
// Scale must be constant.
|
||||
if (!C)
|
||||
return SDValue();
|
||||
SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl, MVT::i8);
|
||||
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
|
||||
SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl,
|
||||
TLI.getPointerTy(DAG.getDataLayout()));
|
||||
EVT MaskVT = Mask.getValueType().changeVectorElementTypeToInteger();
|
||||
SDVTList VTs = DAG.getVTList(Op.getValueType(), MaskVT, MVT::Other);
|
||||
// If source is undef or we know it won't be used, use a zero vector
|
||||
|
@ -23341,7 +23343,9 @@ static SDValue getGatherNode(SDValue Op, SelectionDAG &DAG,
|
|||
// Scale must be constant.
|
||||
if (!C)
|
||||
return SDValue();
|
||||
SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl, MVT::i8);
|
||||
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
|
||||
SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl,
|
||||
TLI.getPointerTy(DAG.getDataLayout()));
|
||||
unsigned MinElts = std::min(Index.getSimpleValueType().getVectorNumElements(),
|
||||
VT.getVectorNumElements());
|
||||
MVT MaskVT = MVT::getVectorVT(MVT::i1, MinElts);
|
||||
|
@ -23375,7 +23379,9 @@ static SDValue getScatterNode(unsigned Opc, SDValue Op, SelectionDAG &DAG,
|
|||
// Scale must be constant.
|
||||
if (!C)
|
||||
return SDValue();
|
||||
SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl, MVT::i8);
|
||||
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
|
||||
SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl,
|
||||
TLI.getPointerTy(DAG.getDataLayout()));
|
||||
unsigned MinElts = std::min(Index.getSimpleValueType().getVectorNumElements(),
|
||||
Src.getSimpleValueType().getVectorNumElements());
|
||||
MVT MaskVT = MVT::getVectorVT(MVT::i1, MinElts);
|
||||
|
@ -23403,7 +23409,9 @@ static SDValue getPrefetchNode(unsigned Opc, SDValue Op, SelectionDAG &DAG,
|
|||
// Scale must be constant.
|
||||
if (!C)
|
||||
return SDValue();
|
||||
SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl, MVT::i8);
|
||||
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
|
||||
SDValue Scale = DAG.getTargetConstant(C->getZExtValue(), dl,
|
||||
TLI.getPointerTy(DAG.getDataLayout()));
|
||||
SDValue Disp = DAG.getTargetConstant(0, dl, MVT::i32);
|
||||
SDValue Segment = DAG.getRegister(0, MVT::i32);
|
||||
MVT MaskVT =
|
||||
|
|
Loading…
Reference in New Issue