brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 2fdfbf1 Raw
46 lines · c
1// RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -emit-llvm -target-feature +avx512f -o - | FileCheck %s2 3typedef long long __m128i __attribute__ ((vector_size (16)));4typedef long long __m256i __attribute__ ((vector_size (32)));5typedef long long __m512i __attribute__ ((vector_size (64)));6 7// CHECK: define{{.*}} <2 x i64> @testXMMout(ptr noundef %p) #08__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(ptr noundef %p) #115__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(ptr noundef %p) #222__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, ptr noundef %p) #029void 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, ptr noundef %p) #134void 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, ptr noundef %p) #239void 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