[clang] [CIR][AMDGPU][SPIR-V] Support metadata intrinsic args for feature predicates (PR #229330)
Arseniy Obolenskiy via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 8 00:13:24 PDT 2026
aobolensk wrote:
> I have previously attempted to represent LLVM metadata at CIR level : #204190
>
> Adding discussion thread here [#204190 (comment)](https://github.com/llvm/llvm-project/pull/204190#issuecomment-4781548798) for reference.
>
> CC: @andykaylor
Thanks for your reply!
Ok, I see your point. Probably then we don't really need to invent anything generic as it is done in LLVM IR. How do you think on introduction of CIR target specific operations that were mentioned in the discussion you have shared?
For that specific case, that could be something like:
```mlir
%0 = cir.amdgcn.feature_predicate "is.gfx900"
```
I saw in the comment you shared, @andykaylor suggested something like that, but it didn't get any continuation, but in fact this idea could work out
The only thing that concerns me here is how do we introduce such operations, someone should decide on the convention or so. I haven't seen other CIR target specific ops that have already been defined (correct me if I'm wrong)
https://github.com/llvm/llvm-project/pull/229330
More information about the cfe-commits
mailing list