Skip to content

Commit 80267c8

Browse files
committed
[NVPTXISelLowering] Use byval IndirectType
Instead of the pointer element type.
1 parent 54b8fa7 commit 80267c8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -1571,10 +1571,8 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
15711571
// ByVal arguments
15721572
SmallVector<EVT, 16> VTs;
15731573
SmallVector<uint64_t, 16> Offsets;
1574-
auto *PTy = dyn_cast<PointerType>(Args[i].Ty);
1575-
assert(PTy && "Type of a byval parameter should be pointer");
1576-
ComputePTXValueVTs(*this, DL, PTy->getPointerElementType(), VTs, &Offsets,
1577-
0);
1574+
assert(Args[i].IndirectType && "byval arg must have indirect type");
1575+
ComputePTXValueVTs(*this, DL, Args[i].IndirectType, VTs, &Offsets, 0);
15781576

15791577
// declare .param .align <align> .b8 .param<n>[<size>];
15801578
unsigned sz = Outs[OIdx].Flags.getByValSize();

0 commit comments

Comments
 (0)