We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b68393 commit 6e62d01Copy full SHA for 6e62d01
clang/test/CodeGen/X86/avx-cxx-record.cpp
@@ -0,0 +1,23 @@
1
+// RUN: %clang %s -c -S -emit-llvm -O2 -march=x86-64-v3 -o - | FileCheck %s
2
+
3
+using UInt64x2 = unsigned long long __attribute__((__vector_size__(16), may_alias));
4
5
+template<int id>
6
+struct XMM1 {
7
+ UInt64x2 x;
8
+};
9
10
+struct XMM2 : XMM1<0>, XMM1<1> {
11
12
13
+// CHECK: define{{.*}} @_Z3foov({{.*}} [[ARG:%.*]]){{.*}}
14
+// CHECK-NEXT: entry:
15
+// CHECK-NEXT: store {{.*}}, ptr [[ARG]]{{.*}}
16
+// CHECK-NEXT: [[TMP1:%.*]] = getelementptr {{.*}}, ptr [[ARG]]{{.*}}
17
+// CHECK-NEXT: store {{.*}}, ptr [[TMP1]]{{.*}}
18
+XMM2 foo() {
19
+ XMM2 result;
20
+ ((XMM1<0>*)&result)->x = UInt64x2{1, 2};
21
+ ((XMM1<1>*)&result)->x = UInt64x2{3, 4};
22
+ return result;
23
+}
0 commit comments