================
@@ -0,0 +1,46 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +aes
-fsyntax-only -Wno-unused-value -verify %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +aes
-fsyntax-only -Wno-unused-value -mlong-double-128 -verify=quad %s
+// quad-no-diagnostics
+
+// GH173254
+typedef long double v16dl __attribute__ ((vector_size (16)));
+
+void foo(v16dl *a, v16dl *b) {
+ __builtin_ia32_aesenc128(*a, *b); // expected-error {{passing 'v16dl'
(vector of 1 'long double' value) to parameter of incompatible type
'__attribute__((__vector_size__(2 * sizeof(long long)))) long long' (vector of
2 'long long' values)}}
+}
+
+// GH63548
+typedef long double T __attribute__((vector_size(32)));
+
+T sum(T first, T second) { return first > second; } // expected-error
{{returning '__attribute__((__vector_size__(2 * sizeof(__int128)))) __int128'
(vector of 2 '__int128' values) from a function with incompatible result type
'T' (vector of 2 'long double' values)}}
+
+typedef double v16d __attribute__((vector_size(16)));
+typedef double v32d __attribute__((vector_size(32)));
+typedef long long v2ll __attribute__((vector_size(16)));
+typedef __int128 v1i128 __attribute__((vector_size(16)));
+
+v16d vector_cast(v16dl a) {
+ return (v16d)a; // expected-error {{invalid conversion between vector type
'v16d' (vector of 2 'double' values) and 'v16dl' (vector of 1 'long double'
value) of different size}}
----------------
akash-manna-sky wrote:
Added the test beteen `v16dl` and `v32d`.
https://github.com/llvm/llvm-project/pull/228192
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits