[llvm] [NVPTX] Improve device function byval parameter lowering (PR #129188)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 11:57:47 PST 2025
================
@@ -411,15 +411,9 @@ static void adjustByValArgAlignment(Argument *Arg, Value *ArgInParamAS,
for (User *CurUser : Ctx.InitialVal->users()) {
if (auto *I = dyn_cast<LoadInst>(CurUser)) {
Loads.push_back({I, Ctx.Offset});
- continue;
- }
-
- if (auto *I = dyn_cast<BitCastInst>(CurUser)) {
- Worklist.push({I, Ctx.Offset});
- continue;
- }
-
- if (auto *I = dyn_cast<GetElementPtrInst>(CurUser)) {
+ } else if (isa<BitCastInst>(CurUser) || isa<AddrSpaceCastInst>(CurUser)) {
+ Worklist.push({cast<Instruction>(CurUser), Ctx.Offset});
+ } else if (auto *I = dyn_cast<GetElementPtrInst>(CurUser)) {
----------------
Artem-B wrote:
Now that all `continue` are gone, we don't need `{}` around single-statement blocks either.
https://github.com/llvm/llvm-project/pull/129188
More information about the llvm-commits
mailing list