[PATCH] D111665: [CUDA] Provide address space conversion builtins.
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 12 13:59:44 PDT 2021
tra added a comment.
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
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