shiltian wrote:

> > Clang will insert addrspacecast unfortunately, so we at least need to 
> > support addrspacecast to generic. For example, there are tests in which we 
> > cast the named barrier GV to `void*`
> 
> That's a clang bug

Depending on how this new AS will be used and what the representation of the 
named barrier will look like at HIP level. If at HIP level it is a storage type 
instead of an address space modifier, like what __shared__ does, then in the 
following case:

```
__named_barrier__ bar[3];

use bar[idx] somewehre where AS15 is required
```

Clang will generate an AS cast to flat, followed by a flat GEP, followed by a 
cast to AS15. This is not a bug. This is just how clang lowers things.

https://github.com/llvm/llvm-project/pull/195613
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to