forked from OSchip/llvm-project
[NVPTXISelLowering] Use byval IndirectType
Instead of the pointer element type.
This commit is contained in:
parent
54b8fa790e
commit
80267c8887
|
@ -1571,10 +1571,8 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
|
||||||
// ByVal arguments
|
// ByVal arguments
|
||||||
SmallVector<EVT, 16> VTs;
|
SmallVector<EVT, 16> VTs;
|
||||||
SmallVector<uint64_t, 16> Offsets;
|
SmallVector<uint64_t, 16> Offsets;
|
||||||
auto *PTy = dyn_cast<PointerType>(Args[i].Ty);
|
assert(Args[i].IndirectType && "byval arg must have indirect type");
|
||||||
assert(PTy && "Type of a byval parameter should be pointer");
|
ComputePTXValueVTs(*this, DL, Args[i].IndirectType, VTs, &Offsets, 0);
|
||||||
ComputePTXValueVTs(*this, DL, PTy->getPointerElementType(), VTs, &Offsets,
|
|
||||||
0);
|
|
||||||
|
|
||||||
// declare .param .align <align> .b8 .param<n>[<size>];
|
// declare .param .align <align> .b8 .param<n>[<size>];
|
||||||
unsigned sz = Outs[OIdx].Flags.getByValSize();
|
unsigned sz = Outs[OIdx].Flags.getByValSize();
|
||||||
|
|
Loading…
Reference in New Issue