396 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=riscv32 -mattr=-d -mattr=-f -run-pass=legalizer %s -o - \3# RUN: | FileCheck %s4 5---6name: fptosi_s1_s327body: |8 bb.1:9 liveins: $x1010 ; CHECK-LABEL: name: fptosi_s1_s3211 ; CHECK: liveins: $x1012 ; CHECK-NEXT: {{ $}}13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x1014 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x215 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)16 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixsfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit-def $x1017 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x218 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1019 ; CHECK-NEXT: $x10 = COPY [[COPY1]](s32)20 ; CHECK-NEXT: PseudoRET implicit $x1021 %0:_(s32) = COPY $x1022 %1:_(s1) = G_FPTOSI %0:_(s32)23 %2:_(s32) = G_ANYEXT %1:_(s1)24 $x10 = COPY %2:_(s32)25 PseudoRET implicit $x1026...27---28name: fptoui_s1_s3229body: |30 bb.1:31 liveins: $x1032 ; CHECK-LABEL: name: fptoui_s1_s3233 ; CHECK: liveins: $x1034 ; CHECK-NEXT: {{ $}}35 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x1036 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x237 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)38 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixunssfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit-def $x1039 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x240 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1041 ; CHECK-NEXT: $x10 = COPY [[COPY1]](s32)42 ; CHECK-NEXT: PseudoRET implicit $x1043 %0:_(s32) = COPY $x1044 %1:_(s1) = G_FPTOUI %0:_(s32)45 %2:_(s32) = G_ANYEXT %1:_(s1)46 $x10 = COPY %2:_(s32)47 PseudoRET implicit $x1048...49---50name: fptosi_s8_s3251body: |52 bb.1:53 liveins: $x1054 ; CHECK-LABEL: name: fptosi_s8_s3255 ; CHECK: liveins: $x1056 ; CHECK-NEXT: {{ $}}57 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x1058 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x259 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)60 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixsfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit-def $x1061 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x262 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1063 ; CHECK-NEXT: $x10 = COPY [[COPY1]](s32)64 ; CHECK-NEXT: PseudoRET implicit $x1065 %0:_(s32) = COPY $x1066 %1:_(s8) = G_FPTOSI %0:_(s32)67 %2:_(s32) = G_ANYEXT %1:_(s8)68 $x10 = COPY %2:_(s32)69 PseudoRET implicit $x1070 71...72---73name: fptoui_s8_s3274body: |75 bb.1:76 liveins: $x1077 ; CHECK-LABEL: name: fptoui_s8_s3278 ; CHECK: liveins: $x1079 ; CHECK-NEXT: {{ $}}80 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x1081 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x282 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)83 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixunssfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit-def $x1084 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x285 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1086 ; CHECK-NEXT: $x10 = COPY [[COPY1]](s32)87 ; CHECK-NEXT: PseudoRET implicit $x1088 %0:_(s32) = COPY $x1089 %1:_(s8) = G_FPTOUI %0:_(s32)90 %2:_(s32) = G_ANYEXT %1:_(s8)91 $x10 = COPY %2:_(s32)92 PseudoRET implicit $x1093 94...95---96name: fptosi_s16_s3297body: |98 bb.1:99 liveins: $x10100 ; CHECK-LABEL: name: fptosi_s16_s32101 ; CHECK: liveins: $x10102 ; CHECK-NEXT: {{ $}}103 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10104 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2105 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)106 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixsfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit-def $x10107 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2108 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x10109 ; CHECK-NEXT: $x10 = COPY [[COPY1]](s32)110 ; CHECK-NEXT: PseudoRET implicit $x10111 %0:_(s32) = COPY $x10112 %1:_(s16) = G_FPTOSI %0:_(s32)113 %2:_(s32) = G_ANYEXT %1:_(s16)114 $x10 = COPY %2:_(s32)115 PseudoRET implicit $x10116 117...118---119name: fptoui_s16_s32120body: |121 bb.1:122 liveins: $x10123 ; CHECK-LABEL: name: fptoui_s16_s32124 ; CHECK: liveins: $x10125 ; CHECK-NEXT: {{ $}}126 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10127 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2128 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)129 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixunssfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit-def $x10130 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2131 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x10132 ; CHECK-NEXT: $x10 = COPY [[COPY1]](s32)133 ; CHECK-NEXT: PseudoRET implicit $x10134 %0:_(s32) = COPY $x10135 %1:_(s16) = G_FPTOUI %0:_(s32)136 %2:_(s32) = G_ANYEXT %1:_(s16)137 $x10 = COPY %2:_(s32)138 PseudoRET implicit $x10139 140...141---142name: fptosi_s32_s32143body: |144 bb.1:145 liveins: $x10146 ; CHECK-LABEL: name: fptosi_s32_s32147 ; CHECK: liveins: $x10148 ; CHECK-NEXT: {{ $}}149 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10150 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2151 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)152 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixsfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit-def $x10153 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2154 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x10155 ; CHECK-NEXT: $x10 = COPY [[COPY1]](s32)156 ; CHECK-NEXT: PseudoRET implicit $x10157 %0:_(s32) = COPY $x10158 %1:_(s32) = G_FPTOSI %0:_(s32)159 $x10 = COPY %1:_(s32)160 PseudoRET implicit $x10161 162...163---164name: fptoui_s32_s32165body: |166 bb.1:167 liveins: $x10168 ; CHECK-LABEL: name: fptoui_s32_s32169 ; CHECK: liveins: $x10170 ; CHECK-NEXT: {{ $}}171 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10172 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2173 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)174 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixunssfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit-def $x10175 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2176 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x10177 ; CHECK-NEXT: $x10 = COPY [[COPY1]](s32)178 ; CHECK-NEXT: PseudoRET implicit $x10179 %0:_(s32) = COPY $x10180 %1:_(s32) = G_FPTOUI %0:_(s32)181 $x10 = COPY %1:_(s32)182 PseudoRET implicit $x10183 184...185---186name: fptosi_s1_s64187body: |188 bb.1:189 liveins: $x10, $x11190 ; CHECK-LABEL: name: fptosi_s1_s64191 ; CHECK: liveins: $x10, $x11192 ; CHECK-NEXT: {{ $}}193 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10194 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11195 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2196 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)197 ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)198 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixdfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x10199 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2200 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x10201 ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)202 ; CHECK-NEXT: PseudoRET implicit $x10203 %1:_(s32) = COPY $x10204 %2:_(s32) = COPY $x11205 %0:_(s64) = G_MERGE_VALUES %1:_(s32), %2:_(s32)206 %3:_(s1) = G_FPTOSI %0:_(s64)207 %4:_(s32) = G_ANYEXT %3:_(s1)208 $x10 = COPY %4:_(s32)209 PseudoRET implicit $x10210 211...212---213name: fptoui_s1_s64214body: |215 bb.1:216 liveins: $x10, $x11217 ; CHECK-LABEL: name: fptoui_s1_s64218 ; CHECK: liveins: $x10, $x11219 ; CHECK-NEXT: {{ $}}220 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10221 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11222 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2223 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)224 ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)225 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixunsdfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x10226 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2227 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x10228 ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)229 ; CHECK-NEXT: PseudoRET implicit $x10230 %1:_(s32) = COPY $x10231 %2:_(s32) = COPY $x11232 %0:_(s64) = G_MERGE_VALUES %1:_(s32), %2:_(s32)233 %3:_(s1) = G_FPTOUI %0:_(s64)234 %4:_(s32) = G_ANYEXT %3:_(s1)235 $x10 = COPY %4:_(s32)236 PseudoRET implicit $x10237 238...239---240name: fptosi_s8_s64241body: |242 bb.1:243 liveins: $x10, $x11244 ; CHECK-LABEL: name: fptosi_s8_s64245 ; CHECK: liveins: $x10, $x11246 ; CHECK-NEXT: {{ $}}247 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10248 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11249 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2250 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)251 ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)252 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixdfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x10253 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2254 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x10255 ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)256 ; CHECK-NEXT: PseudoRET implicit $x10257 %1:_(s32) = COPY $x10258 %2:_(s32) = COPY $x11259 %0:_(s64) = G_MERGE_VALUES %1:_(s32), %2:_(s32)260 %3:_(s8) = G_FPTOSI %0:_(s64)261 %4:_(s32) = G_ANYEXT %3:_(s8)262 $x10 = COPY %4:_(s32)263 PseudoRET implicit $x10264...265---266name: fptoui_s8_s64267body: |268 bb.1:269 liveins: $x10, $x11270 ; CHECK-LABEL: name: fptoui_s8_s64271 ; CHECK: liveins: $x10, $x11272 ; CHECK-NEXT: {{ $}}273 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10274 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11275 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2276 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)277 ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)278 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixunsdfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x10279 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2280 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x10281 ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)282 ; CHECK-NEXT: PseudoRET implicit $x10283 %1:_(s32) = COPY $x10284 %2:_(s32) = COPY $x11285 %0:_(s64) = G_MERGE_VALUES %1:_(s32), %2:_(s32)286 %3:_(s8) = G_FPTOUI %0:_(s64)287 %4:_(s32) = G_ANYEXT %3:_(s8)288 $x10 = COPY %4:_(s32)289 PseudoRET implicit $x10290 291...292---293name: fptosi_s16_s64294body: |295 bb.1:296 liveins: $x10, $x11297 ; CHECK-LABEL: name: fptosi_s16_s64298 ; CHECK: liveins: $x10, $x11299 ; CHECK-NEXT: {{ $}}300 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10301 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11302 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2303 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)304 ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)305 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixdfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x10306 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2307 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x10308 ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)309 ; CHECK-NEXT: PseudoRET implicit $x10310 %1:_(s32) = COPY $x10311 %2:_(s32) = COPY $x11312 %0:_(s64) = G_MERGE_VALUES %1:_(s32), %2:_(s32)313 %3:_(s16) = G_FPTOSI %0:_(s64)314 %4:_(s32) = G_ANYEXT %3:_(s16)315 $x10 = COPY %4:_(s32)316 PseudoRET implicit $x10317 318...319---320name: fptoui_s16_s64321body: |322 bb.1:323 liveins: $x10, $x11324 ; CHECK-LABEL: name: fptoui_s16_s64325 ; CHECK: liveins: $x10, $x11326 ; CHECK-NEXT: {{ $}}327 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10328 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11329 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2330 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)331 ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)332 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixunsdfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x10333 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2334 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x10335 ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)336 ; CHECK-NEXT: PseudoRET implicit $x10337 %1:_(s32) = COPY $x10338 %2:_(s32) = COPY $x11339 %0:_(s64) = G_MERGE_VALUES %1:_(s32), %2:_(s32)340 %3:_(s16) = G_FPTOUI %0:_(s64)341 %4:_(s32) = G_ANYEXT %3:_(s16)342 $x10 = COPY %4:_(s32)343 PseudoRET implicit $x10344 345...346---347name: fptosi_s32_s64348body: |349 bb.1:350 liveins: $x10, $x11351 ; CHECK-LABEL: name: fptosi_s32_s64352 ; CHECK: liveins: $x10, $x11353 ; CHECK-NEXT: {{ $}}354 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10355 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11356 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2357 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)358 ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)359 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixdfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x10360 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2361 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x10362 ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)363 ; CHECK-NEXT: PseudoRET implicit $x10364 %1:_(s32) = COPY $x10365 %2:_(s32) = COPY $x11366 %0:_(s64) = G_MERGE_VALUES %1:_(s32), %2:_(s32)367 %3:_(s32) = G_FPTOSI %0:_(s64)368 $x10 = COPY %3:_(s32)369 PseudoRET implicit $x10370...371---372name: fptoui_s32_s64373body: |374 bb.1:375 liveins: $x10, $x11376 ; CHECK-LABEL: name: fptoui_s32_s64377 ; CHECK: liveins: $x10, $x11378 ; CHECK-NEXT: {{ $}}379 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10380 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11381 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $x2, implicit $x2382 ; CHECK-NEXT: $x10 = COPY [[COPY]](s32)383 ; CHECK-NEXT: $x11 = COPY [[COPY1]](s32)384 ; CHECK-NEXT: PseudoCALL target-flags(riscv-call) &__fixunsdfsi, csr_ilp32_lp64, implicit-def $x1, implicit $x10, implicit $x11, implicit-def $x10385 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $x2, implicit $x2386 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $x10387 ; CHECK-NEXT: $x10 = COPY [[COPY2]](s32)388 ; CHECK-NEXT: PseudoRET implicit $x10389 %1:_(s32) = COPY $x10390 %2:_(s32) = COPY $x11391 %0:_(s64) = G_MERGE_VALUES %1:_(s32), %2:_(s32)392 %3:_(s32) = G_FPTOUI %0:_(s64)393 $x10 = COPY %3:_(s32)394 PseudoRET implicit $x10395...396