1
1
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
- ; RUN: llc < %s -mtriple=aarch64 -mattr=+v8.2a,+fullfp16 | FileCheck %s
2
+ ; RUN: llc < %s -mtriple=aarch64 -global-isel=0 -mattr=+v8.2a,+fullfp16 | FileCheck %s --check-prefixes=CHECK,SDISEL
3
+ ; RUN: llc < %s -mtriple=aarch64 -global-isel=1 -mattr=+v8.2a,+fullfp16 | FileCheck %s --check-prefixes=CHECK,GISEL
3
4
4
5
declare i64 @llvm.aarch64.neon.fcvtpu.i64.f16 (half )
5
6
declare i32 @llvm.aarch64.neon.fcvtpu.i32.f16 (half )
@@ -26,59 +27,94 @@ declare half @llvm.aarch64.neon.frecpx.f16(half)
26
27
declare half @llvm.aarch64.neon.frecpe.f16 (half )
27
28
28
29
define dso_local i16 @t2 (half %a ) {
29
- ; CHECK-LABEL: t2:
30
- ; CHECK: // %bb.0: // %entry
31
- ; CHECK-NEXT: fcmp h0, #0.0
32
- ; CHECK-NEXT: csetm w0, eq
33
- ; CHECK-NEXT: ret
30
+ ; SDISEL-LABEL: t2:
31
+ ; SDISEL: // %bb.0: // %entry
32
+ ; SDISEL-NEXT: fcmp h0, #0.0
33
+ ; SDISEL-NEXT: csetm w0, eq
34
+ ; SDISEL-NEXT: ret
35
+ ;
36
+ ; GISEL-LABEL: t2:
37
+ ; GISEL: // %bb.0: // %entry
38
+ ; GISEL-NEXT: fcmp h0, #0.0
39
+ ; GISEL-NEXT: cset w8, eq
40
+ ; GISEL-NEXT: sbfx w0, w8, #0, #1
41
+ ; GISEL-NEXT: ret
34
42
entry:
35
43
%0 = fcmp oeq half %a , 0xH0000
36
44
%vceqz = sext i1 %0 to i16
37
45
ret i16 %vceqz
38
46
}
39
47
40
48
define dso_local i16 @t3 (half %a ) {
41
- ; CHECK-LABEL: t3:
42
- ; CHECK: // %bb.0: // %entry
43
- ; CHECK-NEXT: fcmp h0, #0.0
44
- ; CHECK-NEXT: csetm w0, ge
45
- ; CHECK-NEXT: ret
49
+ ; SDISEL-LABEL: t3:
50
+ ; SDISEL: // %bb.0: // %entry
51
+ ; SDISEL-NEXT: fcmp h0, #0.0
52
+ ; SDISEL-NEXT: csetm w0, ge
53
+ ; SDISEL-NEXT: ret
54
+ ;
55
+ ; GISEL-LABEL: t3:
56
+ ; GISEL: // %bb.0: // %entry
57
+ ; GISEL-NEXT: fcmp h0, #0.0
58
+ ; GISEL-NEXT: cset w8, ge
59
+ ; GISEL-NEXT: sbfx w0, w8, #0, #1
60
+ ; GISEL-NEXT: ret
46
61
entry:
47
62
%0 = fcmp oge half %a , 0xH0000
48
63
%vcgez = sext i1 %0 to i16
49
64
ret i16 %vcgez
50
65
}
51
66
52
67
define dso_local i16 @t4 (half %a ) {
53
- ; CHECK-LABEL: t4:
54
- ; CHECK: // %bb.0: // %entry
55
- ; CHECK-NEXT: fcmp h0, #0.0
56
- ; CHECK-NEXT: csetm w0, gt
57
- ; CHECK-NEXT: ret
68
+ ; SDISEL-LABEL: t4:
69
+ ; SDISEL: // %bb.0: // %entry
70
+ ; SDISEL-NEXT: fcmp h0, #0.0
71
+ ; SDISEL-NEXT: csetm w0, gt
72
+ ; SDISEL-NEXT: ret
73
+ ;
74
+ ; GISEL-LABEL: t4:
75
+ ; GISEL: // %bb.0: // %entry
76
+ ; GISEL-NEXT: fcmp h0, #0.0
77
+ ; GISEL-NEXT: cset w8, gt
78
+ ; GISEL-NEXT: sbfx w0, w8, #0, #1
79
+ ; GISEL-NEXT: ret
58
80
entry:
59
81
%0 = fcmp ogt half %a , 0xH0000
60
82
%vcgtz = sext i1 %0 to i16
61
83
ret i16 %vcgtz
62
84
}
63
85
64
86
define dso_local i16 @t5 (half %a ) {
65
- ; CHECK-LABEL: t5:
66
- ; CHECK: // %bb.0: // %entry
67
- ; CHECK-NEXT: fcmp h0, #0.0
68
- ; CHECK-NEXT: csetm w0, ls
69
- ; CHECK-NEXT: ret
87
+ ; SDISEL-LABEL: t5:
88
+ ; SDISEL: // %bb.0: // %entry
89
+ ; SDISEL-NEXT: fcmp h0, #0.0
90
+ ; SDISEL-NEXT: csetm w0, ls
91
+ ; SDISEL-NEXT: ret
92
+ ;
93
+ ; GISEL-LABEL: t5:
94
+ ; GISEL: // %bb.0: // %entry
95
+ ; GISEL-NEXT: fcmp h0, #0.0
96
+ ; GISEL-NEXT: cset w8, ls
97
+ ; GISEL-NEXT: sbfx w0, w8, #0, #1
98
+ ; GISEL-NEXT: ret
70
99
entry:
71
100
%0 = fcmp ole half %a , 0xH0000
72
101
%vclez = sext i1 %0 to i16
73
102
ret i16 %vclez
74
103
}
75
104
76
105
define dso_local i16 @t6 (half %a ) {
77
- ; CHECK-LABEL: t6:
78
- ; CHECK: // %bb.0: // %entry
79
- ; CHECK-NEXT: fcmp h0, #0.0
80
- ; CHECK-NEXT: csetm w0, mi
81
- ; CHECK-NEXT: ret
106
+ ; SDISEL-LABEL: t6:
107
+ ; SDISEL: // %bb.0: // %entry
108
+ ; SDISEL-NEXT: fcmp h0, #0.0
109
+ ; SDISEL-NEXT: csetm w0, mi
110
+ ; SDISEL-NEXT: ret
111
+ ;
112
+ ; GISEL-LABEL: t6:
113
+ ; GISEL: // %bb.0: // %entry
114
+ ; GISEL-NEXT: fcmp h0, #0.0
115
+ ; GISEL-NEXT: cset w8, mi
116
+ ; GISEL-NEXT: sbfx w0, w8, #0, #1
117
+ ; GISEL-NEXT: ret
82
118
entry:
83
119
%0 = fcmp olt half %a , 0xH0000
84
120
%vcltz = sext i1 %0 to i16
@@ -136,10 +172,15 @@ entry:
136
172
}
137
173
138
174
define dso_local i16 @t16 (half %a ) {
139
- ; CHECK-LABEL: t16:
140
- ; CHECK: // %bb.0: // %entry
141
- ; CHECK-NEXT: fcvtzs w0, h0
142
- ; CHECK-NEXT: ret
175
+ ; SDISEL-LABEL: t16:
176
+ ; SDISEL: // %bb.0: // %entry
177
+ ; SDISEL-NEXT: fcvtzs w0, h0
178
+ ; SDISEL-NEXT: ret
179
+ ;
180
+ ; GISEL-LABEL: t16:
181
+ ; GISEL: // %bb.0: // %entry
182
+ ; GISEL-NEXT: fcvtzu w0, h0
183
+ ; GISEL-NEXT: ret
143
184
entry:
144
185
%0 = fptoui half %a to i16
145
186
ret i16 %0
0 commit comments