[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
Mon Sep 26 05:59:37 PDT 2022
ldrumm marked an inline comment as done and an inline comment as not done.
ldrumm added inline comments.
================
Comment at: llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp:1429
// Check if we have call alignment metadata
if (getAlign(*CI, Idx, Alignment))
return Align(Alignment);
----------------
tra wrote:
> Would we ever have an instruction other than `Call` which would also carry explicit alignment metadata?
allocas, loads, and stores, though I'm not sure if that's what you're asking. Could you expand a little on what you mean? The code here is only dealing with argument alignment so in isolation the answer is "no", but I have a feeling you might be hinting at something deeper ?
================
Comment at: llvm/lib/Target/NVPTX/NVPTXUtilities.cpp:328
+Function *getMaybeBitcastedCallee(const CallBase *CB) {
+ if (Function *DirectCallee = CB->getCalledFunction()) {
+ return DirectCallee;
----------------
tra wrote:
> Style nit: no braces for single-statement if bodies. https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
Yes. I actually prefer that style too. Too many competing style guides in my head!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134548/new/
https://reviews.llvm.org/D134548
More information about the llvm-commits
mailing list