1
- ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
2
- ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck -check-prefix=CHECK-SSE %s
1
+ ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx | FileCheck %s
3
2
3
+ ; CHECK-LABEL: A:
4
4
; CHECK-NOT: vunpck
5
5
; CHECK: vinsertf128 $1
6
6
define <8 x float > @A (<8 x float > %a ) nounwind uwtable readnone ssp {
9
9
ret <8 x float > %shuffle
10
10
}
11
11
12
+ ; CHECK-LABEL: B:
12
13
; CHECK-NOT: vunpck
13
14
; CHECK: vinsertf128 $1
14
15
define <4 x double > @B (<4 x double > %a ) nounwind uwtable readnone ssp {
@@ -22,7 +23,7 @@ declare <2 x double> @llvm.x86.sse2.min.pd(<2 x double>, <2 x double>) nounwind
22
23
declare <2 x double > @llvm.x86.sse2.min.sd (<2 x double >, <2 x double >) nounwind readnone
23
24
24
25
; Just check that no crash happens
25
- ; CHECK-SSE : _insert_crash
26
+ ; CHECK-LABEL : _insert_crash:
26
27
define void @insert_crash () nounwind {
27
28
allocas:
28
29
%v1.i.i451 = shufflevector <4 x double > zeroinitializer , <4 x double > undef , <4 x i32 > <i32 2 , i32 3 , i32 undef , i32 undef >
@@ -39,15 +40,15 @@ allocas:
39
40
40
41
;; DAG Combine must remove useless vinsertf128 instructions
41
42
42
- ; CHECK: DAGCombineA
43
+ ; CHECK-LABEL : DAGCombineA:
43
44
; CHECK-NOT: vinsertf128 $1
44
45
define <4 x i32 > @DAGCombineA (<4 x i32 > %v1 ) nounwind readonly {
45
46
%1 = shufflevector <4 x i32 > %v1 , <4 x i32 > undef , <8 x i32 > <i32 0 , i32 1 , i32 2 , i32 3 , i32 4 , i32 5 , i32 6 , i32 7 >
46
47
%2 = shufflevector <8 x i32 > %1 , <8 x i32 > undef , <4 x i32 > <i32 0 , i32 1 , i32 2 , i32 3 >
47
48
ret <4 x i32 > %2
48
49
}
49
50
50
- ; CHECK: DAGCombineB
51
+ ; CHECK-LABEL : DAGCombineB:
51
52
; CHECK: vpaddd %xmm
52
53
; CHECK-NOT: vinsertf128 $1
53
54
; CHECK: vpaddd %xmm
@@ -57,14 +58,7 @@ define <8 x i32> @DAGCombineB(<8 x i32> %v1, <8 x i32> %v2) nounwind readonly {
57
58
ret <8 x i32 > %2
58
59
}
59
60
60
- ; CHECK: insert_pd
61
- define <4 x double > @insert_pd (<4 x double > %a0 , <2 x double > %a1 ) {
62
- ; CHECK: vinsertf128
63
- %res = call <4 x double > @llvm.x86.avx.vinsertf128.pd.256 (<4 x double > %a0 , <2 x double > %a1 , i8 0 )
64
- ret <4 x double > %res
65
- }
66
-
67
- ; CHECK: insert_undef_pd
61
+ ; CHECK-LABEL: insert_undef_pd:
68
62
define <4 x double > @insert_undef_pd (<4 x double > %a0 , <2 x double > %a1 ) {
69
63
; CHECK: vmovaps %ymm1, %ymm0
70
64
%res = call <4 x double > @llvm.x86.avx.vinsertf128.pd.256 (<4 x double > undef , <2 x double > %a1 , i8 0 )
@@ -73,14 +67,7 @@ ret <4 x double> %res
73
67
declare <4 x double > @llvm.x86.avx.vinsertf128.pd.256 (<4 x double >, <2 x double >, i8 ) nounwind readnone
74
68
75
69
76
- ; CHECK: insert_ps
77
- define <8 x float > @insert_ps (<8 x float > %a0 , <4 x float > %a1 ) {
78
- ; CHECK: vinsertf128
79
- %res = call <8 x float > @llvm.x86.avx.vinsertf128.ps.256 (<8 x float > %a0 , <4 x float > %a1 , i8 0 )
80
- ret <8 x float > %res
81
- }
82
-
83
- ; CHECK: insert_undef_ps
70
+ ; CHECK-LABEL: insert_undef_ps:
84
71
define <8 x float > @insert_undef_ps (<8 x float > %a0 , <4 x float > %a1 ) {
85
72
; CHECK: vmovaps %ymm1, %ymm0
86
73
%res = call <8 x float > @llvm.x86.avx.vinsertf128.ps.256 (<8 x float > undef , <4 x float > %a1 , i8 0 )
@@ -89,14 +76,7 @@ ret <8 x float> %res
89
76
declare <8 x float > @llvm.x86.avx.vinsertf128.ps.256 (<8 x float >, <4 x float >, i8 ) nounwind readnone
90
77
91
78
92
- ; CHECK: insert_si
93
- define <8 x i32 > @insert_si (<8 x i32 > %a0 , <4 x i32 > %a1 ) {
94
- ; CHECK: vinsertf128
95
- %res = call <8 x i32 > @llvm.x86.avx.vinsertf128.si.256 (<8 x i32 > %a0 , <4 x i32 > %a1 , i8 0 )
96
- ret <8 x i32 > %res
97
- }
98
-
99
- ; CHECK: insert_undef_si
79
+ ; CHECK-LABEL: insert_undef_si:
100
80
define <8 x i32 > @insert_undef_si (<8 x i32 > %a0 , <4 x i32 > %a1 ) {
101
81
; CHECK: vmovaps %ymm1, %ymm0
102
82
%res = call <8 x i32 > @llvm.x86.avx.vinsertf128.si.256 (<8 x i32 > undef , <4 x i32 > %a1 , i8 0 )
@@ -105,7 +85,7 @@ ret <8 x i32> %res
105
85
declare <8 x i32 > @llvm.x86.avx.vinsertf128.si.256 (<8 x i32 >, <4 x i32 >, i8 ) nounwind readnone
106
86
107
87
; rdar://10643481
108
- ; CHECK: vinsertf128_combine
88
+ ; CHECK-LABEL : vinsertf128_combine:
109
89
define <8 x float > @vinsertf128_combine (float * nocapture %f ) nounwind uwtable readonly ssp {
110
90
; CHECK-NOT: vmovaps
111
91
; CHECK: vinsertf128
@@ -118,7 +98,7 @@ entry:
118
98
}
119
99
120
100
; rdar://11076953
121
- ; CHECK: vinsertf128_ucombine
101
+ ; CHECK-LABEL : vinsertf128_ucombine:
122
102
define <8 x float > @vinsertf128_ucombine (float * nocapture %f ) nounwind uwtable readonly ssp {
123
103
; CHECK-NOT: vmovups
124
104
; CHECK: vinsertf128
0 commit comments