[PATCH] D134548: [NVPTX] Fix a segfault for bitcasted calls with byval params
Luke Drummond via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 23 09:25:27 PDT 2022
ldrumm created this revision.
ldrumm added reviewers: jholewinski, kovdan01, tra.
Herald added subscribers: mattd, gchakrabarti, asavonic, hiraditya.
Herald added a project: All.
ldrumm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
`getFunctionParamOptimizedAlign` was being passed a null function
argument when getting the callee of a bitcasted function symbol. This is
because `CallBase::getCalledFunction` does not look through bitcasts.
There is already code to handle this case in
`NVPTXTargetLowering::getArgumentAlignment`, which is now hoisted into
an NVPTX util.
The alignment computation now gracefully handles computing alignment of
virtual functions with a check for null.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134548
Files:
llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
llvm/lib/Target/NVPTX/NVPTXUtilities.cpp
llvm/lib/Target/NVPTX/NVPTXUtilities.h
llvm/test/CodeGen/NVPTX/call_bitcast_byval.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134548.462515.patch
Type: text/x-patch
Size: 5056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220923/87d10700/attachment.bin>
More information about the llvm-commits
mailing list