https://github.com/AlexVlx commented:
> First, please take a look at the LLVM coding standard re the use of 'auto'.
>
> Second: The use of a special type for these builtins is a little novel
> (though I see the predicate type already exists?), but I guess I'm ok with
> it. I have some concerns with how the conversions for it work, particularly
> being represented always as an `i1`, but the tests you have look about right.
>
> I would like to see a test that is effectively:
>
> ```
> bool f() {
> return __builtin_amdgcn_processor_is(...);
> }
> ```
>
> (and maybe one returning 'auto' to make sure it is deduced properly).
Apologies, I missed this earlier, and only got around to adding them now.
Please do note that for cases where the function return type is `bool` one
cannot directly return a predicate value, as it does not get implicitly casted
to `bool`. This matches the behaviour of a type with an `explicit` conversion
operator, which is what we're modelling.
https://github.com/llvm/llvm-project/pull/134016
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits