[clang] [Clang] Treat `ext_vector_type` as a regular type attribute (PR #130177)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 7 06:32:35 PST 2025


================
@@ -111,19 +111,15 @@ __device__ __bf16 test_call( __bf16 in) {
 // CHECK-NEXT:    ret void
 //
 __device__ void test_vec_assign() {
-  typedef __attribute__((ext_vector_type(2))) __bf16 bf16_x2;
-  bf16_x2 vec2_a, vec2_b;
+  __bf16 [[clang::ext_vector_type(2)]] vec2_a, vec2_b;
----------------
erichkeane wrote:

Would be nice to spell a pair of these the 'old' way as well (just as `__attribute__((ext_vector_type(2)))` to demonstrate that it works both ways).

https://github.com/llvm/llvm-project/pull/130177


More information about the cfe-commits mailing list