[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
Wed Jun 18 06:54:22 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:
Let me see if I'm on the same page now. The backend will generate code for gfx900 and the programmer will guard that block of code with `if (__builtin_amdgcn_processor_is("gfx900"))`. So if the predicate and the block it controls become disjointed somehow, the user can get incorrect behavior at runtime. Am I on the right track?
https://github.com/llvm/llvm-project/pull/134016
More information about the llvm-commits
mailing list