[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP
Vikram Hegde via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 7 21:43:06 PDT 2023
vikramRH added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp:386-387
+ } else {
+ auto IntTy = dyn_cast<IntegerType>(Args[i]->getType());
+ if (IntTy && IntTy->getBitWidth() == 32)
+ WhatToStore.push_back(
----------------
arsenm wrote:
> vikramRH wrote:
> > arsenm wrote:
> > > isIntegerTy(32).
> > >
> > > I also do not understand why only 32-bit integers would be promoted to 64-bit (or why this would be zext). This doesn't match varargs ABI handling, where everything smaller would be promoted to i32.
> > Right, But default promotions would have happened already, this additional promotion is due to runtime processing requirement
> Is this documented somewhere? If it's promote everything to i64, I'd prefer to handle all types rather than special casing 32
That's precisely what the function "fitArgInto64Bits()" did. We eliminated it due to some redundant instructions generated. int32 was the only case (apart from float16 now) that required this special casting.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150427/new/
https://reviews.llvm.org/D150427
More information about the llvm-commits
mailing list