Skip to content

Commit 215aba7

Browse files
committed
[NVPTXLowerArgs] Use byval type
Instead of pointer element type.
1 parent 1795402 commit 215aba7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,8 @@ static void convertToParamAS(Value *OldUser, Value *Param) {
229229
void NVPTXLowerArgs::handleByValParam(Argument *Arg) {
230230
Function *Func = Arg->getParent();
231231
Instruction *FirstInst = &(Func->getEntryBlock().front());
232-
PointerType *PType = dyn_cast<PointerType>(Arg->getType());
233-
234-
assert(PType && "Expecting pointer type in handleByValParam");
235-
236-
Type *StructType = PType->getPointerElementType();
232+
Type *StructType = Arg->getParamByValType();
233+
assert(StructType && "Missing byval type");
237234

238235
auto IsALoadChain = [&](Value *Start) {
239236
SmallVector<Value *, 16> ValuesToCheck = {Start};

0 commit comments

Comments
 (0)