[PATCH] D111665: [CUDA] Provide address space conversion builtins.
Johannes Doerfert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 12 16:05:15 PDT 2021
jdoerfert added a comment.
In D111665#3059690 <https://reviews.llvm.org/D111665#3059690>, @tra wrote:
> In D111665#3059427 <https://reviews.llvm.org/D111665#3059427>, @jdoerfert wrote:
>
>> Not loving the magic constants here but I don't think we have a enum or similar right now.
>
> Yup.
>
>> I also have to question the people that choose `size_t` here... we will end up with int2ptr(ptr2int(...)) IR everywhere if this is actually used (outside the asm uses in cuda).
>
> I guess size_t was 'good enough' to accommodate all pointer sizes (though it should've been `uintptr_t`).
>
> I think this chain of conversions gets quickly instcombined away even at `-O1`:
> E.g: https://godbolt.org/z/4vd94cEsj
Except when it doesn't get instcombined away: https://godbolt.org/z/YE4EfEPde
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111665/new/
https://reviews.llvm.org/D111665
More information about the cfe-commits
mailing list