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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to