[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 17 10:19:19 PDT 2025
================
@@ -9102,6 +9102,15 @@ bool InitializationSequence::Diagnose(Sema &S,
case FK_ConversionFailed: {
QualType FromType = OnlyArg->getType();
+ // __amdgpu_feature_predicate_t can be explicitly cast to the logical op
+ // type, although this is almost always an error and we advise against it
----------------
AaronBallman wrote:
I think I'm still missing something. If
```
if (__builtin_amdgcn_processor_is("gfx900"))
ps.push_back(true);
```
works.... why would
```
ps.push_back(__builtin_amdgcn_processor_is("gfx900"));
```
be dangerous?
> but is not something we can support in the limit (once it's buried under 5 additional layers of indirection, at -O0 etc.)
Why would optimization modes matter?
Apologies if these are dumb questions on my part. :-)
https://github.com/llvm/llvm-project/pull/134016
More information about the llvm-commits
mailing list