[clang] [llvm] [AMDGPU] Add clang builtin for s_bitreplicate intrinsic (PR #206177)

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 27 08:24:53 PDT 2026


================
@@ -9,9 +9,11 @@ struct S {
   int x;
 };
 
-void test_gfx9_fmed3h(global half *out, half a, half b, half c)
+void test_gfx9_builtins(global half *out0, half a0, half b0, half c0,
+                        global unsigned long *out1, unsigned int a1)
 {
-  *out = __builtin_amdgcn_fmed3h(a, b, c); // expected-error {{'__builtin_amdgcn_fmed3h' needs target feature gfx9-insts}}
+  *out0 = __builtin_amdgcn_fmed3h(a0, b0, c0); // expected-error {{'__builtin_amdgcn_fmed3h' needs target feature gfx9-insts}}
+  *out1 = __builtin_amdgcn_s_bitreplicate(a1); // expected-error {{'__builtin_amdgcn_s_bitreplicate' needs target feature gfx9-insts}}
----------------
shiltian wrote:

Need negative tests.

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


More information about the cfe-commits mailing list