1 // RUN: %clang_cc1 -no-opaque-pointers %s -triple x86_64-unknown-linux-gnu -emit-llvm -target-feature +avx512f -o - | FileCheck %s 2 3 typedef long long __m128i __attribute__ ((vector_size (16))); 4 typedef long long __m256i __attribute__ ((vector_size (32))); 5 typedef long long __m512i __attribute__ ((vector_size (64))); 6 7 // CHECK: define{{.*}} <2 x i64> @testXMMout(<2 x i64>* noundef %p) #0 8 __m128i testXMMout(__m128i *p) { 9 __m128i xmm0; 10 __asm__("vmovdqu %1, %0" :"=v"(xmm0) : "m"(*(__m128i*)p)); 11 return xmm0; 12 } 13 14 // CHECK: define{{.*}} <4 x i64> @testYMMout(<4 x i64>* noundef %p) #1 15 __m256i testYMMout(__m256i *p) { 16 __m256i ymm0; 17 __asm__("vmovdqu %1, %0" :"=v"(ymm0) : "m"(*(__m256i*)p)); 18 return ymm0; 19 } 20 21 // CHECK: define{{.*}} <8 x i64> @testZMMout(<8 x i64>* noundef %p) #2 22 __m512i testZMMout(__m512i *p) { 23 __m512i zmm0; 24 __asm__("vmovdqu64 %1, %0" :"=v"(zmm0) : "m"(*(__m512i*)p)); 25 return zmm0; 26 } 27 28 // CHECK: define{{.*}} void @testXMMin(<2 x i64> noundef %xmm0, <2 x i64>* noundef %p) #0 29 void testXMMin(__m128i xmm0, __m128i *p) { 30 __asm__("vmovdqu %0, %1" : : "v"(xmm0), "m"(*(__m128i*)p)); 31 } 32 33 // CHECK: define{{.*}} void @testYMMin(<4 x i64> noundef %ymm0, <4 x i64>* noundef %p) #1 34 void testYMMin(__m256i ymm0, __m256i *p) { 35 __asm__("vmovdqu %0, %1" : : "v"(ymm0), "m"(*(__m256i*)p)); 36 } 37 38 // CHECK: define{{.*}} void @testZMMin(<8 x i64> noundef %zmm0, <8 x i64>* noundef %p) #2 39 void testZMMin(__m512i zmm0, __m512i *p) { 40 __asm__("vmovdqu64 %0, %1" : : "v"(zmm0), "m"(*(__m512i*)p)); 41 } 42 43 // CHECK: attributes #0 = {{.*}}"min-legal-vector-width"="128" 44 // CHECK: attributes #1 = {{.*}}"min-legal-vector-width"="256" 45 // CHECK: attributes #2 = {{.*}}"min-legal-vector-width"="512" 46