1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -target-feature +avx | FileCheck %s 2 3 namespace test1 { 4 typedef double __m256d __attribute__((__vector_size__(32))); 5 6 class PR22753 { 7 public: 8 __m256d data; 9 }; 10 11 // CHECK: define <4 x double> @_ZN5test14testENS_7PR22753E(<4 x double> test(PR22753 x)12PR22753 test(PR22753 x) { 13 return x; 14 } 15 } 16 17 namespace test2 { 18 typedef double __m128d __attribute__((__vector_size__(16))); 19 typedef float __m128 __attribute__((__vector_size__(16))); 20 typedef double __m256d __attribute__((__vector_size__(32))); 21 typedef float __m256 __attribute__((__vector_size__(32))); 22 23 union U1 { 24 __m128 v1; 25 __m128d v2; 26 }; 27 28 union UU1 { 29 union U1; 30 __m128d v3; 31 }; 32 33 // CHECK: define <2 x double> @_ZN5test27PR23082ENS_3UU1E(<2 x double> PR23082(UU1 x)34UU1 PR23082(UU1 x) { 35 return x; 36 } 37 38 union U2 { 39 __m256 v1; 40 __m256d v2; 41 }; 42 43 union UU2 { 44 union U2; 45 __m256d v3; 46 }; 47 48 // CHECK: define <4 x double> @_ZN5test27PR23082ENS_3UU2E(<4 x double> PR23082(UU2 x)49UU2 PR23082(UU2 x) { 50 return x; 51 } 52 } 53 54 namespace test3 { 55 union U { 56 __attribute__((__vector_size__(32))) float f1; 57 int f2; 58 }; 59 // CHECK: define i32 @_ZN5test31fENS_1UE({{.*}}* byval align 32 f(U u)60int f(U u) { return u.f2; } 61 } 62