1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64 -run-pass=aarch64-postlegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
14 ; CHECK-LABEL: name: add
17 ; CHECK-NEXT: %res:_(s64) = G_CONSTANT i64 42
18 ; CHECK-NEXT: $x0 = COPY %res(s64)
19 ; CHECK-NEXT: RET_ReallyLR implicit $x0
20 %a:_(s64) = G_CONSTANT i64 40
21 %b:_(s64) = G_CONSTANT i64 2
22 %res:_(s64) = G_ADD %a, %b
24 RET_ReallyLR implicit $x0
37 ; CHECK-LABEL: name: sub
40 ; CHECK-NEXT: %res:_(s64) = G_CONSTANT i64 38
41 ; CHECK-NEXT: $x0 = COPY %res(s64)
42 ; CHECK-NEXT: RET_ReallyLR implicit $x0
43 %a:_(s64) = G_CONSTANT i64 40
44 %b:_(s64) = G_CONSTANT i64 2
45 %res:_(s64) = G_SUB %a, %b
47 RET_ReallyLR implicit $x0
60 ; CHECK-LABEL: name: mul
63 ; CHECK-NEXT: %res:_(s64) = G_CONSTANT i64 80
64 ; CHECK-NEXT: $x0 = COPY %res(s64)
65 ; CHECK-NEXT: RET_ReallyLR implicit $x0
66 %a:_(s64) = G_CONSTANT i64 40
67 %b:_(s64) = G_CONSTANT i64 2
68 %res:_(s64) = G_MUL %a, %b
70 RET_ReallyLR implicit $x0
83 ; CHECK-LABEL: name: and
86 ; CHECK-NEXT: %res:_(s64) = G_CONSTANT i64 0
87 ; CHECK-NEXT: $x0 = COPY %res(s64)
88 ; CHECK-NEXT: RET_ReallyLR implicit $x0
89 %a:_(s64) = G_CONSTANT i64 40
90 %b:_(s64) = G_CONSTANT i64 2
91 %res:_(s64) = G_AND %a, %b
93 RET_ReallyLR implicit $x0
106 ; CHECK-LABEL: name: or
107 ; CHECK: liveins: $x0
109 ; CHECK-NEXT: %res:_(s64) = G_CONSTANT i64 62
110 ; CHECK-NEXT: $x0 = COPY %res(s64)
111 ; CHECK-NEXT: RET_ReallyLR implicit $x0
112 %a:_(s64) = G_CONSTANT i64 42
113 %b:_(s64) = G_CONSTANT i64 22
114 %res:_(s64) = G_OR %a, %b
116 RET_ReallyLR implicit $x0
129 ; CHECK-LABEL: name: xor
130 ; CHECK: liveins: $x0
132 ; CHECK-NEXT: %res:_(s64) = G_CONSTANT i64 12
133 ; CHECK-NEXT: $x0 = COPY %res(s64)
134 ; CHECK-NEXT: RET_ReallyLR implicit $x0
135 %a:_(s64) = G_CONSTANT i64 8
136 %b:_(s64) = G_CONSTANT i64 4
137 %res:_(s64) = G_XOR %a, %b
139 RET_ReallyLR implicit $x0
151 ; CHECK-LABEL: name: fadd
152 ; CHECK: liveins: $d0
154 ; CHECK-NEXT: %res:_(s64) = G_FCONSTANT double 4.200000e+01
155 ; CHECK-NEXT: $d0 = COPY %res(s64)
156 ; CHECK-NEXT: RET_ReallyLR implicit $d0
157 %a:_(s64) = G_FCONSTANT double 40.0
158 %b:_(s64) = G_FCONSTANT double 2.0
159 %res:_(s64) = G_FADD %a, %b
161 RET_ReallyLR implicit $d0
173 ; CHECK-LABEL: name: fsub
174 ; CHECK: liveins: $d0
176 ; CHECK-NEXT: %res:_(s64) = G_FCONSTANT double 3.800000e+01
177 ; CHECK-NEXT: $d0 = COPY %res(s64)
178 ; CHECK-NEXT: RET_ReallyLR implicit $d0
179 %a:_(s64) = G_FCONSTANT double 40.0
180 %b:_(s64) = G_FCONSTANT double 2.0
181 %res:_(s64) = G_FSUB %a, %b
183 RET_ReallyLR implicit $d0
195 ; CHECK-LABEL: name: fmul
196 ; CHECK: liveins: $d0
198 ; CHECK-NEXT: %res:_(s64) = G_FCONSTANT double 8.000000e+01
199 ; CHECK-NEXT: $d0 = COPY %res(s64)
200 ; CHECK-NEXT: RET_ReallyLR implicit $d0
201 %a:_(s64) = G_FCONSTANT double 40.0
202 %b:_(s64) = G_FCONSTANT double 2.0
203 %res:_(s64) = G_FMUL %a, %b
205 RET_ReallyLR implicit $d0
217 ; CHECK-LABEL: name: fdiv
218 ; CHECK: liveins: $d0
220 ; CHECK-NEXT: %res:_(s64) = G_FCONSTANT double 2.000000e+01
221 ; CHECK-NEXT: $d0 = COPY %res(s64)
222 ; CHECK-NEXT: RET_ReallyLR implicit $d0
223 %a:_(s64) = G_FCONSTANT double 40.0
224 %b:_(s64) = G_FCONSTANT double 2.0
225 %res:_(s64) = G_FDIV %a, %b
227 RET_ReallyLR implicit $d0
239 ; CHECK-LABEL: name: fadd32
240 ; CHECK: liveins: $s0
242 ; CHECK-NEXT: %res:_(s32) = G_FCONSTANT float 4.200000e+01
243 ; CHECK-NEXT: $s0 = COPY %res(s32)
244 ; CHECK-NEXT: RET_ReallyLR implicit $s0
245 %a:_(s32) = G_FCONSTANT float 40.0
246 %b:_(s32) = G_FCONSTANT float 2.0
247 %res:_(s32) = G_FADD %a, %b
249 RET_ReallyLR implicit $s0