vec-move-23.ll
3.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s -check-prefixes=CHECK,Z14
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z15 | FileCheck %s -check-prefixes=CHECK,Z15
;
; Check that int-to-fp conversions from a narrower type get a vector extension.
define void @fun0(<2 x i8> %Src, <2 x double>* %Dst) {
; CHECK-LABEL: fun0:
; CHECK: vuphb %v0, %v24
; CHECK-NEXT: vuphh %v0, %v0
; CHECK-NEXT: vuphf %v0, %v0
; CHECK-NEXT: vcdgb %v0, %v0, 0, 0
; CHECK-NEXT: vst %v0, 0(%r2), 3
; CHECK-NEXT: br %r14
%c = sitofp <2 x i8> %Src to <2 x double>
store <2 x double> %c, <2 x double>* %Dst
ret void
}
define void @fun1(<2 x i16> %Src, <2 x double>* %Dst) {
; CHECK-LABEL: fun1:
; CHECK: vuphh %v0, %v24
; CHECK-NEXT: vuphf %v0, %v0
; CHECK-NEXT: vcdgb %v0, %v0, 0, 0
; CHECK-NEXT: vst %v0, 0(%r2), 3
; CHECK-NEXT: br %r14
%c = sitofp <2 x i16> %Src to <2 x double>
store <2 x double> %c, <2 x double>* %Dst
ret void
}
define void @fun2(<2 x i32> %Src, <2 x double>* %Dst) {
; CHECK-LABEL: fun2:
; CHECK: vuphf %v0, %v24
; CHECK-NEXT: vcdgb %v0, %v0, 0, 0
; CHECK-NEXT: vst %v0, 0(%r2), 3
; CHECK-NEXT: br %r14
%c = sitofp <2 x i32> %Src to <2 x double>
store <2 x double> %c, <2 x double>* %Dst
ret void
}
define void @fun3(<4 x i16> %Src, <4 x float>* %Dst) {
; CHECK-LABEL: fun3:
; Z14: vuphh %v0, %v24
; Z14-NEXT: vlgvf %r0, %v0, 3
; Z14-NEXT: cefbr %f1, %r0
; Z14-NEXT: vlgvf %r0, %v0, 2
; Z14-NEXT: cefbr %f2, %r0
; Z14-NEXT: vlgvf %r0, %v0, 1
; Z14-NEXT: vmrhf %v1, %v2, %v1
; Z14-NEXT: cefbr %f2, %r0
; Z14-NEXT: vlgvf %r0, %v0, 0
; Z14-NEXT: cefbr %f0, %r0
; Z14-NEXT: vmrhf %v0, %v0, %v2
; Z14-NEXT: vmrhg %v0, %v0, %v1
; Z14-NEXT: vst %v0, 0(%r2), 3
; Z14-NEXT: br %r14
; Z15: vuphh %v0, %v24
; Z15-NEXT: vcefb %v0, %v0, 0, 0
; Z15-NEXT: vst %v0, 0(%r2), 3
; Z15-NEXT: br %r14
%c = sitofp <4 x i16> %Src to <4 x float>
store <4 x float> %c, <4 x float>* %Dst
ret void
}
define void @fun4(<2 x i8> %Src, <2 x double>* %Dst) {
; CHECK-LABEL: fun4:
; CHECK: larl %r1, .LCPI4_0
; CHECK-NEXT: vl %v0, 0(%r1), 3
; CHECK-NEXT: vperm %v0, %v0, %v24, %v0
; CHECK-NEXT: vcdlgb %v0, %v0, 0, 0
; CHECK-NEXT: vst %v0, 0(%r2), 3
; CHECK-NEXT: br %r14
%c = uitofp <2 x i8> %Src to <2 x double>
store <2 x double> %c, <2 x double>* %Dst
ret void
}
define void @fun5(<2 x i16> %Src, <2 x double>* %Dst) {
; CHECK-LABEL: fun5:
; CHECK: larl %r1, .LCPI5_0
; CHECK-NEXT: vl %v0, 0(%r1), 3
; CHECK-NEXT: vperm %v0, %v0, %v24, %v0
; CHECK-NEXT: vcdlgb %v0, %v0, 0, 0
; CHECK-NEXT: vst %v0, 0(%r2), 3
; CHECK-NEXT: br %r14
%c = uitofp <2 x i16> %Src to <2 x double>
store <2 x double> %c, <2 x double>* %Dst
ret void
}
define void @fun6(<2 x i32> %Src, <2 x double>* %Dst) {
; CHECK-LABEL: fun6:
; CHECK: vuplhf %v0, %v24
; CHECK-NEXT: vcdlgb %v0, %v0, 0, 0
; CHECK-NEXT: vst %v0, 0(%r2), 3
; CHECK-NEXT: br %r14
%c = uitofp <2 x i32> %Src to <2 x double>
store <2 x double> %c, <2 x double>* %Dst
ret void
}
define void @fun7(<4 x i16> %Src, <4 x float>* %Dst) {
; CHECK-LABEL: fun7:
; Z14: vuplhh %v0, %v24
; Z14-NEXT: vlgvf %r0, %v0, 3
; Z14-NEXT: celfbr %f1, 0, %r0, 0
; Z14-NEXT: vlgvf %r0, %v0, 2
; Z14-NEXT: celfbr %f2, 0, %r0, 0
; Z14-NEXT: vlgvf %r0, %v0, 1
; Z14-NEXT: vmrhf %v1, %v2, %v1
; Z14-NEXT: celfbr %f2, 0, %r0, 0
; Z14-NEXT: vlgvf %r0, %v0, 0
; Z14-NEXT: celfbr %f0, 0, %r0, 0
; Z14-NEXT: vmrhf %v0, %v0, %v2
; Z14-NEXT: vmrhg %v0, %v0, %v1
; Z14-NEXT: vst %v0, 0(%r2), 3
; Z14-NEXT: br %r14
; Z15: vuplhh %v0, %v24
; Z15-NEXT: vcelfb %v0, %v0, 0, 0
; Z15-NEXT: vst %v0, 0(%r2), 3
; Z15-NEXT: br %r14
%c = uitofp <4 x i16> %Src to <4 x float>
store <4 x float> %c, <4 x float>* %Dst
ret void
}