1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=aarch64 %s -o - | FileCheck %s
3 define i32 @test_cchi(i64 %a) {
4 ; CHECK-LABEL: test_cchi:
5 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: subs x0, x0, #3
9 ; CHECK-NEXT: cset w0, hi
12 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@cchi},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
13 %asmresult1 = extractvalue { i64, i32 } %0, 1
14 %1 = icmp ult i32 %asmresult1, 2
15 tail call void @llvm.assume(i1 %1)
19 define i32 @test_cccs(i64 %a) {
20 ; CHECK-LABEL: test_cccs:
21 ; CHECK: // %bb.0: // %entry
23 ; CHECK-NEXT: subs x0, x0, #3
24 ; CHECK-NEXT: //NO_APP
25 ; CHECK-NEXT: cset w0, hs
28 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@cccs},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
29 %asmresult1 = extractvalue { i64, i32 } %0, 1
30 %1 = icmp ult i32 %asmresult1, 2
31 tail call void @llvm.assume(i1 %1)
35 define i32 @test_cclo(i64 %a) {
36 ; CHECK-LABEL: test_cclo:
37 ; CHECK: // %bb.0: // %entry
39 ; CHECK-NEXT: subs x0, x0, #3
40 ; CHECK-NEXT: //NO_APP
41 ; CHECK-NEXT: cset w0, lo
44 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@cclo},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
45 %asmresult1 = extractvalue { i64, i32 } %0, 1
46 %1 = icmp ult i32 %asmresult1, 2
47 tail call void @llvm.assume(i1 %1)
51 define i32 @test_ccls(i64 %a) {
52 ; CHECK-LABEL: test_ccls:
53 ; CHECK: // %bb.0: // %entry
55 ; CHECK-NEXT: subs x0, x0, #3
56 ; CHECK-NEXT: //NO_APP
57 ; CHECK-NEXT: cset w0, ls
60 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@ccls},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
61 %asmresult1 = extractvalue { i64, i32 } %0, 1
62 %1 = icmp ult i32 %asmresult1, 2
63 tail call void @llvm.assume(i1 %1)
67 define i32 @test_cccc(i64 %a) {
68 ; CHECK-LABEL: test_cccc:
69 ; CHECK: // %bb.0: // %entry
71 ; CHECK-NEXT: subs x0, x0, #3
72 ; CHECK-NEXT: //NO_APP
73 ; CHECK-NEXT: cset w0, lo
76 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@cccc},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
77 %asmresult1 = extractvalue { i64, i32 } %0, 1
78 %1 = icmp ult i32 %asmresult1, 2
79 tail call void @llvm.assume(i1 %1)
83 define i32 @test_cceq(i64 %a) {
84 ; CHECK-LABEL: test_cceq:
85 ; CHECK: // %bb.0: // %entry
87 ; CHECK-NEXT: subs x0, x0, #3
88 ; CHECK-NEXT: //NO_APP
89 ; CHECK-NEXT: cset w0, eq
92 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@cceq},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
93 %asmresult1 = extractvalue { i64, i32 } %0, 1
94 %1 = icmp ult i32 %asmresult1, 2
95 tail call void @llvm.assume(i1 %1)
99 define i32 @test_ccgt(i64 %a) {
100 ; CHECK-LABEL: test_ccgt:
101 ; CHECK: // %bb.0: // %entry
103 ; CHECK-NEXT: subs x0, x0, #3
104 ; CHECK-NEXT: //NO_APP
105 ; CHECK-NEXT: cset w0, gt
108 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@ccgt},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
109 %asmresult1 = extractvalue { i64, i32 } %0, 1
110 %1 = icmp ult i32 %asmresult1, 2
111 tail call void @llvm.assume(i1 %1)
115 define i32 @test_ccge(i64 %a) {
116 ; CHECK-LABEL: test_ccge:
117 ; CHECK: // %bb.0: // %entry
119 ; CHECK-NEXT: subs x0, x0, #3
120 ; CHECK-NEXT: //NO_APP
121 ; CHECK-NEXT: cset w0, ge
124 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@ccge},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
125 %asmresult1 = extractvalue { i64, i32 } %0, 1
126 %1 = icmp ult i32 %asmresult1, 2
127 tail call void @llvm.assume(i1 %1)
131 define i32 @test_cclt(i64 %a) {
132 ; CHECK-LABEL: test_cclt:
133 ; CHECK: // %bb.0: // %entry
135 ; CHECK-NEXT: subs x0, x0, #3
136 ; CHECK-NEXT: //NO_APP
137 ; CHECK-NEXT: cset w0, lt
140 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@cclt},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
141 %asmresult1 = extractvalue { i64, i32 } %0, 1
142 %1 = icmp ult i32 %asmresult1, 2
143 tail call void @llvm.assume(i1 %1)
147 define i32 @test_ccle(i64 %a) {
148 ; CHECK-LABEL: test_ccle:
149 ; CHECK: // %bb.0: // %entry
151 ; CHECK-NEXT: subs x0, x0, #3
152 ; CHECK-NEXT: //NO_APP
153 ; CHECK-NEXT: cset w0, le
156 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@ccle},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
157 %asmresult1 = extractvalue { i64, i32 } %0, 1
158 %1 = icmp ult i32 %asmresult1, 2
159 tail call void @llvm.assume(i1 %1)
163 define i32 @test_cchs(i64 %a) {
164 ; CHECK-LABEL: test_cchs:
165 ; CHECK: // %bb.0: // %entry
167 ; CHECK-NEXT: subs x0, x0, #3
168 ; CHECK-NEXT: //NO_APP
169 ; CHECK-NEXT: cset w0, hs
172 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@cchs},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
173 %asmresult1 = extractvalue { i64, i32 } %0, 1
174 %1 = icmp ult i32 %asmresult1, 2
175 tail call void @llvm.assume(i1 %1)
179 define i32 @test_ccne(i64 %a) {
180 ; CHECK-LABEL: test_ccne:
181 ; CHECK: // %bb.0: // %entry
183 ; CHECK-NEXT: subs x0, x0, #3
184 ; CHECK-NEXT: //NO_APP
185 ; CHECK-NEXT: cset w0, ne
188 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@ccne},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
189 %asmresult1 = extractvalue { i64, i32 } %0, 1
190 %1 = icmp ult i32 %asmresult1, 2
191 tail call void @llvm.assume(i1 %1)
195 define i32 @test_ccvc(i64 %a) {
196 ; CHECK-LABEL: test_ccvc:
197 ; CHECK: // %bb.0: // %entry
199 ; CHECK-NEXT: subs x0, x0, #3
200 ; CHECK-NEXT: //NO_APP
201 ; CHECK-NEXT: cset w0, vc
204 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@ccvc},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
205 %asmresult1 = extractvalue { i64, i32 } %0, 1
206 %1 = icmp ult i32 %asmresult1, 2
207 tail call void @llvm.assume(i1 %1)
211 define i32 @test_ccpl(i64 %a) {
212 ; CHECK-LABEL: test_ccpl:
213 ; CHECK: // %bb.0: // %entry
215 ; CHECK-NEXT: subs x0, x0, #3
216 ; CHECK-NEXT: //NO_APP
217 ; CHECK-NEXT: cset w0, pl
220 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@ccpl},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
221 %asmresult1 = extractvalue { i64, i32 } %0, 1
222 %1 = icmp ult i32 %asmresult1, 2
223 tail call void @llvm.assume(i1 %1)
227 define i32 @test_ccvs(i64 %a) {
228 ; CHECK-LABEL: test_ccvs:
229 ; CHECK: // %bb.0: // %entry
231 ; CHECK-NEXT: subs x0, x0, #3
232 ; CHECK-NEXT: //NO_APP
233 ; CHECK-NEXT: cset w0, vs
236 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@ccvs},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
237 %asmresult1 = extractvalue { i64, i32 } %0, 1
238 %1 = icmp ult i32 %asmresult1, 2
239 tail call void @llvm.assume(i1 %1)
243 define i32 @test_ccmi(i64 %a) {
244 ; CHECK-LABEL: test_ccmi:
245 ; CHECK: // %bb.0: // %entry
247 ; CHECK-NEXT: subs x0, x0, #3
248 ; CHECK-NEXT: //NO_APP
249 ; CHECK-NEXT: cset w0, mi
252 %0 = tail call { i64, i32 } asm "subs $0, $0, #3", "=r,={@ccmi},0,~{dirflag},~{fpsr},~{flags}"(i64 %a)
253 %asmresult1 = extractvalue { i64, i32 } %0, 1
254 %1 = icmp ult i32 %asmresult1, 2
255 tail call void @llvm.assume(i1 %1)
259 declare void @llvm.assume(i1)