summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/x86_64-arguments-avx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/x86_64-arguments-avx.cpp')
-rw-r--r--test/CodeGenCXX/x86_64-arguments-avx.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/CodeGenCXX/x86_64-arguments-avx.cpp b/test/CodeGenCXX/x86_64-arguments-avx.cpp
index 1b1c6420636e0..29e693451d128 100644
--- a/test/CodeGenCXX/x86_64-arguments-avx.cpp
+++ b/test/CodeGenCXX/x86_64-arguments-avx.cpp
@@ -13,3 +13,40 @@ PR22753 test(PR22753 x) {
return x;
}
}
+
+namespace test2 {
+typedef double __m128d __attribute__((__vector_size__(16)));
+typedef float __m128 __attribute__((__vector_size__(16)));
+typedef double __m256d __attribute__((__vector_size__(32)));
+typedef float __m256 __attribute__((__vector_size__(32)));
+
+union U1 {
+ __m128 v1;
+ __m128d v2;
+};
+
+union UU1 {
+ union U1;
+ __m128d v3;
+};
+
+// CHECK: define <2 x double> @_ZN5test27PR23082ENS_3UU1E(<2 x double>
+UU1 PR23082(UU1 x) {
+ return x;
+}
+
+union U2 {
+ __m256 v1;
+ __m256d v2;
+};
+
+union UU2 {
+ union U2;
+ __m256d v3;
+};
+
+// CHECK: define <4 x double> @_ZN5test27PR23082ENS_3UU2E(<4 x double>
+UU2 PR23082(UU2 x) {
+ return x;
+}
+}