[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / clang / test / CodeGen / X86 / x86-inline-asm-min-vector-width.c
blob2fdfbf138180a30c25ec4121fcae014ba01f5440
1 // RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -emit-llvm -target-feature +avx512f -o - | FileCheck %s
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)));
7 // CHECK: define{{.*}} <2 x i64> @testXMMout(ptr noundef %p) #0
8 __m128i testXMMout(__m128i *p) {
9 __m128i xmm0;
10 __asm__("vmovdqu %1, %0" :"=v"(xmm0) : "m"(*(__m128i*)p));
11 return xmm0;
14 // CHECK: define{{.*}} <4 x i64> @testYMMout(ptr noundef %p) #1
15 __m256i testYMMout(__m256i *p) {
16 __m256i ymm0;
17 __asm__("vmovdqu %1, %0" :"=v"(ymm0) : "m"(*(__m256i*)p));
18 return ymm0;
21 // CHECK: define{{.*}} <8 x i64> @testZMMout(ptr noundef %p) #2
22 __m512i testZMMout(__m512i *p) {
23 __m512i zmm0;
24 __asm__("vmovdqu64 %1, %0" :"=v"(zmm0) : "m"(*(__m512i*)p));
25 return zmm0;
28 // CHECK: define{{.*}} void @testXMMin(<2 x i64> noundef %xmm0, ptr noundef %p) #0
29 void testXMMin(__m128i xmm0, __m128i *p) {
30 __asm__("vmovdqu %0, %1" : : "v"(xmm0), "m"(*(__m128i*)p));
33 // CHECK: define{{.*}} void @testYMMin(<4 x i64> noundef %ymm0, ptr noundef %p) #1
34 void testYMMin(__m256i ymm0, __m256i *p) {
35 __asm__("vmovdqu %0, %1" : : "v"(ymm0), "m"(*(__m256i*)p));
38 // CHECK: define{{.*}} void @testZMMin(<8 x i64> noundef %zmm0, ptr noundef %p) #2
39 void testZMMin(__m512i zmm0, __m512i *p) {
40 __asm__("vmovdqu64 %0, %1" : : "v"(zmm0), "m"(*(__m512i*)p));
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"