comparison test/CodeGen/X86/avx512-mov.ll @ 33:e4204d083e25

LLVM 3.5
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 14:32:10 +0900
parents 95c75e76d11b
children 54457678186b
comparison
equal deleted inserted replaced
1:f783a2dd24b1 33:e4204d083e25
1 ; RUN: llc < %s -march=x86-64 -mtriple=x86_64-apple-darwin -mcpu=knl | FileCheck %s 1 ; RUN: llc < %s -march=x86-64 -mtriple=x86_64-apple-darwin -mcpu=knl --show-mc-encoding| FileCheck %s
2 2
3 ; CHECK-LABEL: @test1 3 ; CHECK-LABEL: @test1
4 ; CHECK: vmovdz %xmm0, %eax 4 ; CHECK: vmovd %xmm0, %eax ## encoding: [0x62
5 ; CHECK: ret 5 ; CHECK: ret
6 define i32 @test1(float %x) { 6 define i32 @test1(float %x) {
7 %res = bitcast float %x to i32 7 %res = bitcast float %x to i32
8 ret i32 %res 8 ret i32 %res
9 } 9 }
10 10
11 ; CHECK-LABEL: @test2 11 ; CHECK-LABEL: @test2
12 ; CHECK: vmovdz %edi 12 ; CHECK: vmovd %edi, %xmm0 ## encoding: [0x62
13 ; CHECK: ret 13 ; CHECK: ret
14 define <4 x i32> @test2(i32 %x) { 14 define <4 x i32> @test2(i32 %x) {
15 %res = insertelement <4 x i32>undef, i32 %x, i32 0 15 %res = insertelement <4 x i32>undef, i32 %x, i32 0
16 ret <4 x i32>%res 16 ret <4 x i32>%res
17 } 17 }
18 18
19 ; CHECK-LABEL: @test3 19 ; CHECK-LABEL: @test3
20 ; CHECK: vmovqz %rdi 20 ; CHECK: vmovq %rdi, %xmm0 ## encoding: [0x62
21 ; CHECK: ret 21 ; CHECK: ret
22 define <2 x i64> @test3(i64 %x) { 22 define <2 x i64> @test3(i64 %x) {
23 %res = insertelement <2 x i64>undef, i64 %x, i32 0 23 %res = insertelement <2 x i64>undef, i64 %x, i32 0
24 ret <2 x i64>%res 24 ret <2 x i64>%res
25 } 25 }
26 26
27 ; CHECK-LABEL: @test4 27 ; CHECK-LABEL: @test4
28 ; CHECK: vmovdz (%rdi) 28 ; CHECK: vmovd (%rdi), %xmm0 ## encoding: [0x62
29 ; CHECK: ret 29 ; CHECK: ret
30 define <4 x i32> @test4(i32* %x) { 30 define <4 x i32> @test4(i32* %x) {
31 %y = load i32* %x 31 %y = load i32* %x
32 %res = insertelement <4 x i32>undef, i32 %y, i32 0 32 %res = insertelement <4 x i32>undef, i32 %y, i32 0
33 ret <4 x i32>%res 33 ret <4 x i32>%res
34 } 34 }
35 35
36 ; CHECK-LABEL: @test5 36 ; CHECK-LABEL: @test5
37 ; CHECK: vmovssz %xmm0, (%rdi) 37 ; CHECK: vmovss %xmm0, (%rdi) ## encoding: [0x62
38 ; CHECK: ret 38 ; CHECK: ret
39 define void @test5(float %x, float* %y) { 39 define void @test5(float %x, float* %y) {
40 store float %x, float* %y, align 4 40 store float %x, float* %y, align 4
41 ret void 41 ret void
42 } 42 }
43 43
44 ; CHECK-LABEL: @test6 44 ; CHECK-LABEL: @test6
45 ; CHECK: vmovsdz %xmm0, (%rdi) 45 ; CHECK: vmovsd %xmm0, (%rdi) ## encoding: [0x62
46 ; CHECK: ret 46 ; CHECK: ret
47 define void @test6(double %x, double* %y) { 47 define void @test6(double %x, double* %y) {
48 store double %x, double* %y, align 8 48 store double %x, double* %y, align 8
49 ret void 49 ret void
50 } 50 }
51 51
52 ; CHECK-LABEL: @test7 52 ; CHECK-LABEL: @test7
53 ; CHECK: vmovssz (%rdi), %xmm0 53 ; CHECK: vmovss (%rdi), %xmm0 ## encoding: [0x62
54 ; CHECK: ret 54 ; CHECK: ret
55 define float @test7(i32* %x) { 55 define float @test7(i32* %x) {
56 %y = load i32* %x 56 %y = load i32* %x
57 %res = bitcast i32 %y to float 57 %res = bitcast i32 %y to float
58 ret float %res 58 ret float %res
59 } 59 }
60 60
61 ; CHECK-LABEL: @test8 61 ; CHECK-LABEL: @test8
62 ; CHECK: vmovdz %xmm0, %eax 62 ; CHECK: vmovd %xmm0, %eax ## encoding: [0x62
63 ; CHECK: ret 63 ; CHECK: ret
64 define i32 @test8(<4 x i32> %x) { 64 define i32 @test8(<4 x i32> %x) {
65 %res = extractelement <4 x i32> %x, i32 0 65 %res = extractelement <4 x i32> %x, i32 0
66 ret i32 %res 66 ret i32 %res
67 } 67 }
68 68
69 ; CHECK-LABEL: @test9 69 ; CHECK-LABEL: @test9
70 ; CHECK: vmovqz %xmm0, %rax 70 ; CHECK: vmovq %xmm0, %rax ## encoding: [0x62
71 ; CHECK: ret 71 ; CHECK: ret
72 define i64 @test9(<2 x i64> %x) { 72 define i64 @test9(<2 x i64> %x) {
73 %res = extractelement <2 x i64> %x, i32 0 73 %res = extractelement <2 x i64> %x, i32 0
74 ret i64 %res 74 ret i64 %res
75 } 75 }
76 76
77 ; CHECK-LABEL: @test10 77 ; CHECK-LABEL: @test10
78 ; CHECK: vmovdz (%rdi) 78 ; CHECK: vmovd (%rdi), %xmm0 ## encoding: [0x62
79 ; CHECK: ret 79 ; CHECK: ret
80 define <4 x i32> @test10(i32* %x) { 80 define <4 x i32> @test10(i32* %x) {
81 %y = load i32* %x, align 4 81 %y = load i32* %x, align 4
82 %res = insertelement <4 x i32>zeroinitializer, i32 %y, i32 0 82 %res = insertelement <4 x i32>zeroinitializer, i32 %y, i32 0
83 ret <4 x i32>%res 83 ret <4 x i32>%res
84 } 84 }
85 85
86 ; CHECK-LABEL: @test11 86 ; CHECK-LABEL: @test11
87 ; CHECK: vmovssz (%rdi) 87 ; CHECK: vmovss (%rdi), %xmm0 ## encoding: [0x62
88 ; CHECK: ret 88 ; CHECK: ret
89 define <4 x float> @test11(float* %x) { 89 define <4 x float> @test11(float* %x) {
90 %y = load float* %x, align 4 90 %y = load float* %x, align 4
91 %res = insertelement <4 x float>zeroinitializer, float %y, i32 0 91 %res = insertelement <4 x float>zeroinitializer, float %y, i32 0
92 ret <4 x float>%res 92 ret <4 x float>%res
93 } 93 }
94 94
95 ; CHECK-LABEL: @test12 95 ; CHECK-LABEL: @test12
96 ; CHECK: vmovsdz (%rdi) 96 ; CHECK: vmovsd (%rdi), %xmm0 ## encoding: [0x62
97 ; CHECK: ret 97 ; CHECK: ret
98 define <2 x double> @test12(double* %x) { 98 define <2 x double> @test12(double* %x) {
99 %y = load double* %x, align 8 99 %y = load double* %x, align 8
100 %res = insertelement <2 x double>zeroinitializer, double %y, i32 0 100 %res = insertelement <2 x double>zeroinitializer, double %y, i32 0
101 ret <2 x double>%res 101 ret <2 x double>%res
102 } 102 }
103 103
104 ; CHECK-LABEL: @test13 104 ; CHECK-LABEL: @test13
105 ; CHECK: vmovqz %rdi 105 ; CHECK: vmovq %rdi, %xmm0 ## encoding: [0x62
106 ; CHECK: ret 106 ; CHECK: ret
107 define <2 x i64> @test13(i64 %x) { 107 define <2 x i64> @test13(i64 %x) {
108 %res = insertelement <2 x i64>zeroinitializer, i64 %x, i32 0 108 %res = insertelement <2 x i64>zeroinitializer, i64 %x, i32 0
109 ret <2 x i64>%res 109 ret <2 x i64>%res
110 } 110 }
111 111
112 ; CHECK-LABEL: @test14 112 ; CHECK-LABEL: @test14
113 ; CHECK: vmovdz %edi 113 ; CHECK: vmovd %edi, %xmm0 ## encoding: [0x62
114 ; CHECK: ret 114 ; CHECK: ret
115 define <4 x i32> @test14(i32 %x) { 115 define <4 x i32> @test14(i32 %x) {
116 %res = insertelement <4 x i32>zeroinitializer, i32 %x, i32 0 116 %res = insertelement <4 x i32>zeroinitializer, i32 %x, i32 0
117 ret <4 x i32>%res 117 ret <4 x i32>%res
118 } 118 }
119 119
120 ; CHECK-LABEL: @test15 120 ; CHECK-LABEL: @test15
121 ; CHECK: vmovdz (%rdi) 121 ; CHECK: vmovd (%rdi), %xmm0 ## encoding: [0x62
122 ; CHECK: ret 122 ; CHECK: ret
123 define <4 x i32> @test15(i32* %x) { 123 define <4 x i32> @test15(i32* %x) {
124 %y = load i32* %x, align 4 124 %y = load i32* %x, align 4
125 %res = insertelement <4 x i32>zeroinitializer, i32 %y, i32 0 125 %res = insertelement <4 x i32>zeroinitializer, i32 %y, i32 0
126 ret <4 x i32>%res 126 ret <4 x i32>%res