[clang] [PowerPC] Align bcdsetsign Sema validation with other BCD builtins (PR #178121)

Aditi Medhane via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 3 22:47:09 PST 2026


================
@@ -12,6 +12,14 @@
   int i = 1;                        \
   float f = 1.0f;
 
+vector unsigned char test_bcdsetsign(void) {
+  DECL_COMMON_VARS
+  vector unsigned char res_a = __builtin_ppc_bcdsetsign(scalar, '\1'); // expected-error {{argument 0 must be of type '__vector unsigned char' (vector of 16 'unsigned char' values}}
+  vector unsigned char res_b = __builtin_ppc_bcdsetsign(vec, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
+  vector unsigned char res_c = __builtin_ppc_bcdsetsign(vec, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
----------------
AditiRM wrote:

done for `bcdsetsign`

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


More information about the cfe-commits mailing list