llvm.org GIT mirror llvm / ed761d6
[RISCV] Only mark fp as reserved if the function has a dedicated frame pointer This follows similar logic in the ARM and Mips backends, and allows the free use of s0 in functions without a dedicated frame pointer. The changes in callee-saved-gprs.ll most clearly show the effect of this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356063 91177308-0d34-0410-b5e6-96231b3b80d8 Alex Bradbury 1 year, 8 months ago
20 changed file(s) with 2737 addition(s) and 2733 deletion(s). Raw diff Collapse all Expand all
4242 }
4343
4444 BitVector RISCVRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
45 const TargetFrameLowering *TFI = getFrameLowering(MF);
4546 BitVector Reserved(getNumRegs());
4647
4748 // Use markSuperRegs to ensure any register aliases are also reserved
5051 markSuperRegs(Reserved, RISCV::X2); // sp
5152 markSuperRegs(Reserved, RISCV::X3); // gp
5253 markSuperRegs(Reserved, RISCV::X4); // tp
53 markSuperRegs(Reserved, RISCV::X8); // fp
54 if (TFI->hasFP(MF))
55 markSuperRegs(Reserved, RISCV::X8); // fp
5456 assert(checkAllSuperRegsMarked(Reserved));
5557 return Reserved;
5658 }
20722072 ; RV32I: # %bb.0:
20732073 ; RV32I-NEXT: addi sp, sp, -32
20742074 ; RV32I-NEXT: sw ra, 28(sp)
2075 ; RV32I-NEXT: sw s1, 24(sp)
2076 ; RV32I-NEXT: sw s2, 20(sp)
2077 ; RV32I-NEXT: sw s3, 16(sp)
2078 ; RV32I-NEXT: sw s4, 12(sp)
2075 ; RV32I-NEXT: sw s0, 24(sp)
2076 ; RV32I-NEXT: sw s1, 20(sp)
2077 ; RV32I-NEXT: sw s2, 16(sp)
2078 ; RV32I-NEXT: sw s3, 12(sp)
20792079 ; RV32I-NEXT: mv s2, a1
2080 ; RV32I-NEXT: mv s4, a0
2080 ; RV32I-NEXT: mv s1, a0
20812081 ; RV32I-NEXT: lbu a0, 0(a0)
20822082 ; RV32I-NEXT: slli a1, a1, 24
2083 ; RV32I-NEXT: srai s1, a1, 24
2083 ; RV32I-NEXT: srai s0, a1, 24
20842084 ; RV32I-NEXT: addi s3, sp, 11
20852085 ; RV32I-NEXT: .LBB35_1: # %atomicrmw.start
20862086 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
20872087 ; RV32I-NEXT: slli a1, a0, 24
20882088 ; RV32I-NEXT: srai a1, a1, 24
20892089 ; RV32I-NEXT: mv a2, a0
2090 ; RV32I-NEXT: blt s1, a1, .LBB35_3
2090 ; RV32I-NEXT: blt s0, a1, .LBB35_3
20912091 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
20922092 ; RV32I-NEXT: # in Loop: Header=BB35_1 Depth=1
20932093 ; RV32I-NEXT: mv a2, s2
20942094 ; RV32I-NEXT: .LBB35_3: # %atomicrmw.start
20952095 ; RV32I-NEXT: # in Loop: Header=BB35_1 Depth=1
20962096 ; RV32I-NEXT: sb a0, 11(sp)
2097 ; RV32I-NEXT: mv a0, s4
2097 ; RV32I-NEXT: mv a0, s1
20982098 ; RV32I-NEXT: mv a1, s3
20992099 ; RV32I-NEXT: mv a3, zero
21002100 ; RV32I-NEXT: mv a4, zero
21032103 ; RV32I-NEXT: lb a0, 11(sp)
21042104 ; RV32I-NEXT: beqz a1, .LBB35_1
21052105 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
2106 ; RV32I-NEXT: lw s4, 12(sp)
2107 ; RV32I-NEXT: lw s3, 16(sp)
2108 ; RV32I-NEXT: lw s2, 20(sp)
2109 ; RV32I-NEXT: lw s1, 24(sp)
2106 ; RV32I-NEXT: lw s3, 12(sp)
2107 ; RV32I-NEXT: lw s2, 16(sp)
2108 ; RV32I-NEXT: lw s1, 20(sp)
2109 ; RV32I-NEXT: lw s0, 24(sp)
21102110 ; RV32I-NEXT: lw ra, 28(sp)
21112111 ; RV32I-NEXT: addi sp, sp, 32
21122112 ; RV32I-NEXT: ret
21452145 ; RV64I: # %bb.0:
21462146 ; RV64I-NEXT: addi sp, sp, -48
21472147 ; RV64I-NEXT: sd ra, 40(sp)
2148 ; RV64I-NEXT: sd s1, 32(sp)
2149 ; RV64I-NEXT: sd s2, 24(sp)
2150 ; RV64I-NEXT: sd s3, 16(sp)
2151 ; RV64I-NEXT: sd s4, 8(sp)
2148 ; RV64I-NEXT: sd s0, 32(sp)
2149 ; RV64I-NEXT: sd s1, 24(sp)
2150 ; RV64I-NEXT: sd s2, 16(sp)
2151 ; RV64I-NEXT: sd s3, 8(sp)
21522152 ; RV64I-NEXT: mv s2, a1
2153 ; RV64I-NEXT: mv s4, a0
2153 ; RV64I-NEXT: mv s1, a0
21542154 ; RV64I-NEXT: lbu a0, 0(a0)
21552155 ; RV64I-NEXT: slli a1, a1, 56
2156 ; RV64I-NEXT: srai s1, a1, 56
2156 ; RV64I-NEXT: srai s0, a1, 56
21572157 ; RV64I-NEXT: addi s3, sp, 7
21582158 ; RV64I-NEXT: .LBB35_1: # %atomicrmw.start
21592159 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
21602160 ; RV64I-NEXT: slli a1, a0, 56
21612161 ; RV64I-NEXT: srai a1, a1, 56
21622162 ; RV64I-NEXT: mv a2, a0
2163 ; RV64I-NEXT: blt s1, a1, .LBB35_3
2163 ; RV64I-NEXT: blt s0, a1, .LBB35_3
21642164 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
21652165 ; RV64I-NEXT: # in Loop: Header=BB35_1 Depth=1
21662166 ; RV64I-NEXT: mv a2, s2
21672167 ; RV64I-NEXT: .LBB35_3: # %atomicrmw.start
21682168 ; RV64I-NEXT: # in Loop: Header=BB35_1 Depth=1
21692169 ; RV64I-NEXT: sb a0, 7(sp)
2170 ; RV64I-NEXT: mv a0, s4
2170 ; RV64I-NEXT: mv a0, s1
21712171 ; RV64I-NEXT: mv a1, s3
21722172 ; RV64I-NEXT: mv a3, zero
21732173 ; RV64I-NEXT: mv a4, zero
21762176 ; RV64I-NEXT: lb a0, 7(sp)
21772177 ; RV64I-NEXT: beqz a1, .LBB35_1
21782178 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
2179 ; RV64I-NEXT: ld s4, 8(sp)
2180 ; RV64I-NEXT: ld s3, 16(sp)
2181 ; RV64I-NEXT: ld s2, 24(sp)
2182 ; RV64I-NEXT: ld s1, 32(sp)
2179 ; RV64I-NEXT: ld s3, 8(sp)
2180 ; RV64I-NEXT: ld s2, 16(sp)
2181 ; RV64I-NEXT: ld s1, 24(sp)
2182 ; RV64I-NEXT: ld s0, 32(sp)
21832183 ; RV64I-NEXT: ld ra, 40(sp)
21842184 ; RV64I-NEXT: addi sp, sp, 48
21852185 ; RV64I-NEXT: ret
22222222 ; RV32I: # %bb.0:
22232223 ; RV32I-NEXT: addi sp, sp, -32
22242224 ; RV32I-NEXT: sw ra, 28(sp)
2225 ; RV32I-NEXT: sw s1, 24(sp)
2226 ; RV32I-NEXT: sw s2, 20(sp)
2227 ; RV32I-NEXT: sw s3, 16(sp)
2228 ; RV32I-NEXT: sw s4, 12(sp)
2225 ; RV32I-NEXT: sw s0, 24(sp)
2226 ; RV32I-NEXT: sw s1, 20(sp)
2227 ; RV32I-NEXT: sw s2, 16(sp)
2228 ; RV32I-NEXT: sw s3, 12(sp)
22292229 ; RV32I-NEXT: mv s2, a1
2230 ; RV32I-NEXT: mv s4, a0
2230 ; RV32I-NEXT: mv s1, a0
22312231 ; RV32I-NEXT: lbu a0, 0(a0)
22322232 ; RV32I-NEXT: slli a1, a1, 24
2233 ; RV32I-NEXT: srai s1, a1, 24
2233 ; RV32I-NEXT: srai s0, a1, 24
22342234 ; RV32I-NEXT: addi s3, sp, 11
22352235 ; RV32I-NEXT: .LBB36_1: # %atomicrmw.start
22362236 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
22372237 ; RV32I-NEXT: slli a1, a0, 24
22382238 ; RV32I-NEXT: srai a1, a1, 24
22392239 ; RV32I-NEXT: mv a2, a0
2240 ; RV32I-NEXT: blt s1, a1, .LBB36_3
2240 ; RV32I-NEXT: blt s0, a1, .LBB36_3
22412241 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
22422242 ; RV32I-NEXT: # in Loop: Header=BB36_1 Depth=1
22432243 ; RV32I-NEXT: mv a2, s2
22442244 ; RV32I-NEXT: .LBB36_3: # %atomicrmw.start
22452245 ; RV32I-NEXT: # in Loop: Header=BB36_1 Depth=1
22462246 ; RV32I-NEXT: sb a0, 11(sp)
2247 ; RV32I-NEXT: mv a0, s4
2247 ; RV32I-NEXT: mv a0, s1
22482248 ; RV32I-NEXT: mv a1, s3
22492249 ; RV32I-NEXT: addi a3, zero, 2
22502250 ; RV32I-NEXT: addi a4, zero, 2
22532253 ; RV32I-NEXT: lb a0, 11(sp)
22542254 ; RV32I-NEXT: beqz a1, .LBB36_1
22552255 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
2256 ; RV32I-NEXT: lw s4, 12(sp)
2257 ; RV32I-NEXT: lw s3, 16(sp)
2258 ; RV32I-NEXT: lw s2, 20(sp)
2259 ; RV32I-NEXT: lw s1, 24(sp)
2256 ; RV32I-NEXT: lw s3, 12(sp)
2257 ; RV32I-NEXT: lw s2, 16(sp)
2258 ; RV32I-NEXT: lw s1, 20(sp)
2259 ; RV32I-NEXT: lw s0, 24(sp)
22602260 ; RV32I-NEXT: lw ra, 28(sp)
22612261 ; RV32I-NEXT: addi sp, sp, 32
22622262 ; RV32I-NEXT: ret
22952295 ; RV64I: # %bb.0:
22962296 ; RV64I-NEXT: addi sp, sp, -48
22972297 ; RV64I-NEXT: sd ra, 40(sp)
2298 ; RV64I-NEXT: sd s1, 32(sp)
2299 ; RV64I-NEXT: sd s2, 24(sp)
2300 ; RV64I-NEXT: sd s3, 16(sp)
2301 ; RV64I-NEXT: sd s4, 8(sp)
2298 ; RV64I-NEXT: sd s0, 32(sp)
2299 ; RV64I-NEXT: sd s1, 24(sp)
2300 ; RV64I-NEXT: sd s2, 16(sp)
2301 ; RV64I-NEXT: sd s3, 8(sp)
23022302 ; RV64I-NEXT: mv s2, a1
2303 ; RV64I-NEXT: mv s4, a0
2303 ; RV64I-NEXT: mv s1, a0
23042304 ; RV64I-NEXT: lbu a0, 0(a0)
23052305 ; RV64I-NEXT: slli a1, a1, 56
2306 ; RV64I-NEXT: srai s1, a1, 56
2306 ; RV64I-NEXT: srai s0, a1, 56
23072307 ; RV64I-NEXT: addi s3, sp, 7
23082308 ; RV64I-NEXT: .LBB36_1: # %atomicrmw.start
23092309 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
23102310 ; RV64I-NEXT: slli a1, a0, 56
23112311 ; RV64I-NEXT: srai a1, a1, 56
23122312 ; RV64I-NEXT: mv a2, a0
2313 ; RV64I-NEXT: blt s1, a1, .LBB36_3
2313 ; RV64I-NEXT: blt s0, a1, .LBB36_3
23142314 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
23152315 ; RV64I-NEXT: # in Loop: Header=BB36_1 Depth=1
23162316 ; RV64I-NEXT: mv a2, s2
23172317 ; RV64I-NEXT: .LBB36_3: # %atomicrmw.start
23182318 ; RV64I-NEXT: # in Loop: Header=BB36_1 Depth=1
23192319 ; RV64I-NEXT: sb a0, 7(sp)
2320 ; RV64I-NEXT: mv a0, s4
2320 ; RV64I-NEXT: mv a0, s1
23212321 ; RV64I-NEXT: mv a1, s3
23222322 ; RV64I-NEXT: addi a3, zero, 2
23232323 ; RV64I-NEXT: addi a4, zero, 2
23262326 ; RV64I-NEXT: lb a0, 7(sp)
23272327 ; RV64I-NEXT: beqz a1, .LBB36_1
23282328 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
2329 ; RV64I-NEXT: ld s4, 8(sp)
2330 ; RV64I-NEXT: ld s3, 16(sp)
2331 ; RV64I-NEXT: ld s2, 24(sp)
2332 ; RV64I-NEXT: ld s1, 32(sp)
2329 ; RV64I-NEXT: ld s3, 8(sp)
2330 ; RV64I-NEXT: ld s2, 16(sp)
2331 ; RV64I-NEXT: ld s1, 24(sp)
2332 ; RV64I-NEXT: ld s0, 32(sp)
23332333 ; RV64I-NEXT: ld ra, 40(sp)
23342334 ; RV64I-NEXT: addi sp, sp, 48
23352335 ; RV64I-NEXT: ret
23722372 ; RV32I: # %bb.0:
23732373 ; RV32I-NEXT: addi sp, sp, -32
23742374 ; RV32I-NEXT: sw ra, 28(sp)
2375 ; RV32I-NEXT: sw s1, 24(sp)
2376 ; RV32I-NEXT: sw s2, 20(sp)
2377 ; RV32I-NEXT: sw s3, 16(sp)
2378 ; RV32I-NEXT: sw s4, 12(sp)
2375 ; RV32I-NEXT: sw s0, 24(sp)
2376 ; RV32I-NEXT: sw s1, 20(sp)
2377 ; RV32I-NEXT: sw s2, 16(sp)
2378 ; RV32I-NEXT: sw s3, 12(sp)
23792379 ; RV32I-NEXT: mv s2, a1
2380 ; RV32I-NEXT: mv s4, a0
2380 ; RV32I-NEXT: mv s1, a0
23812381 ; RV32I-NEXT: lbu a0, 0(a0)
23822382 ; RV32I-NEXT: slli a1, a1, 24
2383 ; RV32I-NEXT: srai s1, a1, 24
2383 ; RV32I-NEXT: srai s0, a1, 24
23842384 ; RV32I-NEXT: addi s3, sp, 11
23852385 ; RV32I-NEXT: .LBB37_1: # %atomicrmw.start
23862386 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
23872387 ; RV32I-NEXT: slli a1, a0, 24
23882388 ; RV32I-NEXT: srai a1, a1, 24
23892389 ; RV32I-NEXT: mv a2, a0
2390 ; RV32I-NEXT: blt s1, a1, .LBB37_3
2390 ; RV32I-NEXT: blt s0, a1, .LBB37_3
23912391 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
23922392 ; RV32I-NEXT: # in Loop: Header=BB37_1 Depth=1
23932393 ; RV32I-NEXT: mv a2, s2
23942394 ; RV32I-NEXT: .LBB37_3: # %atomicrmw.start
23952395 ; RV32I-NEXT: # in Loop: Header=BB37_1 Depth=1
23962396 ; RV32I-NEXT: sb a0, 11(sp)
2397 ; RV32I-NEXT: mv a0, s4
2397 ; RV32I-NEXT: mv a0, s1
23982398 ; RV32I-NEXT: mv a1, s3
23992399 ; RV32I-NEXT: addi a3, zero, 3
24002400 ; RV32I-NEXT: mv a4, zero
24032403 ; RV32I-NEXT: lb a0, 11(sp)
24042404 ; RV32I-NEXT: beqz a1, .LBB37_1
24052405 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
2406 ; RV32I-NEXT: lw s4, 12(sp)
2407 ; RV32I-NEXT: lw s3, 16(sp)
2408 ; RV32I-NEXT: lw s2, 20(sp)
2409 ; RV32I-NEXT: lw s1, 24(sp)
2406 ; RV32I-NEXT: lw s3, 12(sp)
2407 ; RV32I-NEXT: lw s2, 16(sp)
2408 ; RV32I-NEXT: lw s1, 20(sp)
2409 ; RV32I-NEXT: lw s0, 24(sp)
24102410 ; RV32I-NEXT: lw ra, 28(sp)
24112411 ; RV32I-NEXT: addi sp, sp, 32
24122412 ; RV32I-NEXT: ret
24452445 ; RV64I: # %bb.0:
24462446 ; RV64I-NEXT: addi sp, sp, -48
24472447 ; RV64I-NEXT: sd ra, 40(sp)
2448 ; RV64I-NEXT: sd s1, 32(sp)
2449 ; RV64I-NEXT: sd s2, 24(sp)
2450 ; RV64I-NEXT: sd s3, 16(sp)
2451 ; RV64I-NEXT: sd s4, 8(sp)
2448 ; RV64I-NEXT: sd s0, 32(sp)
2449 ; RV64I-NEXT: sd s1, 24(sp)
2450 ; RV64I-NEXT: sd s2, 16(sp)
2451 ; RV64I-NEXT: sd s3, 8(sp)
24522452 ; RV64I-NEXT: mv s2, a1
2453 ; RV64I-NEXT: mv s4, a0
2453 ; RV64I-NEXT: mv s1, a0
24542454 ; RV64I-NEXT: lbu a0, 0(a0)
24552455 ; RV64I-NEXT: slli a1, a1, 56
2456 ; RV64I-NEXT: srai s1, a1, 56
2456 ; RV64I-NEXT: srai s0, a1, 56
24572457 ; RV64I-NEXT: addi s3, sp, 7
24582458 ; RV64I-NEXT: .LBB37_1: # %atomicrmw.start
24592459 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
24602460 ; RV64I-NEXT: slli a1, a0, 56
24612461 ; RV64I-NEXT: srai a1, a1, 56
24622462 ; RV64I-NEXT: mv a2, a0
2463 ; RV64I-NEXT: blt s1, a1, .LBB37_3
2463 ; RV64I-NEXT: blt s0, a1, .LBB37_3
24642464 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
24652465 ; RV64I-NEXT: # in Loop: Header=BB37_1 Depth=1
24662466 ; RV64I-NEXT: mv a2, s2
24672467 ; RV64I-NEXT: .LBB37_3: # %atomicrmw.start
24682468 ; RV64I-NEXT: # in Loop: Header=BB37_1 Depth=1
24692469 ; RV64I-NEXT: sb a0, 7(sp)
2470 ; RV64I-NEXT: mv a0, s4
2470 ; RV64I-NEXT: mv a0, s1
24712471 ; RV64I-NEXT: mv a1, s3
24722472 ; RV64I-NEXT: addi a3, zero, 3
24732473 ; RV64I-NEXT: mv a4, zero
24762476 ; RV64I-NEXT: lb a0, 7(sp)
24772477 ; RV64I-NEXT: beqz a1, .LBB37_1
24782478 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
2479 ; RV64I-NEXT: ld s4, 8(sp)
2480 ; RV64I-NEXT: ld s3, 16(sp)
2481 ; RV64I-NEXT: ld s2, 24(sp)
2482 ; RV64I-NEXT: ld s1, 32(sp)
2479 ; RV64I-NEXT: ld s3, 8(sp)
2480 ; RV64I-NEXT: ld s2, 16(sp)
2481 ; RV64I-NEXT: ld s1, 24(sp)
2482 ; RV64I-NEXT: ld s0, 32(sp)
24832483 ; RV64I-NEXT: ld ra, 40(sp)
24842484 ; RV64I-NEXT: addi sp, sp, 48
24852485 ; RV64I-NEXT: ret
25222522 ; RV32I: # %bb.0:
25232523 ; RV32I-NEXT: addi sp, sp, -32
25242524 ; RV32I-NEXT: sw ra, 28(sp)
2525 ; RV32I-NEXT: sw s1, 24(sp)
2526 ; RV32I-NEXT: sw s2, 20(sp)
2527 ; RV32I-NEXT: sw s3, 16(sp)
2528 ; RV32I-NEXT: sw s4, 12(sp)
2525 ; RV32I-NEXT: sw s0, 24(sp)
2526 ; RV32I-NEXT: sw s1, 20(sp)
2527 ; RV32I-NEXT: sw s2, 16(sp)
2528 ; RV32I-NEXT: sw s3, 12(sp)
25292529 ; RV32I-NEXT: mv s2, a1
2530 ; RV32I-NEXT: mv s4, a0
2530 ; RV32I-NEXT: mv s1, a0
25312531 ; RV32I-NEXT: lbu a0, 0(a0)
25322532 ; RV32I-NEXT: slli a1, a1, 24
2533 ; RV32I-NEXT: srai s1, a1, 24
2533 ; RV32I-NEXT: srai s0, a1, 24
25342534 ; RV32I-NEXT: addi s3, sp, 11
25352535 ; RV32I-NEXT: .LBB38_1: # %atomicrmw.start
25362536 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
25372537 ; RV32I-NEXT: slli a1, a0, 24
25382538 ; RV32I-NEXT: srai a1, a1, 24
25392539 ; RV32I-NEXT: mv a2, a0
2540 ; RV32I-NEXT: blt s1, a1, .LBB38_3
2540 ; RV32I-NEXT: blt s0, a1, .LBB38_3
25412541 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
25422542 ; RV32I-NEXT: # in Loop: Header=BB38_1 Depth=1
25432543 ; RV32I-NEXT: mv a2, s2
25442544 ; RV32I-NEXT: .LBB38_3: # %atomicrmw.start
25452545 ; RV32I-NEXT: # in Loop: Header=BB38_1 Depth=1
25462546 ; RV32I-NEXT: sb a0, 11(sp)
2547 ; RV32I-NEXT: mv a0, s4
2547 ; RV32I-NEXT: mv a0, s1
25482548 ; RV32I-NEXT: mv a1, s3
25492549 ; RV32I-NEXT: addi a3, zero, 4
25502550 ; RV32I-NEXT: addi a4, zero, 2
25532553 ; RV32I-NEXT: lb a0, 11(sp)
25542554 ; RV32I-NEXT: beqz a1, .LBB38_1
25552555 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
2556 ; RV32I-NEXT: lw s4, 12(sp)
2557 ; RV32I-NEXT: lw s3, 16(sp)
2558 ; RV32I-NEXT: lw s2, 20(sp)
2559 ; RV32I-NEXT: lw s1, 24(sp)
2556 ; RV32I-NEXT: lw s3, 12(sp)
2557 ; RV32I-NEXT: lw s2, 16(sp)
2558 ; RV32I-NEXT: lw s1, 20(sp)
2559 ; RV32I-NEXT: lw s0, 24(sp)
25602560 ; RV32I-NEXT: lw ra, 28(sp)
25612561 ; RV32I-NEXT: addi sp, sp, 32
25622562 ; RV32I-NEXT: ret
25952595 ; RV64I: # %bb.0:
25962596 ; RV64I-NEXT: addi sp, sp, -48
25972597 ; RV64I-NEXT: sd ra, 40(sp)
2598 ; RV64I-NEXT: sd s1, 32(sp)
2599 ; RV64I-NEXT: sd s2, 24(sp)
2600 ; RV64I-NEXT: sd s3, 16(sp)
2601 ; RV64I-NEXT: sd s4, 8(sp)
2598 ; RV64I-NEXT: sd s0, 32(sp)
2599 ; RV64I-NEXT: sd s1, 24(sp)
2600 ; RV64I-NEXT: sd s2, 16(sp)
2601 ; RV64I-NEXT: sd s3, 8(sp)
26022602 ; RV64I-NEXT: mv s2, a1
2603 ; RV64I-NEXT: mv s4, a0
2603 ; RV64I-NEXT: mv s1, a0
26042604 ; RV64I-NEXT: lbu a0, 0(a0)
26052605 ; RV64I-NEXT: slli a1, a1, 56
2606 ; RV64I-NEXT: srai s1, a1, 56
2606 ; RV64I-NEXT: srai s0, a1, 56
26072607 ; RV64I-NEXT: addi s3, sp, 7
26082608 ; RV64I-NEXT: .LBB38_1: # %atomicrmw.start
26092609 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
26102610 ; RV64I-NEXT: slli a1, a0, 56
26112611 ; RV64I-NEXT: srai a1, a1, 56
26122612 ; RV64I-NEXT: mv a2, a0
2613 ; RV64I-NEXT: blt s1, a1, .LBB38_3
2613 ; RV64I-NEXT: blt s0, a1, .LBB38_3
26142614 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
26152615 ; RV64I-NEXT: # in Loop: Header=BB38_1 Depth=1
26162616 ; RV64I-NEXT: mv a2, s2
26172617 ; RV64I-NEXT: .LBB38_3: # %atomicrmw.start
26182618 ; RV64I-NEXT: # in Loop: Header=BB38_1 Depth=1
26192619 ; RV64I-NEXT: sb a0, 7(sp)
2620 ; RV64I-NEXT: mv a0, s4
2620 ; RV64I-NEXT: mv a0, s1
26212621 ; RV64I-NEXT: mv a1, s3
26222622 ; RV64I-NEXT: addi a3, zero, 4
26232623 ; RV64I-NEXT: addi a4, zero, 2
26262626 ; RV64I-NEXT: lb a0, 7(sp)
26272627 ; RV64I-NEXT: beqz a1, .LBB38_1
26282628 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
2629 ; RV64I-NEXT: ld s4, 8(sp)
2630 ; RV64I-NEXT: ld s3, 16(sp)
2631 ; RV64I-NEXT: ld s2, 24(sp)
2632 ; RV64I-NEXT: ld s1, 32(sp)
2629 ; RV64I-NEXT: ld s3, 8(sp)
2630 ; RV64I-NEXT: ld s2, 16(sp)
2631 ; RV64I-NEXT: ld s1, 24(sp)
2632 ; RV64I-NEXT: ld s0, 32(sp)
26332633 ; RV64I-NEXT: ld ra, 40(sp)
26342634 ; RV64I-NEXT: addi sp, sp, 48
26352635 ; RV64I-NEXT: ret
26722672 ; RV32I: # %bb.0:
26732673 ; RV32I-NEXT: addi sp, sp, -32
26742674 ; RV32I-NEXT: sw ra, 28(sp)
2675 ; RV32I-NEXT: sw s1, 24(sp)
2676 ; RV32I-NEXT: sw s2, 20(sp)
2677 ; RV32I-NEXT: sw s3, 16(sp)
2678 ; RV32I-NEXT: sw s4, 12(sp)
2675 ; RV32I-NEXT: sw s0, 24(sp)
2676 ; RV32I-NEXT: sw s1, 20(sp)
2677 ; RV32I-NEXT: sw s2, 16(sp)
2678 ; RV32I-NEXT: sw s3, 12(sp)
26792679 ; RV32I-NEXT: mv s2, a1
2680 ; RV32I-NEXT: mv s4, a0
2680 ; RV32I-NEXT: mv s1, a0
26812681 ; RV32I-NEXT: lbu a0, 0(a0)
26822682 ; RV32I-NEXT: slli a1, a1, 24
2683 ; RV32I-NEXT: srai s1, a1, 24
2683 ; RV32I-NEXT: srai s0, a1, 24
26842684 ; RV32I-NEXT: addi s3, sp, 11
26852685 ; RV32I-NEXT: .LBB39_1: # %atomicrmw.start
26862686 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
26872687 ; RV32I-NEXT: slli a1, a0, 24
26882688 ; RV32I-NEXT: srai a1, a1, 24
26892689 ; RV32I-NEXT: mv a2, a0
2690 ; RV32I-NEXT: blt s1, a1, .LBB39_3
2690 ; RV32I-NEXT: blt s0, a1, .LBB39_3
26912691 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
26922692 ; RV32I-NEXT: # in Loop: Header=BB39_1 Depth=1
26932693 ; RV32I-NEXT: mv a2, s2
26942694 ; RV32I-NEXT: .LBB39_3: # %atomicrmw.start
26952695 ; RV32I-NEXT: # in Loop: Header=BB39_1 Depth=1
26962696 ; RV32I-NEXT: sb a0, 11(sp)
2697 ; RV32I-NEXT: mv a0, s4
2697 ; RV32I-NEXT: mv a0, s1
26982698 ; RV32I-NEXT: mv a1, s3
26992699 ; RV32I-NEXT: addi a3, zero, 5
27002700 ; RV32I-NEXT: addi a4, zero, 5
27032703 ; RV32I-NEXT: lb a0, 11(sp)
27042704 ; RV32I-NEXT: beqz a1, .LBB39_1
27052705 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
2706 ; RV32I-NEXT: lw s4, 12(sp)
2707 ; RV32I-NEXT: lw s3, 16(sp)
2708 ; RV32I-NEXT: lw s2, 20(sp)
2709 ; RV32I-NEXT: lw s1, 24(sp)
2706 ; RV32I-NEXT: lw s3, 12(sp)
2707 ; RV32I-NEXT: lw s2, 16(sp)
2708 ; RV32I-NEXT: lw s1, 20(sp)
2709 ; RV32I-NEXT: lw s0, 24(sp)
27102710 ; RV32I-NEXT: lw ra, 28(sp)
27112711 ; RV32I-NEXT: addi sp, sp, 32
27122712 ; RV32I-NEXT: ret
27452745 ; RV64I: # %bb.0:
27462746 ; RV64I-NEXT: addi sp, sp, -48
27472747 ; RV64I-NEXT: sd ra, 40(sp)
2748 ; RV64I-NEXT: sd s1, 32(sp)
2749 ; RV64I-NEXT: sd s2, 24(sp)
2750 ; RV64I-NEXT: sd s3, 16(sp)
2751 ; RV64I-NEXT: sd s4, 8(sp)
2748 ; RV64I-NEXT: sd s0, 32(sp)
2749 ; RV64I-NEXT: sd s1, 24(sp)
2750 ; RV64I-NEXT: sd s2, 16(sp)
2751 ; RV64I-NEXT: sd s3, 8(sp)
27522752 ; RV64I-NEXT: mv s2, a1
2753 ; RV64I-NEXT: mv s4, a0
2753 ; RV64I-NEXT: mv s1, a0
27542754 ; RV64I-NEXT: lbu a0, 0(a0)
27552755 ; RV64I-NEXT: slli a1, a1, 56
2756 ; RV64I-NEXT: srai s1, a1, 56
2756 ; RV64I-NEXT: srai s0, a1, 56
27572757 ; RV64I-NEXT: addi s3, sp, 7
27582758 ; RV64I-NEXT: .LBB39_1: # %atomicrmw.start
27592759 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
27602760 ; RV64I-NEXT: slli a1, a0, 56
27612761 ; RV64I-NEXT: srai a1, a1, 56
27622762 ; RV64I-NEXT: mv a2, a0
2763 ; RV64I-NEXT: blt s1, a1, .LBB39_3
2763 ; RV64I-NEXT: blt s0, a1, .LBB39_3
27642764 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
27652765 ; RV64I-NEXT: # in Loop: Header=BB39_1 Depth=1
27662766 ; RV64I-NEXT: mv a2, s2
27672767 ; RV64I-NEXT: .LBB39_3: # %atomicrmw.start
27682768 ; RV64I-NEXT: # in Loop: Header=BB39_1 Depth=1
27692769 ; RV64I-NEXT: sb a0, 7(sp)
2770 ; RV64I-NEXT: mv a0, s4
2770 ; RV64I-NEXT: mv a0, s1
27712771 ; RV64I-NEXT: mv a1, s3
27722772 ; RV64I-NEXT: addi a3, zero, 5
27732773 ; RV64I-NEXT: addi a4, zero, 5
27762776 ; RV64I-NEXT: lb a0, 7(sp)
27772777 ; RV64I-NEXT: beqz a1, .LBB39_1
27782778 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
2779 ; RV64I-NEXT: ld s4, 8(sp)
2780 ; RV64I-NEXT: ld s3, 16(sp)
2781 ; RV64I-NEXT: ld s2, 24(sp)
2782 ; RV64I-NEXT: ld s1, 32(sp)
2779 ; RV64I-NEXT: ld s3, 8(sp)
2780 ; RV64I-NEXT: ld s2, 16(sp)
2781 ; RV64I-NEXT: ld s1, 24(sp)
2782 ; RV64I-NEXT: ld s0, 32(sp)
27832783 ; RV64I-NEXT: ld ra, 40(sp)
27842784 ; RV64I-NEXT: addi sp, sp, 48
27852785 ; RV64I-NEXT: ret
28222822 ; RV32I: # %bb.0:
28232823 ; RV32I-NEXT: addi sp, sp, -32
28242824 ; RV32I-NEXT: sw ra, 28(sp)
2825 ; RV32I-NEXT: sw s1, 24(sp)
2826 ; RV32I-NEXT: sw s2, 20(sp)
2827 ; RV32I-NEXT: sw s3, 16(sp)
2828 ; RV32I-NEXT: sw s4, 12(sp)
2825 ; RV32I-NEXT: sw s0, 24(sp)
2826 ; RV32I-NEXT: sw s1, 20(sp)
2827 ; RV32I-NEXT: sw s2, 16(sp)
2828 ; RV32I-NEXT: sw s3, 12(sp)
28292829 ; RV32I-NEXT: mv s2, a1
2830 ; RV32I-NEXT: mv s4, a0
2830 ; RV32I-NEXT: mv s1, a0
28312831 ; RV32I-NEXT: lbu a0, 0(a0)
28322832 ; RV32I-NEXT: slli a1, a1, 24
2833 ; RV32I-NEXT: srai s1, a1, 24
2833 ; RV32I-NEXT: srai s0, a1, 24
28342834 ; RV32I-NEXT: addi s3, sp, 11
28352835 ; RV32I-NEXT: .LBB40_1: # %atomicrmw.start
28362836 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
28372837 ; RV32I-NEXT: slli a1, a0, 24
28382838 ; RV32I-NEXT: srai a1, a1, 24
28392839 ; RV32I-NEXT: mv a2, a0
2840 ; RV32I-NEXT: bge s1, a1, .LBB40_3
2840 ; RV32I-NEXT: bge s0, a1, .LBB40_3
28412841 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
28422842 ; RV32I-NEXT: # in Loop: Header=BB40_1 Depth=1
28432843 ; RV32I-NEXT: mv a2, s2
28442844 ; RV32I-NEXT: .LBB40_3: # %atomicrmw.start
28452845 ; RV32I-NEXT: # in Loop: Header=BB40_1 Depth=1
28462846 ; RV32I-NEXT: sb a0, 11(sp)
2847 ; RV32I-NEXT: mv a0, s4
2847 ; RV32I-NEXT: mv a0, s1
28482848 ; RV32I-NEXT: mv a1, s3
28492849 ; RV32I-NEXT: mv a3, zero
28502850 ; RV32I-NEXT: mv a4, zero
28532853 ; RV32I-NEXT: lb a0, 11(sp)
28542854 ; RV32I-NEXT: beqz a1, .LBB40_1
28552855 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
2856 ; RV32I-NEXT: lw s4, 12(sp)
2857 ; RV32I-NEXT: lw s3, 16(sp)
2858 ; RV32I-NEXT: lw s2, 20(sp)
2859 ; RV32I-NEXT: lw s1, 24(sp)
2856 ; RV32I-NEXT: lw s3, 12(sp)
2857 ; RV32I-NEXT: lw s2, 16(sp)
2858 ; RV32I-NEXT: lw s1, 20(sp)
2859 ; RV32I-NEXT: lw s0, 24(sp)
28602860 ; RV32I-NEXT: lw ra, 28(sp)
28612861 ; RV32I-NEXT: addi sp, sp, 32
28622862 ; RV32I-NEXT: ret
28952895 ; RV64I: # %bb.0:
28962896 ; RV64I-NEXT: addi sp, sp, -48
28972897 ; RV64I-NEXT: sd ra, 40(sp)
2898 ; RV64I-NEXT: sd s1, 32(sp)
2899 ; RV64I-NEXT: sd s2, 24(sp)
2900 ; RV64I-NEXT: sd s3, 16(sp)
2901 ; RV64I-NEXT: sd s4, 8(sp)
2898 ; RV64I-NEXT: sd s0, 32(sp)
2899 ; RV64I-NEXT: sd s1, 24(sp)
2900 ; RV64I-NEXT: sd s2, 16(sp)
2901 ; RV64I-NEXT: sd s3, 8(sp)
29022902 ; RV64I-NEXT: mv s2, a1
2903 ; RV64I-NEXT: mv s4, a0
2903 ; RV64I-NEXT: mv s1, a0
29042904 ; RV64I-NEXT: lbu a0, 0(a0)
29052905 ; RV64I-NEXT: slli a1, a1, 56
2906 ; RV64I-NEXT: srai s1, a1, 56
2906 ; RV64I-NEXT: srai s0, a1, 56
29072907 ; RV64I-NEXT: addi s3, sp, 7
29082908 ; RV64I-NEXT: .LBB40_1: # %atomicrmw.start
29092909 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
29102910 ; RV64I-NEXT: slli a1, a0, 56
29112911 ; RV64I-NEXT: srai a1, a1, 56
29122912 ; RV64I-NEXT: mv a2, a0
2913 ; RV64I-NEXT: bge s1, a1, .LBB40_3
2913 ; RV64I-NEXT: bge s0, a1, .LBB40_3
29142914 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
29152915 ; RV64I-NEXT: # in Loop: Header=BB40_1 Depth=1
29162916 ; RV64I-NEXT: mv a2, s2
29172917 ; RV64I-NEXT: .LBB40_3: # %atomicrmw.start
29182918 ; RV64I-NEXT: # in Loop: Header=BB40_1 Depth=1
29192919 ; RV64I-NEXT: sb a0, 7(sp)
2920 ; RV64I-NEXT: mv a0, s4
2920 ; RV64I-NEXT: mv a0, s1
29212921 ; RV64I-NEXT: mv a1, s3
29222922 ; RV64I-NEXT: mv a3, zero
29232923 ; RV64I-NEXT: mv a4, zero
29262926 ; RV64I-NEXT: lb a0, 7(sp)
29272927 ; RV64I-NEXT: beqz a1, .LBB40_1
29282928 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
2929 ; RV64I-NEXT: ld s4, 8(sp)
2930 ; RV64I-NEXT: ld s3, 16(sp)
2931 ; RV64I-NEXT: ld s2, 24(sp)
2932 ; RV64I-NEXT: ld s1, 32(sp)
2929 ; RV64I-NEXT: ld s3, 8(sp)
2930 ; RV64I-NEXT: ld s2, 16(sp)
2931 ; RV64I-NEXT: ld s1, 24(sp)
2932 ; RV64I-NEXT: ld s0, 32(sp)
29332933 ; RV64I-NEXT: ld ra, 40(sp)
29342934 ; RV64I-NEXT: addi sp, sp, 48
29352935 ; RV64I-NEXT: ret
29722972 ; RV32I: # %bb.0:
29732973 ; RV32I-NEXT: addi sp, sp, -32
29742974 ; RV32I-NEXT: sw ra, 28(sp)
2975 ; RV32I-NEXT: sw s1, 24(sp)
2976 ; RV32I-NEXT: sw s2, 20(sp)
2977 ; RV32I-NEXT: sw s3, 16(sp)
2978 ; RV32I-NEXT: sw s4, 12(sp)
2975 ; RV32I-NEXT: sw s0, 24(sp)
2976 ; RV32I-NEXT: sw s1, 20(sp)
2977 ; RV32I-NEXT: sw s2, 16(sp)
2978 ; RV32I-NEXT: sw s3, 12(sp)
29792979 ; RV32I-NEXT: mv s2, a1
2980 ; RV32I-NEXT: mv s4, a0
2980 ; RV32I-NEXT: mv s1, a0
29812981 ; RV32I-NEXT: lbu a0, 0(a0)
29822982 ; RV32I-NEXT: slli a1, a1, 24
2983 ; RV32I-NEXT: srai s1, a1, 24
2983 ; RV32I-NEXT: srai s0, a1, 24
29842984 ; RV32I-NEXT: addi s3, sp, 11
29852985 ; RV32I-NEXT: .LBB41_1: # %atomicrmw.start
29862986 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
29872987 ; RV32I-NEXT: slli a1, a0, 24
29882988 ; RV32I-NEXT: srai a1, a1, 24
29892989 ; RV32I-NEXT: mv a2, a0
2990 ; RV32I-NEXT: bge s1, a1, .LBB41_3
2990 ; RV32I-NEXT: bge s0, a1, .LBB41_3
29912991 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
29922992 ; RV32I-NEXT: # in Loop: Header=BB41_1 Depth=1
29932993 ; RV32I-NEXT: mv a2, s2
29942994 ; RV32I-NEXT: .LBB41_3: # %atomicrmw.start
29952995 ; RV32I-NEXT: # in Loop: Header=BB41_1 Depth=1
29962996 ; RV32I-NEXT: sb a0, 11(sp)
2997 ; RV32I-NEXT: mv a0, s4
2997 ; RV32I-NEXT: mv a0, s1
29982998 ; RV32I-NEXT: mv a1, s3
29992999 ; RV32I-NEXT: addi a3, zero, 2
30003000 ; RV32I-NEXT: addi a4, zero, 2
30033003 ; RV32I-NEXT: lb a0, 11(sp)
30043004 ; RV32I-NEXT: beqz a1, .LBB41_1
30053005 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
3006 ; RV32I-NEXT: lw s4, 12(sp)
3007 ; RV32I-NEXT: lw s3, 16(sp)
3008 ; RV32I-NEXT: lw s2, 20(sp)
3009 ; RV32I-NEXT: lw s1, 24(sp)
3006 ; RV32I-NEXT: lw s3, 12(sp)
3007 ; RV32I-NEXT: lw s2, 16(sp)
3008 ; RV32I-NEXT: lw s1, 20(sp)
3009 ; RV32I-NEXT: lw s0, 24(sp)
30103010 ; RV32I-NEXT: lw ra, 28(sp)
30113011 ; RV32I-NEXT: addi sp, sp, 32
30123012 ; RV32I-NEXT: ret
30453045 ; RV64I: # %bb.0:
30463046 ; RV64I-NEXT: addi sp, sp, -48
30473047 ; RV64I-NEXT: sd ra, 40(sp)
3048 ; RV64I-NEXT: sd s1, 32(sp)
3049 ; RV64I-NEXT: sd s2, 24(sp)
3050 ; RV64I-NEXT: sd s3, 16(sp)
3051 ; RV64I-NEXT: sd s4, 8(sp)
3048 ; RV64I-NEXT: sd s0, 32(sp)
3049 ; RV64I-NEXT: sd s1, 24(sp)
3050 ; RV64I-NEXT: sd s2, 16(sp)
3051 ; RV64I-NEXT: sd s3, 8(sp)
30523052 ; RV64I-NEXT: mv s2, a1
3053 ; RV64I-NEXT: mv s4, a0
3053 ; RV64I-NEXT: mv s1, a0
30543054 ; RV64I-NEXT: lbu a0, 0(a0)
30553055 ; RV64I-NEXT: slli a1, a1, 56
3056 ; RV64I-NEXT: srai s1, a1, 56
3056 ; RV64I-NEXT: srai s0, a1, 56
30573057 ; RV64I-NEXT: addi s3, sp, 7
30583058 ; RV64I-NEXT: .LBB41_1: # %atomicrmw.start
30593059 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
30603060 ; RV64I-NEXT: slli a1, a0, 56
30613061 ; RV64I-NEXT: srai a1, a1, 56
30623062 ; RV64I-NEXT: mv a2, a0
3063 ; RV64I-NEXT: bge s1, a1, .LBB41_3
3063 ; RV64I-NEXT: bge s0, a1, .LBB41_3
30643064 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
30653065 ; RV64I-NEXT: # in Loop: Header=BB41_1 Depth=1
30663066 ; RV64I-NEXT: mv a2, s2
30673067 ; RV64I-NEXT: .LBB41_3: # %atomicrmw.start
30683068 ; RV64I-NEXT: # in Loop: Header=BB41_1 Depth=1
30693069 ; RV64I-NEXT: sb a0, 7(sp)
3070 ; RV64I-NEXT: mv a0, s4
3070 ; RV64I-NEXT: mv a0, s1
30713071 ; RV64I-NEXT: mv a1, s3
30723072 ; RV64I-NEXT: addi a3, zero, 2
30733073 ; RV64I-NEXT: addi a4, zero, 2
30763076 ; RV64I-NEXT: lb a0, 7(sp)
30773077 ; RV64I-NEXT: beqz a1, .LBB41_1
30783078 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
3079 ; RV64I-NEXT: ld s4, 8(sp)
3080 ; RV64I-NEXT: ld s3, 16(sp)
3081 ; RV64I-NEXT: ld s2, 24(sp)
3082 ; RV64I-NEXT: ld s1, 32(sp)
3079 ; RV64I-NEXT: ld s3, 8(sp)
3080 ; RV64I-NEXT: ld s2, 16(sp)
3081 ; RV64I-NEXT: ld s1, 24(sp)
3082 ; RV64I-NEXT: ld s0, 32(sp)
30833083 ; RV64I-NEXT: ld ra, 40(sp)
30843084 ; RV64I-NEXT: addi sp, sp, 48
30853085 ; RV64I-NEXT: ret
31223122 ; RV32I: # %bb.0:
31233123 ; RV32I-NEXT: addi sp, sp, -32
31243124 ; RV32I-NEXT: sw ra, 28(sp)
3125 ; RV32I-NEXT: sw s1, 24(sp)
3126 ; RV32I-NEXT: sw s2, 20(sp)
3127 ; RV32I-NEXT: sw s3, 16(sp)
3128 ; RV32I-NEXT: sw s4, 12(sp)
3125 ; RV32I-NEXT: sw s0, 24(sp)
3126 ; RV32I-NEXT: sw s1, 20(sp)
3127 ; RV32I-NEXT: sw s2, 16(sp)
3128 ; RV32I-NEXT: sw s3, 12(sp)
31293129 ; RV32I-NEXT: mv s2, a1
3130 ; RV32I-NEXT: mv s4, a0
3130 ; RV32I-NEXT: mv s1, a0
31313131 ; RV32I-NEXT: lbu a0, 0(a0)
31323132 ; RV32I-NEXT: slli a1, a1, 24
3133 ; RV32I-NEXT: srai s1, a1, 24
3133 ; RV32I-NEXT: srai s0, a1, 24
31343134 ; RV32I-NEXT: addi s3, sp, 11
31353135 ; RV32I-NEXT: .LBB42_1: # %atomicrmw.start
31363136 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
31373137 ; RV32I-NEXT: slli a1, a0, 24
31383138 ; RV32I-NEXT: srai a1, a1, 24
31393139 ; RV32I-NEXT: mv a2, a0
3140 ; RV32I-NEXT: bge s1, a1, .LBB42_3
3140 ; RV32I-NEXT: bge s0, a1, .LBB42_3
31413141 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
31423142 ; RV32I-NEXT: # in Loop: Header=BB42_1 Depth=1
31433143 ; RV32I-NEXT: mv a2, s2
31443144 ; RV32I-NEXT: .LBB42_3: # %atomicrmw.start
31453145 ; RV32I-NEXT: # in Loop: Header=BB42_1 Depth=1
31463146 ; RV32I-NEXT: sb a0, 11(sp)
3147 ; RV32I-NEXT: mv a0, s4
3147 ; RV32I-NEXT: mv a0, s1
31483148 ; RV32I-NEXT: mv a1, s3
31493149 ; RV32I-NEXT: addi a3, zero, 3
31503150 ; RV32I-NEXT: mv a4, zero
31533153 ; RV32I-NEXT: lb a0, 11(sp)
31543154 ; RV32I-NEXT: beqz a1, .LBB42_1
31553155 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
3156 ; RV32I-NEXT: lw s4, 12(sp)
3157 ; RV32I-NEXT: lw s3, 16(sp)
3158 ; RV32I-NEXT: lw s2, 20(sp)
3159 ; RV32I-NEXT: lw s1, 24(sp)
3156 ; RV32I-NEXT: lw s3, 12(sp)
3157 ; RV32I-NEXT: lw s2, 16(sp)
3158 ; RV32I-NEXT: lw s1, 20(sp)
3159 ; RV32I-NEXT: lw s0, 24(sp)
31603160 ; RV32I-NEXT: lw ra, 28(sp)
31613161 ; RV32I-NEXT: addi sp, sp, 32
31623162 ; RV32I-NEXT: ret
31953195 ; RV64I: # %bb.0:
31963196 ; RV64I-NEXT: addi sp, sp, -48
31973197 ; RV64I-NEXT: sd ra, 40(sp)
3198 ; RV64I-NEXT: sd s1, 32(sp)
3199 ; RV64I-NEXT: sd s2, 24(sp)
3200 ; RV64I-NEXT: sd s3, 16(sp)
3201 ; RV64I-NEXT: sd s4, 8(sp)
3198 ; RV64I-NEXT: sd s0, 32(sp)
3199 ; RV64I-NEXT: sd s1, 24(sp)
3200 ; RV64I-NEXT: sd s2, 16(sp)
3201 ; RV64I-NEXT: sd s3, 8(sp)
32023202 ; RV64I-NEXT: mv s2, a1
3203 ; RV64I-NEXT: mv s4, a0
3203 ; RV64I-NEXT: mv s1, a0
32043204 ; RV64I-NEXT: lbu a0, 0(a0)
32053205 ; RV64I-NEXT: slli a1, a1, 56
3206 ; RV64I-NEXT: srai s1, a1, 56
3206 ; RV64I-NEXT: srai s0, a1, 56
32073207 ; RV64I-NEXT: addi s3, sp, 7
32083208 ; RV64I-NEXT: .LBB42_1: # %atomicrmw.start
32093209 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
32103210 ; RV64I-NEXT: slli a1, a0, 56
32113211 ; RV64I-NEXT: srai a1, a1, 56
32123212 ; RV64I-NEXT: mv a2, a0
3213 ; RV64I-NEXT: bge s1, a1, .LBB42_3
3213 ; RV64I-NEXT: bge s0, a1, .LBB42_3
32143214 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
32153215 ; RV64I-NEXT: # in Loop: Header=BB42_1 Depth=1
32163216 ; RV64I-NEXT: mv a2, s2
32173217 ; RV64I-NEXT: .LBB42_3: # %atomicrmw.start
32183218 ; RV64I-NEXT: # in Loop: Header=BB42_1 Depth=1
32193219 ; RV64I-NEXT: sb a0, 7(sp)
3220 ; RV64I-NEXT: mv a0, s4
3220 ; RV64I-NEXT: mv a0, s1
32213221 ; RV64I-NEXT: mv a1, s3
32223222 ; RV64I-NEXT: addi a3, zero, 3
32233223 ; RV64I-NEXT: mv a4, zero
32263226 ; RV64I-NEXT: lb a0, 7(sp)
32273227 ; RV64I-NEXT: beqz a1, .LBB42_1
32283228 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
3229 ; RV64I-NEXT: ld s4, 8(sp)
3230 ; RV64I-NEXT: ld s3, 16(sp)
3231 ; RV64I-NEXT: ld s2, 24(sp)
3232 ; RV64I-NEXT: ld s1, 32(sp)
3229 ; RV64I-NEXT: ld s3, 8(sp)
3230 ; RV64I-NEXT: ld s2, 16(sp)
3231 ; RV64I-NEXT: ld s1, 24(sp)
3232 ; RV64I-NEXT: ld s0, 32(sp)
32333233 ; RV64I-NEXT: ld ra, 40(sp)
32343234 ; RV64I-NEXT: addi sp, sp, 48
32353235 ; RV64I-NEXT: ret
32723272 ; RV32I: # %bb.0:
32733273 ; RV32I-NEXT: addi sp, sp, -32
32743274 ; RV32I-NEXT: sw ra, 28(sp)
3275 ; RV32I-NEXT: sw s1, 24(sp)
3276 ; RV32I-NEXT: sw s2, 20(sp)
3277 ; RV32I-NEXT: sw s3, 16(sp)
3278 ; RV32I-NEXT: sw s4, 12(sp)
3275 ; RV32I-NEXT: sw s0, 24(sp)
3276 ; RV32I-NEXT: sw s1, 20(sp)
3277 ; RV32I-NEXT: sw s2, 16(sp)
3278 ; RV32I-NEXT: sw s3, 12(sp)
32793279 ; RV32I-NEXT: mv s2, a1
3280 ; RV32I-NEXT: mv s4, a0
3280 ; RV32I-NEXT: mv s1, a0
32813281 ; RV32I-NEXT: lbu a0, 0(a0)
32823282 ; RV32I-NEXT: slli a1, a1, 24
3283 ; RV32I-NEXT: srai s1, a1, 24
3283 ; RV32I-NEXT: srai s0, a1, 24
32843284 ; RV32I-NEXT: addi s3, sp, 11
32853285 ; RV32I-NEXT: .LBB43_1: # %atomicrmw.start
32863286 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
32873287 ; RV32I-NEXT: slli a1, a0, 24
32883288 ; RV32I-NEXT: srai a1, a1, 24
32893289 ; RV32I-NEXT: mv a2, a0
3290 ; RV32I-NEXT: bge s1, a1, .LBB43_3
3290 ; RV32I-NEXT: bge s0, a1, .LBB43_3
32913291 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
32923292 ; RV32I-NEXT: # in Loop: Header=BB43_1 Depth=1
32933293 ; RV32I-NEXT: mv a2, s2
32943294 ; RV32I-NEXT: .LBB43_3: # %atomicrmw.start
32953295 ; RV32I-NEXT: # in Loop: Header=BB43_1 Depth=1
32963296 ; RV32I-NEXT: sb a0, 11(sp)
3297 ; RV32I-NEXT: mv a0, s4
3297 ; RV32I-NEXT: mv a0, s1
32983298 ; RV32I-NEXT: mv a1, s3
32993299 ; RV32I-NEXT: addi a3, zero, 4
33003300 ; RV32I-NEXT: addi a4, zero, 2
33033303 ; RV32I-NEXT: lb a0, 11(sp)
33043304 ; RV32I-NEXT: beqz a1, .LBB43_1
33053305 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
3306 ; RV32I-NEXT: lw s4, 12(sp)
3307 ; RV32I-NEXT: lw s3, 16(sp)
3308 ; RV32I-NEXT: lw s2, 20(sp)
3309 ; RV32I-NEXT: lw s1, 24(sp)
3306 ; RV32I-NEXT: lw s3, 12(sp)
3307 ; RV32I-NEXT: lw s2, 16(sp)
3308 ; RV32I-NEXT: lw s1, 20(sp)
3309 ; RV32I-NEXT: lw s0, 24(sp)
33103310 ; RV32I-NEXT: lw ra, 28(sp)
33113311 ; RV32I-NEXT: addi sp, sp, 32
33123312 ; RV32I-NEXT: ret
33453345 ; RV64I: # %bb.0:
33463346 ; RV64I-NEXT: addi sp, sp, -48
33473347 ; RV64I-NEXT: sd ra, 40(sp)
3348 ; RV64I-NEXT: sd s1, 32(sp)
3349 ; RV64I-NEXT: sd s2, 24(sp)
3350 ; RV64I-NEXT: sd s3, 16(sp)
3351 ; RV64I-NEXT: sd s4, 8(sp)
3348 ; RV64I-NEXT: sd s0, 32(sp)
3349 ; RV64I-NEXT: sd s1, 24(sp)
3350 ; RV64I-NEXT: sd s2, 16(sp)
3351 ; RV64I-NEXT: sd s3, 8(sp)
33523352 ; RV64I-NEXT: mv s2, a1
3353 ; RV64I-NEXT: mv s4, a0
3353 ; RV64I-NEXT: mv s1, a0
33543354 ; RV64I-NEXT: lbu a0, 0(a0)
33553355 ; RV64I-NEXT: slli a1, a1, 56
3356 ; RV64I-NEXT: srai s1, a1, 56
3356 ; RV64I-NEXT: srai s0, a1, 56
33573357 ; RV64I-NEXT: addi s3, sp, 7
33583358 ; RV64I-NEXT: .LBB43_1: # %atomicrmw.start
33593359 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
33603360 ; RV64I-NEXT: slli a1, a0, 56
33613361 ; RV64I-NEXT: srai a1, a1, 56
33623362 ; RV64I-NEXT: mv a2, a0
3363 ; RV64I-NEXT: bge s1, a1, .LBB43_3
3363 ; RV64I-NEXT: bge s0, a1, .LBB43_3
33643364 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
33653365 ; RV64I-NEXT: # in Loop: Header=BB43_1 Depth=1
33663366 ; RV64I-NEXT: mv a2, s2
33673367 ; RV64I-NEXT: .LBB43_3: # %atomicrmw.start
33683368 ; RV64I-NEXT: # in Loop: Header=BB43_1 Depth=1
33693369 ; RV64I-NEXT: sb a0, 7(sp)
3370 ; RV64I-NEXT: mv a0, s4
3370 ; RV64I-NEXT: mv a0, s1
33713371 ; RV64I-NEXT: mv a1, s3
33723372 ; RV64I-NEXT: addi a3, zero, 4
33733373 ; RV64I-NEXT: addi a4, zero, 2
33763376 ; RV64I-NEXT: lb a0, 7(sp)
33773377 ; RV64I-NEXT: beqz a1, .LBB43_1
33783378 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
3379 ; RV64I-NEXT: ld s4, 8(sp)
3380 ; RV64I-NEXT: ld s3, 16(sp)
3381 ; RV64I-NEXT: ld s2, 24(sp)
3382 ; RV64I-NEXT: ld s1, 32(sp)
3379 ; RV64I-NEXT: ld s3, 8(sp)
3380 ; RV64I-NEXT: ld s2, 16(sp)
3381 ; RV64I-NEXT: ld s1, 24(sp)
3382 ; RV64I-NEXT: ld s0, 32(sp)
33833383 ; RV64I-NEXT: ld ra, 40(sp)
33843384 ; RV64I-NEXT: addi sp, sp, 48
33853385 ; RV64I-NEXT: ret
34223422 ; RV32I: # %bb.0:
34233423 ; RV32I-NEXT: addi sp, sp, -32
34243424 ; RV32I-NEXT: sw ra, 28(sp)
3425 ; RV32I-NEXT: sw s1, 24(sp)
3426 ; RV32I-NEXT: sw s2, 20(sp)
3427 ; RV32I-NEXT: sw s3, 16(sp)
3428 ; RV32I-NEXT: sw s4, 12(sp)
3425 ; RV32I-NEXT: sw s0, 24(sp)
3426 ; RV32I-NEXT: sw s1, 20(sp)
3427 ; RV32I-NEXT: sw s2, 16(sp)
3428 ; RV32I-NEXT: sw s3, 12(sp)
34293429 ; RV32I-NEXT: mv s2, a1
3430 ; RV32I-NEXT: mv s4, a0
3430 ; RV32I-NEXT: mv s1, a0
34313431 ; RV32I-NEXT: lbu a0, 0(a0)
34323432 ; RV32I-NEXT: slli a1, a1, 24
3433 ; RV32I-NEXT: srai s1, a1, 24
3433 ; RV32I-NEXT: srai s0, a1, 24
34343434 ; RV32I-NEXT: addi s3, sp, 11
34353435 ; RV32I-NEXT: .LBB44_1: # %atomicrmw.start
34363436 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
34373437 ; RV32I-NEXT: slli a1, a0, 24
34383438 ; RV32I-NEXT: srai a1, a1, 24
34393439 ; RV32I-NEXT: mv a2, a0
3440 ; RV32I-NEXT: bge s1, a1, .LBB44_3
3440 ; RV32I-NEXT: bge s0, a1, .LBB44_3
34413441 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
34423442 ; RV32I-NEXT: # in Loop: Header=BB44_1 Depth=1
34433443 ; RV32I-NEXT: mv a2, s2
34443444 ; RV32I-NEXT: .LBB44_3: # %atomicrmw.start
34453445 ; RV32I-NEXT: # in Loop: Header=BB44_1 Depth=1
34463446 ; RV32I-NEXT: sb a0, 11(sp)
3447 ; RV32I-NEXT: mv a0, s4
3447 ; RV32I-NEXT: mv a0, s1
34483448 ; RV32I-NEXT: mv a1, s3
34493449 ; RV32I-NEXT: addi a3, zero, 5
34503450 ; RV32I-NEXT: addi a4, zero, 5
34533453 ; RV32I-NEXT: lb a0, 11(sp)
34543454 ; RV32I-NEXT: beqz a1, .LBB44_1
34553455 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
3456 ; RV32I-NEXT: lw s4, 12(sp)
3457 ; RV32I-NEXT: lw s3, 16(sp)
3458 ; RV32I-NEXT: lw s2, 20(sp)
3459 ; RV32I-NEXT: lw s1, 24(sp)
3456 ; RV32I-NEXT: lw s3, 12(sp)
3457 ; RV32I-NEXT: lw s2, 16(sp)
3458 ; RV32I-NEXT: lw s1, 20(sp)
3459 ; RV32I-NEXT: lw s0, 24(sp)
34603460 ; RV32I-NEXT: lw ra, 28(sp)
34613461 ; RV32I-NEXT: addi sp, sp, 32
34623462 ; RV32I-NEXT: ret
34953495 ; RV64I: # %bb.0:
34963496 ; RV64I-NEXT: addi sp, sp, -48
34973497 ; RV64I-NEXT: sd ra, 40(sp)
3498 ; RV64I-NEXT: sd s1, 32(sp)
3499 ; RV64I-NEXT: sd s2, 24(sp)
3500 ; RV64I-NEXT: sd s3, 16(sp)
3501 ; RV64I-NEXT: sd s4, 8(sp)
3498 ; RV64I-NEXT: sd s0, 32(sp)
3499 ; RV64I-NEXT: sd s1, 24(sp)
3500 ; RV64I-NEXT: sd s2, 16(sp)
3501 ; RV64I-NEXT: sd s3, 8(sp)
35023502 ; RV64I-NEXT: mv s2, a1
3503 ; RV64I-NEXT: mv s4, a0
3503 ; RV64I-NEXT: mv s1, a0
35043504 ; RV64I-NEXT: lbu a0, 0(a0)
35053505 ; RV64I-NEXT: slli a1, a1, 56
3506 ; RV64I-NEXT: srai s1, a1, 56
3506 ; RV64I-NEXT: srai s0, a1, 56
35073507 ; RV64I-NEXT: addi s3, sp, 7
35083508 ; RV64I-NEXT: .LBB44_1: # %atomicrmw.start
35093509 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
35103510 ; RV64I-NEXT: slli a1, a0, 56
35113511 ; RV64I-NEXT: srai a1, a1, 56
35123512 ; RV64I-NEXT: mv a2, a0
3513 ; RV64I-NEXT: bge s1, a1, .LBB44_3
3513 ; RV64I-NEXT: bge s0, a1, .LBB44_3
35143514 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
35153515 ; RV64I-NEXT: # in Loop: Header=BB44_1 Depth=1
35163516 ; RV64I-NEXT: mv a2, s2
35173517 ; RV64I-NEXT: .LBB44_3: # %atomicrmw.start
35183518 ; RV64I-NEXT: # in Loop: Header=BB44_1 Depth=1
35193519 ; RV64I-NEXT: sb a0, 7(sp)
3520 ; RV64I-NEXT: mv a0, s4
3520 ; RV64I-NEXT: mv a0, s1
35213521 ; RV64I-NEXT: mv a1, s3
35223522 ; RV64I-NEXT: addi a3, zero, 5
35233523 ; RV64I-NEXT: addi a4, zero, 5
35263526 ; RV64I-NEXT: lb a0, 7(sp)
35273527 ; RV64I-NEXT: beqz a1, .LBB44_1
35283528 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
3529 ; RV64I-NEXT: ld s4, 8(sp)
3530 ; RV64I-NEXT: ld s3, 16(sp)
3531 ; RV64I-NEXT: ld s2, 24(sp)
3532 ; RV64I-NEXT: ld s1, 32(sp)
3529 ; RV64I-NEXT: ld s3, 8(sp)
3530 ; RV64I-NEXT: ld s2, 16(sp)
3531 ; RV64I-NEXT: ld s1, 24(sp)
3532 ; RV64I-NEXT: ld s0, 32(sp)
35333533 ; RV64I-NEXT: ld ra, 40(sp)
35343534 ; RV64I-NEXT: addi sp, sp, 48
35353535 ; RV64I-NEXT: ret
35723572 ; RV32I: # %bb.0:
35733573 ; RV32I-NEXT: addi sp, sp, -32
35743574 ; RV32I-NEXT: sw ra, 28(sp)
3575 ; RV32I-NEXT: sw s1, 24(sp)
3576 ; RV32I-NEXT: sw s2, 20(sp)
3577 ; RV32I-NEXT: sw s3, 16(sp)
3578 ; RV32I-NEXT: sw s4, 12(sp)
3575 ; RV32I-NEXT: sw s0, 24(sp)
3576 ; RV32I-NEXT: sw s1, 20(sp)
3577 ; RV32I-NEXT: sw s2, 16(sp)
3578 ; RV32I-NEXT: sw s3, 12(sp)
35793579 ; RV32I-NEXT: mv s2, a1
3580 ; RV32I-NEXT: mv s4, a0
3580 ; RV32I-NEXT: mv s1, a0
35813581 ; RV32I-NEXT: lbu a0, 0(a0)
3582 ; RV32I-NEXT: andi s1, a1, 255
3582 ; RV32I-NEXT: andi s0, a1, 255
35833583 ; RV32I-NEXT: addi s3, sp, 11
35843584 ; RV32I-NEXT: .LBB45_1: # %atomicrmw.start
35853585 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
35863586 ; RV32I-NEXT: andi a1, a0, 255
35873587 ; RV32I-NEXT: mv a2, a0
3588 ; RV32I-NEXT: bltu s1, a1, .LBB45_3
3588 ; RV32I-NEXT: bltu s0, a1, .LBB45_3
35893589 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
35903590 ; RV32I-NEXT: # in Loop: Header=BB45_1 Depth=1
35913591 ; RV32I-NEXT: mv a2, s2
35923592 ; RV32I-NEXT: .LBB45_3: # %atomicrmw.start
35933593 ; RV32I-NEXT: # in Loop: Header=BB45_1 Depth=1
35943594 ; RV32I-NEXT: sb a0, 11(sp)
3595 ; RV32I-NEXT: mv a0, s4
3595 ; RV32I-NEXT: mv a0, s1
35963596 ; RV32I-NEXT: mv a1, s3
35973597 ; RV32I-NEXT: mv a3, zero
35983598 ; RV32I-NEXT: mv a4, zero
36013601 ; RV32I-NEXT: lb a0, 11(sp)
36023602 ; RV32I-NEXT: beqz a1, .LBB45_1
36033603 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
3604 ; RV32I-NEXT: lw s4, 12(sp)
3605 ; RV32I-NEXT: lw s3, 16(sp)
3606 ; RV32I-NEXT: lw s2, 20(sp)
3607 ; RV32I-NEXT: lw s1, 24(sp)
3604 ; RV32I-NEXT: lw s3, 12(sp)
3605 ; RV32I-NEXT: lw s2, 16(sp)
3606 ; RV32I-NEXT: lw s1, 20(sp)
3607 ; RV32I-NEXT: lw s0, 24(sp)
36083608 ; RV32I-NEXT: lw ra, 28(sp)
36093609 ; RV32I-NEXT: addi sp, sp, 32
36103610 ; RV32I-NEXT: ret
36383638 ; RV64I: # %bb.0:
36393639 ; RV64I-NEXT: addi sp, sp, -48
36403640 ; RV64I-NEXT: sd ra, 40(sp)
3641 ; RV64I-NEXT: sd s1, 32(sp)
3642 ; RV64I-NEXT: sd s2, 24(sp)
3643 ; RV64I-NEXT: sd s3, 16(sp)
3644 ; RV64I-NEXT: sd s4, 8(sp)
3641 ; RV64I-NEXT: sd s0, 32(sp)
3642 ; RV64I-NEXT: sd s1, 24(sp)
3643 ; RV64I-NEXT: sd s2, 16(sp)
3644 ; RV64I-NEXT: sd s3, 8(sp)
36453645 ; RV64I-NEXT: mv s2, a1
3646 ; RV64I-NEXT: mv s4, a0
3646 ; RV64I-NEXT: mv s1, a0
36473647 ; RV64I-NEXT: lbu a0, 0(a0)
3648 ; RV64I-NEXT: andi s1, a1, 255
3648 ; RV64I-NEXT: andi s0, a1, 255
36493649 ; RV64I-NEXT: addi s3, sp, 7
36503650 ; RV64I-NEXT: .LBB45_1: # %atomicrmw.start
36513651 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
36523652 ; RV64I-NEXT: andi a1, a0, 255
36533653 ; RV64I-NEXT: mv a2, a0
3654 ; RV64I-NEXT: bltu s1, a1, .LBB45_3
3654 ; RV64I-NEXT: bltu s0, a1, .LBB45_3
36553655 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
36563656 ; RV64I-NEXT: # in Loop: Header=BB45_1 Depth=1
36573657 ; RV64I-NEXT: mv a2, s2
36583658 ; RV64I-NEXT: .LBB45_3: # %atomicrmw.start
36593659 ; RV64I-NEXT: # in Loop: Header=BB45_1 Depth=1
36603660 ; RV64I-NEXT: sb a0, 7(sp)
3661 ; RV64I-NEXT: mv a0, s4
3661 ; RV64I-NEXT: mv a0, s1
36623662 ; RV64I-NEXT: mv a1, s3
36633663 ; RV64I-NEXT: mv a3, zero
36643664 ; RV64I-NEXT: mv a4, zero
36673667 ; RV64I-NEXT: lb a0, 7(sp)
36683668 ; RV64I-NEXT: beqz a1, .LBB45_1
36693669 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
3670 ; RV64I-NEXT: ld s4, 8(sp)
3671 ; RV64I-NEXT: ld s3, 16(sp)
3672 ; RV64I-NEXT: ld s2, 24(sp)
3673 ; RV64I-NEXT: ld s1, 32(sp)
3670 ; RV64I-NEXT: ld s3, 8(sp)
3671 ; RV64I-NEXT: ld s2, 16(sp)
3672 ; RV64I-NEXT: ld s1, 24(sp)
3673 ; RV64I-NEXT: ld s0, 32(sp)
36743674 ; RV64I-NEXT: ld ra, 40(sp)
36753675 ; RV64I-NEXT: addi sp, sp, 48
36763676 ; RV64I-NEXT: ret
37083708 ; RV32I: # %bb.0:
37093709 ; RV32I-NEXT: addi sp, sp, -32
37103710 ; RV32I-NEXT: sw ra, 28(sp)
3711 ; RV32I-NEXT: sw s1, 24(sp)
3712 ; RV32I-NEXT: sw s2, 20(sp)
3713 ; RV32I-NEXT: sw s3, 16(sp)
3714 ; RV32I-NEXT: sw s4, 12(sp)
3711 ; RV32I-NEXT: sw s0, 24(sp)
3712 ; RV32I-NEXT: sw s1, 20(sp)
3713 ; RV32I-NEXT: sw s2, 16(sp)
3714 ; RV32I-NEXT: sw s3, 12(sp)
37153715 ; RV32I-NEXT: mv s2, a1
3716 ; RV32I-NEXT: mv s4, a0
3716 ; RV32I-NEXT: mv s1, a0
37173717 ; RV32I-NEXT: lbu a0, 0(a0)
3718 ; RV32I-NEXT: andi s1, a1, 255
3718 ; RV32I-NEXT: andi s0, a1, 255
37193719 ; RV32I-NEXT: addi s3, sp, 11
37203720 ; RV32I-NEXT: .LBB46_1: # %atomicrmw.start
37213721 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
37223722 ; RV32I-NEXT: andi a1, a0, 255
37233723 ; RV32I-NEXT: mv a2, a0
3724 ; RV32I-NEXT: bltu s1, a1, .LBB46_3
3724 ; RV32I-NEXT: bltu s0, a1, .LBB46_3
37253725 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
37263726 ; RV32I-NEXT: # in Loop: Header=BB46_1 Depth=1
37273727 ; RV32I-NEXT: mv a2, s2
37283728 ; RV32I-NEXT: .LBB46_3: # %atomicrmw.start
37293729 ; RV32I-NEXT: # in Loop: Header=BB46_1 Depth=1
37303730 ; RV32I-NEXT: sb a0, 11(sp)
3731 ; RV32I-NEXT: mv a0, s4
3731 ; RV32I-NEXT: mv a0, s1
37323732 ; RV32I-NEXT: mv a1, s3
37333733 ; RV32I-NEXT: addi a3, zero, 2
37343734 ; RV32I-NEXT: addi a4, zero, 2
37373737 ; RV32I-NEXT: lb a0, 11(sp)
37383738 ; RV32I-NEXT: beqz a1, .LBB46_1
37393739 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
3740 ; RV32I-NEXT: lw s4, 12(sp)
3741 ; RV32I-NEXT: lw s3, 16(sp)
3742 ; RV32I-NEXT: lw s2, 20(sp)
3743 ; RV32I-NEXT: lw s1, 24(sp)
3740 ; RV32I-NEXT: lw s3, 12(sp)
3741 ; RV32I-NEXT: lw s2, 16(sp)
3742 ; RV32I-NEXT: lw s1, 20(sp)
3743 ; RV32I-NEXT: lw s0, 24(sp)
37443744 ; RV32I-NEXT: lw ra, 28(sp)
37453745 ; RV32I-NEXT: addi sp, sp, 32
37463746 ; RV32I-NEXT: ret
37743774 ; RV64I: # %bb.0:
37753775 ; RV64I-NEXT: addi sp, sp, -48
37763776 ; RV64I-NEXT: sd ra, 40(sp)
3777 ; RV64I-NEXT: sd s1, 32(sp)
3778 ; RV64I-NEXT: sd s2, 24(sp)
3779 ; RV64I-NEXT: sd s3, 16(sp)
3780 ; RV64I-NEXT: sd s4, 8(sp)
3777 ; RV64I-NEXT: sd s0, 32(sp)
3778 ; RV64I-NEXT: sd s1, 24(sp)
3779 ; RV64I-NEXT: sd s2, 16(sp)
3780 ; RV64I-NEXT: sd s3, 8(sp)
37813781 ; RV64I-NEXT: mv s2, a1
3782 ; RV64I-NEXT: mv s4, a0
3782 ; RV64I-NEXT: mv s1, a0
37833783 ; RV64I-NEXT: lbu a0, 0(a0)
3784 ; RV64I-NEXT: andi s1, a1, 255
3784 ; RV64I-NEXT: andi s0, a1, 255
37853785 ; RV64I-NEXT: addi s3, sp, 7
37863786 ; RV64I-NEXT: .LBB46_1: # %atomicrmw.start
37873787 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
37883788 ; RV64I-NEXT: andi a1, a0, 255
37893789 ; RV64I-NEXT: mv a2, a0
3790 ; RV64I-NEXT: bltu s1, a1, .LBB46_3
3790 ; RV64I-NEXT: bltu s0, a1, .LBB46_3
37913791 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
37923792 ; RV64I-NEXT: # in Loop: Header=BB46_1 Depth=1
37933793 ; RV64I-NEXT: mv a2, s2
37943794 ; RV64I-NEXT: .LBB46_3: # %atomicrmw.start
37953795 ; RV64I-NEXT: # in Loop: Header=BB46_1 Depth=1
37963796 ; RV64I-NEXT: sb a0, 7(sp)
3797 ; RV64I-NEXT: mv a0, s4
3797 ; RV64I-NEXT: mv a0, s1
37983798 ; RV64I-NEXT: mv a1, s3
37993799 ; RV64I-NEXT: addi a3, zero, 2
38003800 ; RV64I-NEXT: addi a4, zero, 2
38033803 ; RV64I-NEXT: lb a0, 7(sp)
38043804 ; RV64I-NEXT: beqz a1, .LBB46_1
38053805 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
3806 ; RV64I-NEXT: ld s4, 8(sp)
3807 ; RV64I-NEXT: ld s3, 16(sp)
3808 ; RV64I-NEXT: ld s2, 24(sp)
3809 ; RV64I-NEXT: ld s1, 32(sp)
3806 ; RV64I-NEXT: ld s3, 8(sp)
3807 ; RV64I-NEXT: ld s2, 16(sp)
3808 ; RV64I-NEXT: ld s1, 24(sp)
3809 ; RV64I-NEXT: ld s0, 32(sp)
38103810 ; RV64I-NEXT: ld ra, 40(sp)
38113811 ; RV64I-NEXT: addi sp, sp, 48
38123812 ; RV64I-NEXT: ret
38443844 ; RV32I: # %bb.0:
38453845 ; RV32I-NEXT: addi sp, sp, -32
38463846 ; RV32I-NEXT: sw ra, 28(sp)
3847 ; RV32I-NEXT: sw s1, 24(sp)
3848 ; RV32I-NEXT: sw s2, 20(sp)
3849 ; RV32I-NEXT: sw s3, 16(sp)
3850 ; RV32I-NEXT: sw s4, 12(sp)
3847 ; RV32I-NEXT: sw s0, 24(sp)
3848 ; RV32I-NEXT: sw s1, 20(sp)
3849 ; RV32I-NEXT: sw s2, 16(sp)
3850 ; RV32I-NEXT: sw s3, 12(sp)
38513851 ; RV32I-NEXT: mv s2, a1
3852 ; RV32I-NEXT: mv s4, a0
3852 ; RV32I-NEXT: mv s1, a0
38533853 ; RV32I-NEXT: lbu a0, 0(a0)
3854 ; RV32I-NEXT: andi s1, a1, 255
3854 ; RV32I-NEXT: andi s0, a1, 255
38553855 ; RV32I-NEXT: addi s3, sp, 11
38563856 ; RV32I-NEXT: .LBB47_1: # %atomicrmw.start
38573857 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
38583858 ; RV32I-NEXT: andi a1, a0, 255
38593859 ; RV32I-NEXT: mv a2, a0
3860 ; RV32I-NEXT: bltu s1, a1, .LBB47_3
3860 ; RV32I-NEXT: bltu s0, a1, .LBB47_3
38613861 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
38623862 ; RV32I-NEXT: # in Loop: Header=BB47_1 Depth=1
38633863 ; RV32I-NEXT: mv a2, s2
38643864 ; RV32I-NEXT: .LBB47_3: # %atomicrmw.start
38653865 ; RV32I-NEXT: # in Loop: Header=BB47_1 Depth=1
38663866 ; RV32I-NEXT: sb a0, 11(sp)
3867 ; RV32I-NEXT: mv a0, s4
3867 ; RV32I-NEXT: mv a0, s1
38683868 ; RV32I-NEXT: mv a1, s3
38693869 ; RV32I-NEXT: addi a3, zero, 3
38703870 ; RV32I-NEXT: mv a4, zero
38733873 ; RV32I-NEXT: lb a0, 11(sp)
38743874 ; RV32I-NEXT: beqz a1, .LBB47_1
38753875 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
3876 ; RV32I-NEXT: lw s4, 12(sp)
3877 ; RV32I-NEXT: lw s3, 16(sp)
3878 ; RV32I-NEXT: lw s2, 20(sp)
3879 ; RV32I-NEXT: lw s1, 24(sp)
3876 ; RV32I-NEXT: lw s3, 12(sp)
3877 ; RV32I-NEXT: lw s2, 16(sp)
3878 ; RV32I-NEXT: lw s1, 20(sp)
3879 ; RV32I-NEXT: lw s0, 24(sp)
38803880 ; RV32I-NEXT: lw ra, 28(sp)
38813881 ; RV32I-NEXT: addi sp, sp, 32
38823882 ; RV32I-NEXT: ret
39103910 ; RV64I: # %bb.0:
39113911 ; RV64I-NEXT: addi sp, sp, -48
39123912 ; RV64I-NEXT: sd ra, 40(sp)
3913 ; RV64I-NEXT: sd s1, 32(sp)
3914 ; RV64I-NEXT: sd s2, 24(sp)
3915 ; RV64I-NEXT: sd s3, 16(sp)
3916 ; RV64I-NEXT: sd s4, 8(sp)
3913 ; RV64I-NEXT: sd s0, 32(sp)
3914 ; RV64I-NEXT: sd s1, 24(sp)
3915 ; RV64I-NEXT: sd s2, 16(sp)
3916 ; RV64I-NEXT: sd s3, 8(sp)
39173917 ; RV64I-NEXT: mv s2, a1
3918 ; RV64I-NEXT: mv s4, a0
3918 ; RV64I-NEXT: mv s1, a0
39193919 ; RV64I-NEXT: lbu a0, 0(a0)
3920 ; RV64I-NEXT: andi s1, a1, 255
3920 ; RV64I-NEXT: andi s0, a1, 255
39213921 ; RV64I-NEXT: addi s3, sp, 7
39223922 ; RV64I-NEXT: .LBB47_1: # %atomicrmw.start
39233923 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
39243924 ; RV64I-NEXT: andi a1, a0, 255
39253925 ; RV64I-NEXT: mv a2, a0
3926 ; RV64I-NEXT: bltu s1, a1, .LBB47_3
3926 ; RV64I-NEXT: bltu s0, a1, .LBB47_3
39273927 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
39283928 ; RV64I-NEXT: # in Loop: Header=BB47_1 Depth=1
39293929 ; RV64I-NEXT: mv a2, s2
39303930 ; RV64I-NEXT: .LBB47_3: # %atomicrmw.start
39313931 ; RV64I-NEXT: # in Loop: Header=BB47_1 Depth=1
39323932 ; RV64I-NEXT: sb a0, 7(sp)
3933 ; RV64I-NEXT: mv a0, s4
3933 ; RV64I-NEXT: mv a0, s1
39343934 ; RV64I-NEXT: mv a1, s3
39353935 ; RV64I-NEXT: addi a3, zero, 3
39363936 ; RV64I-NEXT: mv a4, zero
39393939 ; RV64I-NEXT: lb a0, 7(sp)
39403940 ; RV64I-NEXT: beqz a1, .LBB47_1
39413941 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
3942 ; RV64I-NEXT: ld s4, 8(sp)
3943 ; RV64I-NEXT: ld s3, 16(sp)
3944 ; RV64I-NEXT: ld s2, 24(sp)
3945 ; RV64I-NEXT: ld s1, 32(sp)
3942 ; RV64I-NEXT: ld s3, 8(sp)
3943 ; RV64I-NEXT: ld s2, 16(sp)
3944 ; RV64I-NEXT: ld s1, 24(sp)
3945 ; RV64I-NEXT: ld s0, 32(sp)
39463946 ; RV64I-NEXT: ld ra, 40(sp)
39473947 ; RV64I-NEXT: addi sp, sp, 48
39483948 ; RV64I-NEXT: ret
39803980 ; RV32I: # %bb.0:
39813981 ; RV32I-NEXT: addi sp, sp, -32
39823982 ; RV32I-NEXT: sw ra, 28(sp)
3983 ; RV32I-NEXT: sw s1, 24(sp)
3984 ; RV32I-NEXT: sw s2, 20(sp)
3985 ; RV32I-NEXT: sw s3, 16(sp)
3986 ; RV32I-NEXT: sw s4, 12(sp)
3983 ; RV32I-NEXT: sw s0, 24(sp)
3984 ; RV32I-NEXT: sw s1, 20(sp)
3985 ; RV32I-NEXT: sw s2, 16(sp)
3986 ; RV32I-NEXT: sw s3, 12(sp)
39873987 ; RV32I-NEXT: mv s2, a1
3988 ; RV32I-NEXT: mv s4, a0
3988 ; RV32I-NEXT: mv s1, a0
39893989 ; RV32I-NEXT: lbu a0, 0(a0)
3990 ; RV32I-NEXT: andi s1, a1, 255
3990 ; RV32I-NEXT: andi s0, a1, 255
39913991 ; RV32I-NEXT: addi s3, sp, 11
39923992 ; RV32I-NEXT: .LBB48_1: # %atomicrmw.start
39933993 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
39943994 ; RV32I-NEXT: andi a1, a0, 255
39953995 ; RV32I-NEXT: mv a2, a0
3996 ; RV32I-NEXT: bltu s1, a1, .LBB48_3
3996 ; RV32I-NEXT: bltu s0, a1, .LBB48_3
39973997 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
39983998 ; RV32I-NEXT: # in Loop: Header=BB48_1 Depth=1
39993999 ; RV32I-NEXT: mv a2, s2
40004000 ; RV32I-NEXT: .LBB48_3: # %atomicrmw.start
40014001 ; RV32I-NEXT: # in Loop: Header=BB48_1 Depth=1
40024002 ; RV32I-NEXT: sb a0, 11(sp)
4003 ; RV32I-NEXT: mv a0, s4
4003 ; RV32I-NEXT: mv a0, s1
40044004 ; RV32I-NEXT: mv a1, s3
40054005 ; RV32I-NEXT: addi a3, zero, 4
40064006 ; RV32I-NEXT: addi a4, zero, 2
40094009 ; RV32I-NEXT: lb a0, 11(sp)
40104010 ; RV32I-NEXT: beqz a1, .LBB48_1
40114011 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
4012 ; RV32I-NEXT: lw s4, 12(sp)
4013 ; RV32I-NEXT: lw s3, 16(sp)
4014 ; RV32I-NEXT: lw s2, 20(sp)
4015 ; RV32I-NEXT: lw s1, 24(sp)
4012 ; RV32I-NEXT: lw s3, 12(sp)
4013 ; RV32I-NEXT: lw s2, 16(sp)
4014 ; RV32I-NEXT: lw s1, 20(sp)
4015 ; RV32I-NEXT: lw s0, 24(sp)
40164016 ; RV32I-NEXT: lw ra, 28(sp)
40174017 ; RV32I-NEXT: addi sp, sp, 32
40184018 ; RV32I-NEXT: ret
40464046 ; RV64I: # %bb.0:
40474047 ; RV64I-NEXT: addi sp, sp, -48
40484048 ; RV64I-NEXT: sd ra, 40(sp)
4049 ; RV64I-NEXT: sd s1, 32(sp)
4050 ; RV64I-NEXT: sd s2, 24(sp)
4051 ; RV64I-NEXT: sd s3, 16(sp)
4052 ; RV64I-NEXT: sd s4, 8(sp)
4049 ; RV64I-NEXT: sd s0, 32(sp)
4050 ; RV64I-NEXT: sd s1, 24(sp)
4051 ; RV64I-NEXT: sd s2, 16(sp)
4052 ; RV64I-NEXT: sd s3, 8(sp)
40534053 ; RV64I-NEXT: mv s2, a1
4054 ; RV64I-NEXT: mv s4, a0
4054 ; RV64I-NEXT: mv s1, a0
40554055 ; RV64I-NEXT: lbu a0, 0(a0)
4056 ; RV64I-NEXT: andi s1, a1, 255
4056 ; RV64I-NEXT: andi s0, a1, 255
40574057 ; RV64I-NEXT: addi s3, sp, 7
40584058 ; RV64I-NEXT: .LBB48_1: # %atomicrmw.start
40594059 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
40604060 ; RV64I-NEXT: andi a1, a0, 255
40614061 ; RV64I-NEXT: mv a2, a0
4062 ; RV64I-NEXT: bltu s1, a1, .LBB48_3
4062 ; RV64I-NEXT: bltu s0, a1, .LBB48_3
40634063 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
40644064 ; RV64I-NEXT: # in Loop: Header=BB48_1 Depth=1
40654065 ; RV64I-NEXT: mv a2, s2
40664066 ; RV64I-NEXT: .LBB48_3: # %atomicrmw.start
40674067 ; RV64I-NEXT: # in Loop: Header=BB48_1 Depth=1
40684068 ; RV64I-NEXT: sb a0, 7(sp)
4069 ; RV64I-NEXT: mv a0, s4
4069 ; RV64I-NEXT: mv a0, s1
40704070 ; RV64I-NEXT: mv a1, s3
40714071 ; RV64I-NEXT: addi a3, zero, 4
40724072 ; RV64I-NEXT: addi a4, zero, 2
40754075 ; RV64I-NEXT: lb a0, 7(sp)
40764076 ; RV64I-NEXT: beqz a1, .LBB48_1
40774077 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
4078 ; RV64I-NEXT: ld s4, 8(sp)
4079 ; RV64I-NEXT: ld s3, 16(sp)
4080 ; RV64I-NEXT: ld s2, 24(sp)
4081 ; RV64I-NEXT: ld s1, 32(sp)
4078 ; RV64I-NEXT: ld s3, 8(sp)
4079 ; RV64I-NEXT: ld s2, 16(sp)
4080 ; RV64I-NEXT: ld s1, 24(sp)
4081 ; RV64I-NEXT: ld s0, 32(sp)
40824082 ; RV64I-NEXT: ld ra, 40(sp)
40834083 ; RV64I-NEXT: addi sp, sp, 48
40844084 ; RV64I-NEXT: ret
41164116 ; RV32I: # %bb.0:
41174117 ; RV32I-NEXT: addi sp, sp, -32
41184118 ; RV32I-NEXT: sw ra, 28(sp)
4119 ; RV32I-NEXT: sw s1, 24(sp)
4120 ; RV32I-NEXT: sw s2, 20(sp)
4121 ; RV32I-NEXT: sw s3, 16(sp)
4122 ; RV32I-NEXT: sw s4, 12(sp)
4119 ; RV32I-NEXT: sw s0, 24(sp)
4120 ; RV32I-NEXT: sw s1, 20(sp)
4121 ; RV32I-NEXT: sw s2, 16(sp)
4122 ; RV32I-NEXT: sw s3, 12(sp)
41234123 ; RV32I-NEXT: mv s2, a1
4124 ; RV32I-NEXT: mv s4, a0
4124 ; RV32I-NEXT: mv s1, a0
41254125 ; RV32I-NEXT: lbu a0, 0(a0)
4126 ; RV32I-NEXT: andi s1, a1, 255
4126 ; RV32I-NEXT: andi s0, a1, 255
41274127 ; RV32I-NEXT: addi s3, sp, 11
41284128 ; RV32I-NEXT: .LBB49_1: # %atomicrmw.start
41294129 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
41304130 ; RV32I-NEXT: andi a1, a0, 255
41314131 ; RV32I-NEXT: mv a2, a0
4132 ; RV32I-NEXT: bltu s1, a1, .LBB49_3
4132 ; RV32I-NEXT: bltu s0, a1, .LBB49_3
41334133 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
41344134 ; RV32I-NEXT: # in Loop: Header=BB49_1 Depth=1
41354135 ; RV32I-NEXT: mv a2, s2
41364136 ; RV32I-NEXT: .LBB49_3: # %atomicrmw.start
41374137 ; RV32I-NEXT: # in Loop: Header=BB49_1 Depth=1
41384138 ; RV32I-NEXT: sb a0, 11(sp)
4139 ; RV32I-NEXT: mv a0, s4
4139 ; RV32I-NEXT: mv a0, s1
41404140 ; RV32I-NEXT: mv a1, s3
41414141 ; RV32I-NEXT: addi a3, zero, 5
41424142 ; RV32I-NEXT: addi a4, zero, 5
41454145 ; RV32I-NEXT: lb a0, 11(sp)
41464146 ; RV32I-NEXT: beqz a1, .LBB49_1
41474147 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
4148 ; RV32I-NEXT: lw s4, 12(sp)
4149 ; RV32I-NEXT: lw s3, 16(sp)
4150 ; RV32I-NEXT: lw s2, 20(sp)
4151 ; RV32I-NEXT: lw s1, 24(sp)
4148 ; RV32I-NEXT: lw s3, 12(sp)
4149 ; RV32I-NEXT: lw s2, 16(sp)
4150 ; RV32I-NEXT: lw s1, 20(sp)
4151 ; RV32I-NEXT: lw s0, 24(sp)
41524152 ; RV32I-NEXT: lw ra, 28(sp)
41534153 ; RV32I-NEXT: addi sp, sp, 32
41544154 ; RV32I-NEXT: ret
41824182 ; RV64I: # %bb.0:
41834183 ; RV64I-NEXT: addi sp, sp, -48
41844184 ; RV64I-NEXT: sd ra, 40(sp)
4185 ; RV64I-NEXT: sd s1, 32(sp)
4186 ; RV64I-NEXT: sd s2, 24(sp)
4187 ; RV64I-NEXT: sd s3, 16(sp)
4188 ; RV64I-NEXT: sd s4, 8(sp)
4185 ; RV64I-NEXT: sd s0, 32(sp)
4186 ; RV64I-NEXT: sd s1, 24(sp)
4187 ; RV64I-NEXT: sd s2, 16(sp)
4188 ; RV64I-NEXT: sd s3, 8(sp)
41894189 ; RV64I-NEXT: mv s2, a1
4190 ; RV64I-NEXT: mv s4, a0
4190 ; RV64I-NEXT: mv s1, a0
41914191 ; RV64I-NEXT: lbu a0, 0(a0)
4192 ; RV64I-NEXT: andi s1, a1, 255
4192 ; RV64I-NEXT: andi s0, a1, 255
41934193 ; RV64I-NEXT: addi s3, sp, 7
41944194 ; RV64I-NEXT: .LBB49_1: # %atomicrmw.start
41954195 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
41964196 ; RV64I-NEXT: andi a1, a0, 255
41974197 ; RV64I-NEXT: mv a2, a0
4198 ; RV64I-NEXT: bltu s1, a1, .LBB49_3
4198 ; RV64I-NEXT: bltu s0, a1, .LBB49_3
41994199 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
42004200 ; RV64I-NEXT: # in Loop: Header=BB49_1 Depth=1
42014201 ; RV64I-NEXT: mv a2, s2
42024202 ; RV64I-NEXT: .LBB49_3: # %atomicrmw.start
42034203 ; RV64I-NEXT: # in Loop: Header=BB49_1 Depth=1
42044204 ; RV64I-NEXT: sb a0, 7(sp)
4205 ; RV64I-NEXT: mv a0, s4
4205 ; RV64I-NEXT: mv a0, s1
42064206 ; RV64I-NEXT: mv a1, s3
42074207 ; RV64I-NEXT: addi a3, zero, 5
42084208 ; RV64I-NEXT: addi a4, zero, 5
42114211 ; RV64I-NEXT: lb a0, 7(sp)
42124212 ; RV64I-NEXT: beqz a1, .LBB49_1
42134213 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
4214 ; RV64I-NEXT: ld s4, 8(sp)
4215 ; RV64I-NEXT: ld s3, 16(sp)
4216 ; RV64I-NEXT: ld s2, 24(sp)
4217 ; RV64I-NEXT: ld s1, 32(sp)
4214 ; RV64I-NEXT: ld s3, 8(sp)
4215 ; RV64I-NEXT: ld s2, 16(sp)
4216 ; RV64I-NEXT: ld s1, 24(sp)
4217 ; RV64I-NEXT: ld s0, 32(sp)
42184218 ; RV64I-NEXT: ld ra, 40(sp)
42194219 ; RV64I-NEXT: addi sp, sp, 48
42204220 ; RV64I-NEXT: ret
42524252 ; RV32I: # %bb.0:
42534253 ; RV32I-NEXT: addi sp, sp, -32
42544254 ; RV32I-NEXT: sw ra, 28(sp)
4255 ; RV32I-NEXT: sw s1, 24(sp)
4256 ; RV32I-NEXT: sw s2, 20(sp)
4257 ; RV32I-NEXT: sw s3, 16(sp)
4258 ; RV32I-NEXT: sw s4, 12(sp)
4255 ; RV32I-NEXT: sw s0, 24(sp)
4256 ; RV32I-NEXT: sw s1, 20(sp)
4257 ; RV32I-NEXT: sw s2, 16(sp)
4258 ; RV32I-NEXT: sw s3, 12(sp)
42594259 ; RV32I-NEXT: mv s2, a1
4260 ; RV32I-NEXT: mv s4, a0
4260 ; RV32I-NEXT: mv s1, a0
42614261 ; RV32I-NEXT: lbu a0, 0(a0)
4262 ; RV32I-NEXT: andi s1, a1, 255
4262 ; RV32I-NEXT: andi s0, a1, 255
42634263 ; RV32I-NEXT: addi s3, sp, 11
42644264 ; RV32I-NEXT: .LBB50_1: # %atomicrmw.start
42654265 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
42664266 ; RV32I-NEXT: andi a1, a0, 255
42674267 ; RV32I-NEXT: mv a2, a0
4268 ; RV32I-NEXT: bgeu s1, a1, .LBB50_3
4268 ; RV32I-NEXT: bgeu s0, a1, .LBB50_3
42694269 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
42704270 ; RV32I-NEXT: # in Loop: Header=BB50_1 Depth=1
42714271 ; RV32I-NEXT: mv a2, s2
42724272 ; RV32I-NEXT: .LBB50_3: # %atomicrmw.start
42734273 ; RV32I-NEXT: # in Loop: Header=BB50_1 Depth=1
42744274 ; RV32I-NEXT: sb a0, 11(sp)
4275 ; RV32I-NEXT: mv a0, s4
4275 ; RV32I-NEXT: mv a0, s1
42764276 ; RV32I-NEXT: mv a1, s3
42774277 ; RV32I-NEXT: mv a3, zero
42784278 ; RV32I-NEXT: mv a4, zero
42814281 ; RV32I-NEXT: lb a0, 11(sp)
42824282 ; RV32I-NEXT: beqz a1, .LBB50_1
42834283 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
4284 ; RV32I-NEXT: lw s4, 12(sp)
4285 ; RV32I-NEXT: lw s3, 16(sp)
4286 ; RV32I-NEXT: lw s2, 20(sp)
4287 ; RV32I-NEXT: lw s1, 24(sp)
4284 ; RV32I-NEXT: lw s3, 12(sp)
4285 ; RV32I-NEXT: lw s2, 16(sp)
4286 ; RV32I-NEXT: lw s1, 20(sp)
4287 ; RV32I-NEXT: lw s0, 24(sp)
42884288 ; RV32I-NEXT: lw ra, 28(sp)
42894289 ; RV32I-NEXT: addi sp, sp, 32
42904290 ; RV32I-NEXT: ret
43184318 ; RV64I: # %bb.0:
43194319 ; RV64I-NEXT: addi sp, sp, -48
43204320 ; RV64I-NEXT: sd ra, 40(sp)
4321 ; RV64I-NEXT: sd s1, 32(sp)
4322 ; RV64I-NEXT: sd s2, 24(sp)
4323 ; RV64I-NEXT: sd s3, 16(sp)
4324 ; RV64I-NEXT: sd s4, 8(sp)
4321 ; RV64I-NEXT: sd s0, 32(sp)
4322 ; RV64I-NEXT: sd s1, 24(sp)
4323 ; RV64I-NEXT: sd s2, 16(sp)
4324 ; RV64I-NEXT: sd s3, 8(sp)
43254325 ; RV64I-NEXT: mv s2, a1
4326 ; RV64I-NEXT: mv s4, a0
4326 ; RV64I-NEXT: mv s1, a0
43274327 ; RV64I-NEXT: lbu a0, 0(a0)
4328 ; RV64I-NEXT: andi s1, a1, 255
4328 ; RV64I-NEXT: andi s0, a1, 255
43294329 ; RV64I-NEXT: addi s3, sp, 7
43304330 ; RV64I-NEXT: .LBB50_1: # %atomicrmw.start
43314331 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
43324332 ; RV64I-NEXT: andi a1, a0, 255
43334333 ; RV64I-NEXT: mv a2, a0
4334 ; RV64I-NEXT: bgeu s1, a1, .LBB50_3
4334 ; RV64I-NEXT: bgeu s0, a1, .LBB50_3
43354335 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
43364336 ; RV64I-NEXT: # in Loop: Header=BB50_1 Depth=1
43374337 ; RV64I-NEXT: mv a2, s2
43384338 ; RV64I-NEXT: .LBB50_3: # %atomicrmw.start
43394339 ; RV64I-NEXT: # in Loop: Header=BB50_1 Depth=1
43404340 ; RV64I-NEXT: sb a0, 7(sp)
4341 ; RV64I-NEXT: mv a0, s4
4341 ; RV64I-NEXT: mv a0, s1
43424342 ; RV64I-NEXT: mv a1, s3
43434343 ; RV64I-NEXT: mv a3, zero
43444344 ; RV64I-NEXT: mv a4, zero
43474347 ; RV64I-NEXT: lb a0, 7(sp)
43484348 ; RV64I-NEXT: beqz a1, .LBB50_1
43494349 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
4350 ; RV64I-NEXT: ld s4, 8(sp)
4351 ; RV64I-NEXT: ld s3, 16(sp)
4352 ; RV64I-NEXT: ld s2, 24(sp)
4353 ; RV64I-NEXT: ld s1, 32(sp)
4350 ; RV64I-NEXT: ld s3, 8(sp)
4351 ; RV64I-NEXT: ld s2, 16(sp)
4352 ; RV64I-NEXT: ld s1, 24(sp)
4353 ; RV64I-NEXT: ld s0, 32(sp)
43544354 ; RV64I-NEXT: ld ra, 40(sp)
43554355 ; RV64I-NEXT: addi sp, sp, 48
43564356 ; RV64I-NEXT: ret
43884388 ; RV32I: # %bb.0:
43894389 ; RV32I-NEXT: addi sp, sp, -32
43904390 ; RV32I-NEXT: sw ra, 28(sp)
4391 ; RV32I-NEXT: sw s1, 24(sp)
4392 ; RV32I-NEXT: sw s2, 20(sp)
4393 ; RV32I-NEXT: sw s3, 16(sp)
4394 ; RV32I-NEXT: sw s4, 12(sp)
4391 ; RV32I-NEXT: sw s0, 24(sp)
4392 ; RV32I-NEXT: sw s1, 20(sp)
4393 ; RV32I-NEXT: sw s2, 16(sp)
4394 ; RV32I-NEXT: sw s3, 12(sp)
43954395 ; RV32I-NEXT: mv s2, a1
4396 ; RV32I-NEXT: mv s4, a0
4396 ; RV32I-NEXT: mv s1, a0
43974397 ; RV32I-NEXT: lbu a0, 0(a0)
4398 ; RV32I-NEXT: andi s1, a1, 255
4398 ; RV32I-NEXT: andi s0, a1, 255
43994399 ; RV32I-NEXT: addi s3, sp, 11
44004400 ; RV32I-NEXT: .LBB51_1: # %atomicrmw.start
44014401 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
44024402 ; RV32I-NEXT: andi a1, a0, 255
44034403 ; RV32I-NEXT: mv a2, a0
4404 ; RV32I-NEXT: bgeu s1, a1, .LBB51_3
4404 ; RV32I-NEXT: bgeu s0, a1, .LBB51_3
44054405 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
44064406 ; RV32I-NEXT: # in Loop: Header=BB51_1 Depth=1
44074407 ; RV32I-NEXT: mv a2, s2
44084408 ; RV32I-NEXT: .LBB51_3: # %atomicrmw.start
44094409 ; RV32I-NEXT: # in Loop: Header=BB51_1 Depth=1
44104410 ; RV32I-NEXT: sb a0, 11(sp)
4411 ; RV32I-NEXT: mv a0, s4
4411 ; RV32I-NEXT: mv a0, s1
44124412 ; RV32I-NEXT: mv a1, s3
44134413 ; RV32I-NEXT: addi a3, zero, 2
44144414 ; RV32I-NEXT: addi a4, zero, 2
44174417 ; RV32I-NEXT: lb a0, 11(sp)
44184418 ; RV32I-NEXT: beqz a1, .LBB51_1
44194419 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
4420 ; RV32I-NEXT: lw s4, 12(sp)
4421 ; RV32I-NEXT: lw s3, 16(sp)
4422 ; RV32I-NEXT: lw s2, 20(sp)
4423 ; RV32I-NEXT: lw s1, 24(sp)
4420 ; RV32I-NEXT: lw s3, 12(sp)
4421 ; RV32I-NEXT: lw s2, 16(sp)
4422 ; RV32I-NEXT: lw s1, 20(sp)
4423 ; RV32I-NEXT: lw s0, 24(sp)
44244424 ; RV32I-NEXT: lw ra, 28(sp)
44254425 ; RV32I-NEXT: addi sp, sp, 32
44264426 ; RV32I-NEXT: ret
44544454 ; RV64I: # %bb.0:
44554455 ; RV64I-NEXT: addi sp, sp, -48
44564456 ; RV64I-NEXT: sd ra, 40(sp)
4457 ; RV64I-NEXT: sd s1, 32(sp)
4458 ; RV64I-NEXT: sd s2, 24(sp)
4459 ; RV64I-NEXT: sd s3, 16(sp)
4460 ; RV64I-NEXT: sd s4, 8(sp)
4457 ; RV64I-NEXT: sd s0, 32(sp)
4458 ; RV64I-NEXT: sd s1, 24(sp)
4459 ; RV64I-NEXT: sd s2, 16(sp)
4460 ; RV64I-NEXT: sd s3, 8(sp)
44614461 ; RV64I-NEXT: mv s2, a1
4462 ; RV64I-NEXT: mv s4, a0
4462 ; RV64I-NEXT: mv s1, a0
44634463 ; RV64I-NEXT: lbu a0, 0(a0)
4464 ; RV64I-NEXT: andi s1, a1, 255
4464 ; RV64I-NEXT: andi s0, a1, 255
44654465 ; RV64I-NEXT: addi s3, sp, 7
44664466 ; RV64I-NEXT: .LBB51_1: # %atomicrmw.start
44674467 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
44684468 ; RV64I-NEXT: andi a1, a0, 255
44694469 ; RV64I-NEXT: mv a2, a0
4470 ; RV64I-NEXT: bgeu s1, a1, .LBB51_3
4470 ; RV64I-NEXT: bgeu s0, a1, .LBB51_3
44714471 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
44724472 ; RV64I-NEXT: # in Loop: Header=BB51_1 Depth=1
44734473 ; RV64I-NEXT: mv a2, s2
44744474 ; RV64I-NEXT: .LBB51_3: # %atomicrmw.start
44754475 ; RV64I-NEXT: # in Loop: Header=BB51_1 Depth=1
44764476 ; RV64I-NEXT: sb a0, 7(sp)
4477 ; RV64I-NEXT: mv a0, s4
4477 ; RV64I-NEXT: mv a0, s1
44784478 ; RV64I-NEXT: mv a1, s3
44794479 ; RV64I-NEXT: addi a3, zero, 2
44804480 ; RV64I-NEXT: addi a4, zero, 2
44834483 ; RV64I-NEXT: lb a0, 7(sp)
44844484 ; RV64I-NEXT: beqz a1, .LBB51_1
44854485 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
4486 ; RV64I-NEXT: ld s4, 8(sp)
4487 ; RV64I-NEXT: ld s3, 16(sp)
4488 ; RV64I-NEXT: ld s2, 24(sp)
4489 ; RV64I-NEXT: ld s1, 32(sp)
4486 ; RV64I-NEXT: ld s3, 8(sp)
4487 ; RV64I-NEXT: ld s2, 16(sp)
4488 ; RV64I-NEXT: ld s1, 24(sp)
4489 ; RV64I-NEXT: ld s0, 32(sp)
44904490 ; RV64I-NEXT: ld ra, 40(sp)
44914491 ; RV64I-NEXT: addi sp, sp, 48
44924492 ; RV64I-NEXT: ret
45244524 ; RV32I: # %bb.0:
45254525 ; RV32I-NEXT: addi sp, sp, -32
45264526 ; RV32I-NEXT: sw ra, 28(sp)
4527 ; RV32I-NEXT: sw s1, 24(sp)
4528 ; RV32I-NEXT: sw s2, 20(sp)
4529 ; RV32I-NEXT: sw s3, 16(sp)
4530 ; RV32I-NEXT: sw s4, 12(sp)
4527 ; RV32I-NEXT: sw s0, 24(sp)
4528 ; RV32I-NEXT: sw s1, 20(sp)
4529 ; RV32I-NEXT: sw s2, 16(sp)
4530 ; RV32I-NEXT: sw s3, 12(sp)
45314531 ; RV32I-NEXT: mv s2, a1
4532 ; RV32I-NEXT: mv s4, a0
4532 ; RV32I-NEXT: mv s1, a0
45334533 ; RV32I-NEXT: lbu a0, 0(a0)
4534 ; RV32I-NEXT: andi s1, a1, 255
4534 ; RV32I-NEXT: andi s0, a1, 255
45354535 ; RV32I-NEXT: addi s3, sp, 11
45364536 ; RV32I-NEXT: .LBB52_1: # %atomicrmw.start
45374537 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
45384538 ; RV32I-NEXT: andi a1, a0, 255
45394539 ; RV32I-NEXT: mv a2, a0
4540 ; RV32I-NEXT: bgeu s1, a1, .LBB52_3
4540 ; RV32I-NEXT: bgeu s0, a1, .LBB52_3
45414541 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
45424542 ; RV32I-NEXT: # in Loop: Header=BB52_1 Depth=1
45434543 ; RV32I-NEXT: mv a2, s2
45444544 ; RV32I-NEXT: .LBB52_3: # %atomicrmw.start
45454545 ; RV32I-NEXT: # in Loop: Header=BB52_1 Depth=1
45464546 ; RV32I-NEXT: sb a0, 11(sp)
4547 ; RV32I-NEXT: mv a0, s4
4547 ; RV32I-NEXT: mv a0, s1
45484548 ; RV32I-NEXT: mv a1, s3
45494549 ; RV32I-NEXT: addi a3, zero, 3
45504550 ; RV32I-NEXT: mv a4, zero
45534553 ; RV32I-NEXT: lb a0, 11(sp)
45544554 ; RV32I-NEXT: beqz a1, .LBB52_1
45554555 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
4556 ; RV32I-NEXT: lw s4, 12(sp)
4557 ; RV32I-NEXT: lw s3, 16(sp)
4558 ; RV32I-NEXT: lw s2, 20(sp)
4559 ; RV32I-NEXT: lw s1, 24(sp)
4556 ; RV32I-NEXT: lw s3, 12(sp)
4557 ; RV32I-NEXT: lw s2, 16(sp)
4558 ; RV32I-NEXT: lw s1, 20(sp)
4559 ; RV32I-NEXT: lw s0, 24(sp)
45604560 ; RV32I-NEXT: lw ra, 28(sp)
45614561 ; RV32I-NEXT: addi sp, sp, 32
45624562 ; RV32I-NEXT: ret
45904590 ; RV64I: # %bb.0:
45914591 ; RV64I-NEXT: addi sp, sp, -48
45924592 ; RV64I-NEXT: sd ra, 40(sp)
4593 ; RV64I-NEXT: sd s1, 32(sp)
4594 ; RV64I-NEXT: sd s2, 24(sp)
4595 ; RV64I-NEXT: sd s3, 16(sp)
4596 ; RV64I-NEXT: sd s4, 8(sp)
4593 ; RV64I-NEXT: sd s0, 32(sp)
4594 ; RV64I-NEXT: sd s1, 24(sp)
4595 ; RV64I-NEXT: sd s2, 16(sp)
4596 ; RV64I-NEXT: sd s3, 8(sp)
45974597 ; RV64I-NEXT: mv s2, a1
4598 ; RV64I-NEXT: mv s4, a0
4598 ; RV64I-NEXT: mv s1, a0
45994599 ; RV64I-NEXT: lbu a0, 0(a0)
4600 ; RV64I-NEXT: andi s1, a1, 255
4600 ; RV64I-NEXT: andi s0, a1, 255
46014601 ; RV64I-NEXT: addi s3, sp, 7
46024602 ; RV64I-NEXT: .LBB52_1: # %atomicrmw.start
46034603 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
46044604 ; RV64I-NEXT: andi a1, a0, 255
46054605 ; RV64I-NEXT: mv a2, a0
4606 ; RV64I-NEXT: bgeu s1, a1, .LBB52_3
4606 ; RV64I-NEXT: bgeu s0, a1, .LBB52_3
46074607 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
46084608 ; RV64I-NEXT: # in Loop: Header=BB52_1 Depth=1
46094609 ; RV64I-NEXT: mv a2, s2
46104610 ; RV64I-NEXT: .LBB52_3: # %atomicrmw.start
46114611 ; RV64I-NEXT: # in Loop: Header=BB52_1 Depth=1
46124612 ; RV64I-NEXT: sb a0, 7(sp)
4613 ; RV64I-NEXT: mv a0, s4
4613 ; RV64I-NEXT: mv a0, s1
46144614 ; RV64I-NEXT: mv a1, s3
46154615 ; RV64I-NEXT: addi a3, zero, 3
46164616 ; RV64I-NEXT: mv a4, zero
46194619 ; RV64I-NEXT: lb a0, 7(sp)
46204620 ; RV64I-NEXT: beqz a1, .LBB52_1
46214621 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
4622 ; RV64I-NEXT: ld s4, 8(sp)
4623 ; RV64I-NEXT: ld s3, 16(sp)
4624 ; RV64I-NEXT: ld s2, 24(sp)
4625 ; RV64I-NEXT: ld s1, 32(sp)
4622 ; RV64I-NEXT: ld s3, 8(sp)
4623 ; RV64I-NEXT: ld s2, 16(sp)
4624 ; RV64I-NEXT: ld s1, 24(sp)
4625 ; RV64I-NEXT: ld s0, 32(sp)
46264626 ; RV64I-NEXT: ld ra, 40(sp)
46274627 ; RV64I-NEXT: addi sp, sp, 48
46284628 ; RV64I-NEXT: ret
46604660 ; RV32I: # %bb.0:
46614661 ; RV32I-NEXT: addi sp, sp, -32
46624662 ; RV32I-NEXT: sw ra, 28(sp)
4663 ; RV32I-NEXT: sw s1, 24(sp)
4664 ; RV32I-NEXT: sw s2, 20(sp)
4665 ; RV32I-NEXT: sw s3, 16(sp)
4666 ; RV32I-NEXT: sw s4, 12(sp)
4663 ; RV32I-NEXT: sw s0, 24(sp)
4664 ; RV32I-NEXT: sw s1, 20(sp)
4665 ; RV32I-NEXT: sw s2, 16(sp)
4666 ; RV32I-NEXT: sw s3, 12(sp)
46674667 ; RV32I-NEXT: mv s2, a1
4668 ; RV32I-NEXT: mv s4, a0
4668 ; RV32I-NEXT: mv s1, a0
46694669 ; RV32I-NEXT: lbu a0, 0(a0)
4670 ; RV32I-NEXT: andi s1, a1, 255
4670 ; RV32I-NEXT: andi s0, a1, 255
46714671 ; RV32I-NEXT: addi s3, sp, 11
46724672 ; RV32I-NEXT: .LBB53_1: # %atomicrmw.start
46734673 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
46744674 ; RV32I-NEXT: andi a1, a0, 255
46754675 ; RV32I-NEXT: mv a2, a0
4676 ; RV32I-NEXT: bgeu s1, a1, .LBB53_3
4676 ; RV32I-NEXT: bgeu s0, a1, .LBB53_3
46774677 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
46784678 ; RV32I-NEXT: # in Loop: Header=BB53_1 Depth=1
46794679 ; RV32I-NEXT: mv a2, s2
46804680 ; RV32I-NEXT: .LBB53_3: # %atomicrmw.start
46814681 ; RV32I-NEXT: # in Loop: Header=BB53_1 Depth=1
46824682 ; RV32I-NEXT: sb a0, 11(sp)
4683 ; RV32I-NEXT: mv a0, s4
4683 ; RV32I-NEXT: mv a0, s1
46844684 ; RV32I-NEXT: mv a1, s3
46854685 ; RV32I-NEXT: addi a3, zero, 4
46864686 ; RV32I-NEXT: addi a4, zero, 2
46894689 ; RV32I-NEXT: lb a0, 11(sp)
46904690 ; RV32I-NEXT: beqz a1, .LBB53_1
46914691 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
4692 ; RV32I-NEXT: lw s4, 12(sp)
4693 ; RV32I-NEXT: lw s3, 16(sp)
4694 ; RV32I-NEXT: lw s2, 20(sp)
4695 ; RV32I-NEXT: lw s1, 24(sp)
4692 ; RV32I-NEXT: lw s3, 12(sp)
4693 ; RV32I-NEXT: lw s2, 16(sp)
4694 ; RV32I-NEXT: lw s1, 20(sp)
4695 ; RV32I-NEXT: lw s0, 24(sp)
46964696 ; RV32I-NEXT: lw ra, 28(sp)
46974697 ; RV32I-NEXT: addi sp, sp, 32
46984698 ; RV32I-NEXT: ret
47264726 ; RV64I: # %bb.0:
47274727 ; RV64I-NEXT: addi sp, sp, -48
47284728 ; RV64I-NEXT: sd ra, 40(sp)
4729 ; RV64I-NEXT: sd s1, 32(sp)
4730 ; RV64I-NEXT: sd s2, 24(sp)
4731 ; RV64I-NEXT: sd s3, 16(sp)
4732 ; RV64I-NEXT: sd s4, 8(sp)
4729 ; RV64I-NEXT: sd s0, 32(sp)
4730 ; RV64I-NEXT: sd s1, 24(sp)
4731 ; RV64I-NEXT: sd s2, 16(sp)
4732 ; RV64I-NEXT: sd s3, 8(sp)
47334733 ; RV64I-NEXT: mv s2, a1
4734 ; RV64I-NEXT: mv s4, a0
4734 ; RV64I-NEXT: mv s1, a0
47354735 ; RV64I-NEXT: lbu a0, 0(a0)
4736 ; RV64I-NEXT: andi s1, a1, 255
4736 ; RV64I-NEXT: andi s0, a1, 255
47374737 ; RV64I-NEXT: addi s3, sp, 7
47384738 ; RV64I-NEXT: .LBB53_1: # %atomicrmw.start
47394739 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
47404740 ; RV64I-NEXT: andi a1, a0, 255
47414741 ; RV64I-NEXT: mv a2, a0
4742 ; RV64I-NEXT: bgeu s1, a1, .LBB53_3
4742 ; RV64I-NEXT: bgeu s0, a1, .LBB53_3
47434743 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
47444744 ; RV64I-NEXT: # in Loop: Header=BB53_1 Depth=1
47454745 ; RV64I-NEXT: mv a2, s2
47464746 ; RV64I-NEXT: .LBB53_3: # %atomicrmw.start
47474747 ; RV64I-NEXT: # in Loop: Header=BB53_1 Depth=1
47484748 ; RV64I-NEXT: sb a0, 7(sp)
4749 ; RV64I-NEXT: mv a0, s4
4749 ; RV64I-NEXT: mv a0, s1
47504750 ; RV64I-NEXT: mv a1, s3
47514751 ; RV64I-NEXT: addi a3, zero, 4
47524752 ; RV64I-NEXT: addi a4, zero, 2
47554755 ; RV64I-NEXT: lb a0, 7(sp)
47564756 ; RV64I-NEXT: beqz a1, .LBB53_1
47574757 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
4758 ; RV64I-NEXT: ld s4, 8(sp)
4759 ; RV64I-NEXT: ld s3, 16(sp)
4760 ; RV64I-NEXT: ld s2, 24(sp)
4761 ; RV64I-NEXT: ld s1, 32(sp)
4758 ; RV64I-NEXT: ld s3, 8(sp)
4759 ; RV64I-NEXT: ld s2, 16(sp)
4760 ; RV64I-NEXT: ld s1, 24(sp)
4761 ; RV64I-NEXT: ld s0, 32(sp)
47624762 ; RV64I-NEXT: ld ra, 40(sp)
47634763 ; RV64I-NEXT: addi sp, sp, 48
47644764 ; RV64I-NEXT: ret
47964796 ; RV32I: # %bb.0:
47974797 ; RV32I-NEXT: addi sp, sp, -32
47984798 ; RV32I-NEXT: sw ra, 28(sp)
4799 ; RV32I-NEXT: sw s1, 24(sp)
4800 ; RV32I-NEXT: sw s2, 20(sp)
4801 ; RV32I-NEXT: sw s3, 16(sp)
4802 ; RV32I-NEXT: sw s4, 12(sp)
4799 ; RV32I-NEXT: sw s0, 24(sp)
4800 ; RV32I-NEXT: sw s1, 20(sp)
4801 ; RV32I-NEXT: sw s2, 16(sp)
4802 ; RV32I-NEXT: sw s3, 12(sp)
48034803 ; RV32I-NEXT: mv s2, a1
4804 ; RV32I-NEXT: mv s4, a0
4804 ; RV32I-NEXT: mv s1, a0
48054805 ; RV32I-NEXT: lbu a0, 0(a0)
4806 ; RV32I-NEXT: andi s1, a1, 255
4806 ; RV32I-NEXT: andi s0, a1, 255
48074807 ; RV32I-NEXT: addi s3, sp, 11
48084808 ; RV32I-NEXT: .LBB54_1: # %atomicrmw.start
48094809 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
48104810 ; RV32I-NEXT: andi a1, a0, 255
48114811 ; RV32I-NEXT: mv a2, a0
4812 ; RV32I-NEXT: bgeu s1, a1, .LBB54_3
4812 ; RV32I-NEXT: bgeu s0, a1, .LBB54_3
48134813 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
48144814 ; RV32I-NEXT: # in Loop: Header=BB54_1 Depth=1
48154815 ; RV32I-NEXT: mv a2, s2
48164816 ; RV32I-NEXT: .LBB54_3: # %atomicrmw.start
48174817 ; RV32I-NEXT: # in Loop: Header=BB54_1 Depth=1
48184818 ; RV32I-NEXT: sb a0, 11(sp)
4819 ; RV32I-NEXT: mv a0, s4
4819 ; RV32I-NEXT: mv a0, s1
48204820 ; RV32I-NEXT: mv a1, s3
48214821 ; RV32I-NEXT: addi a3, zero, 5
48224822 ; RV32I-NEXT: addi a4, zero, 5
48254825 ; RV32I-NEXT: lb a0, 11(sp)
48264826 ; RV32I-NEXT: beqz a1, .LBB54_1
48274827 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
4828 ; RV32I-NEXT: lw s4, 12(sp)
4829 ; RV32I-NEXT: lw s3, 16(sp)
4830 ; RV32I-NEXT: lw s2, 20(sp)
4831 ; RV32I-NEXT: lw s1, 24(sp)
4828 ; RV32I-NEXT: lw s3, 12(sp)
4829 ; RV32I-NEXT: lw s2, 16(sp)
4830 ; RV32I-NEXT: lw s1, 20(sp)
4831 ; RV32I-NEXT: lw s0, 24(sp)
48324832 ; RV32I-NEXT: lw ra, 28(sp)
48334833 ; RV32I-NEXT: addi sp, sp, 32
48344834 ; RV32I-NEXT: ret
48624862 ; RV64I: # %bb.0:
48634863 ; RV64I-NEXT: addi sp, sp, -48
48644864 ; RV64I-NEXT: sd ra, 40(sp)
4865 ; RV64I-NEXT: sd s1, 32(sp)
4866 ; RV64I-NEXT: sd s2, 24(sp)
4867 ; RV64I-NEXT: sd s3, 16(sp)
4868 ; RV64I-NEXT: sd s4, 8(sp)
4865 ; RV64I-NEXT: sd s0, 32(sp)
4866 ; RV64I-NEXT: sd s1, 24(sp)
4867 ; RV64I-NEXT: sd s2, 16(sp)
4868 ; RV64I-NEXT: sd s3, 8(sp)
48694869 ; RV64I-NEXT: mv s2, a1
4870 ; RV64I-NEXT: mv s4, a0
4870 ; RV64I-NEXT: mv s1, a0
48714871 ; RV64I-NEXT: lbu a0, 0(a0)
4872 ; RV64I-NEXT: andi s1, a1, 255
4872 ; RV64I-NEXT: andi s0, a1, 255
48734873 ; RV64I-NEXT: addi s3, sp, 7
48744874 ; RV64I-NEXT: .LBB54_1: # %atomicrmw.start
48754875 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
48764876 ; RV64I-NEXT: andi a1, a0, 255
48774877 ; RV64I-NEXT: mv a2, a0
4878 ; RV64I-NEXT: bgeu s1, a1, .LBB54_3
4878 ; RV64I-NEXT: bgeu s0, a1, .LBB54_3
48794879 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
48804880 ; RV64I-NEXT: # in Loop: Header=BB54_1 Depth=1
48814881 ; RV64I-NEXT: mv a2, s2
48824882 ; RV64I-NEXT: .LBB54_3: # %atomicrmw.start
48834883 ; RV64I-NEXT: # in Loop: Header=BB54_1 Depth=1
48844884 ; RV64I-NEXT: sb a0, 7(sp)
4885 ; RV64I-NEXT: mv a0, s4
4885 ; RV64I-NEXT: mv a0, s1
48864886 ; RV64I-NEXT: mv a1, s3
48874887 ; RV64I-NEXT: addi a3, zero, 5
48884888 ; RV64I-NEXT: addi a4, zero, 5
48914891 ; RV64I-NEXT: lb a0, 7(sp)
48924892 ; RV64I-NEXT: beqz a1, .LBB54_1
48934893 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
4894 ; RV64I-NEXT: ld s4, 8(sp)
4895 ; RV64I-NEXT: ld s3, 16(sp)
4896 ; RV64I-NEXT: ld s2, 24(sp)
4897 ; RV64I-NEXT: ld s1, 32(sp)
4894 ; RV64I-NEXT: ld s3, 8(sp)
4895 ; RV64I-NEXT: ld s2, 16(sp)
4896 ; RV64I-NEXT: ld s1, 24(sp)
4897 ; RV64I-NEXT: ld s0, 32(sp)
48984898 ; RV64I-NEXT: ld ra, 40(sp)
48994899 ; RV64I-NEXT: addi sp, sp, 48
49004900 ; RV64I-NEXT: ret
70827082 ; RV32I: # %bb.0:
70837083 ; RV32I-NEXT: addi sp, sp, -32
70847084 ; RV32I-NEXT: sw ra, 28(sp)
7085 ; RV32I-NEXT: sw s1, 24(sp)
7086 ; RV32I-NEXT: sw s2, 20(sp)
7087 ; RV32I-NEXT: sw s3, 16(sp)
7088 ; RV32I-NEXT: sw s4, 12(sp)
7085 ; RV32I-NEXT: sw s0, 24(sp)
7086 ; RV32I-NEXT: sw s1, 20(sp)
7087 ; RV32I-NEXT: sw s2, 16(sp)
7088 ; RV32I-NEXT: sw s3, 12(sp)
70897089 ; RV32I-NEXT: mv s2, a1
7090 ; RV32I-NEXT: mv s4, a0
7090 ; RV32I-NEXT: mv s1, a0
70917091 ; RV32I-NEXT: lhu a0, 0(a0)
70927092 ; RV32I-NEXT: slli a1, a1, 16
7093 ; RV32I-NEXT: srai s1, a1, 16
7093 ; RV32I-NEXT: srai s0, a1, 16
70947094 ; RV32I-NEXT: addi s3, sp, 10
70957095 ; RV32I-NEXT: .LBB90_1: # %atomicrmw.start
70967096 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
70977097 ; RV32I-NEXT: slli a1, a0, 16
70987098 ; RV32I-NEXT: srai a1, a1, 16
70997099 ; RV32I-NEXT: mv a2, a0
7100 ; RV32I-NEXT: blt s1, a1, .LBB90_3
7100 ; RV32I-NEXT: blt s0, a1, .LBB90_3
71017101 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
71027102 ; RV32I-NEXT: # in Loop: Header=BB90_1 Depth=1
71037103 ; RV32I-NEXT: mv a2, s2
71047104 ; RV32I-NEXT: .LBB90_3: # %atomicrmw.start
71057105 ; RV32I-NEXT: # in Loop: Header=BB90_1 Depth=1
71067106 ; RV32I-NEXT: sh a0, 10(sp)
7107 ; RV32I-NEXT: mv a0, s4
7107 ; RV32I-NEXT: mv a0, s1
71087108 ; RV32I-NEXT: mv a1, s3
71097109 ; RV32I-NEXT: mv a3, zero
71107110 ; RV32I-NEXT: mv a4, zero
71137113 ; RV32I-NEXT: lh a0, 10(sp)
71147114 ; RV32I-NEXT: beqz a1, .LBB90_1
71157115 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
7116 ; RV32I-NEXT: lw s4, 12(sp)
7117 ; RV32I-NEXT: lw s3, 16(sp)
7118 ; RV32I-NEXT: lw s2, 20(sp)
7119 ; RV32I-NEXT: lw s1, 24(sp)
7116 ; RV32I-NEXT: lw s3, 12(sp)
7117 ; RV32I-NEXT: lw s2, 16(sp)
7118 ; RV32I-NEXT: lw s1, 20(sp)
7119 ; RV32I-NEXT: lw s0, 24(sp)
71207120 ; RV32I-NEXT: lw ra, 28(sp)
71217121 ; RV32I-NEXT: addi sp, sp, 32
71227122 ; RV32I-NEXT: ret
71567156 ; RV64I: # %bb.0:
71577157 ; RV64I-NEXT: addi sp, sp, -48
71587158 ; RV64I-NEXT: sd ra, 40(sp)
7159 ; RV64I-NEXT: sd s1, 32(sp)
7160 ; RV64I-NEXT: sd s2, 24(sp)
7161 ; RV64I-NEXT: sd s3, 16(sp)
7162 ; RV64I-NEXT: sd s4, 8(sp)
7159 ; RV64I-NEXT: sd s0, 32(sp)
7160 ; RV64I-NEXT: sd s1, 24(sp)
7161 ; RV64I-NEXT: sd s2, 16(sp)
7162 ; RV64I-NEXT: sd s3, 8(sp)
71637163 ; RV64I-NEXT: mv s2, a1
7164 ; RV64I-NEXT: mv s4, a0
7164 ; RV64I-NEXT: mv s1, a0
71657165 ; RV64I-NEXT: lhu a0, 0(a0)
71667166 ; RV64I-NEXT: slli a1, a1, 48
7167 ; RV64I-NEXT: srai s1, a1, 48
7167 ; RV64I-NEXT: srai s0, a1, 48
71687168 ; RV64I-NEXT: addi s3, sp, 6
71697169 ; RV64I-NEXT: .LBB90_1: # %atomicrmw.start
71707170 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
71717171 ; RV64I-NEXT: slli a1, a0, 48
71727172 ; RV64I-NEXT: srai a1, a1, 48
71737173 ; RV64I-NEXT: mv a2, a0
7174 ; RV64I-NEXT: blt s1, a1, .LBB90_3
7174 ; RV64I-NEXT: blt s0, a1, .LBB90_3
71757175 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
71767176 ; RV64I-NEXT: # in Loop: Header=BB90_1 Depth=1
71777177 ; RV64I-NEXT: mv a2, s2
71787178 ; RV64I-NEXT: .LBB90_3: # %atomicrmw.start
71797179 ; RV64I-NEXT: # in Loop: Header=BB90_1 Depth=1
71807180 ; RV64I-NEXT: sh a0, 6(sp)
7181 ; RV64I-NEXT: mv a0, s4
7181 ; RV64I-NEXT: mv a0, s1
71827182 ; RV64I-NEXT: mv a1, s3
71837183 ; RV64I-NEXT: mv a3, zero
71847184 ; RV64I-NEXT: mv a4, zero
71877187 ; RV64I-NEXT: lh a0, 6(sp)
71887188 ; RV64I-NEXT: beqz a1, .LBB90_1
71897189 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
7190 ; RV64I-NEXT: ld s4, 8(sp)
7191 ; RV64I-NEXT: ld s3, 16(sp)
7192 ; RV64I-NEXT: ld s2, 24(sp)
7193 ; RV64I-NEXT: ld s1, 32(sp)
7190 ; RV64I-NEXT: ld s3, 8(sp)
7191 ; RV64I-NEXT: ld s2, 16(sp)
7192 ; RV64I-NEXT: ld s1, 24(sp)
7193 ; RV64I-NEXT: ld s0, 32(sp)
71947194 ; RV64I-NEXT: ld ra, 40(sp)
71957195 ; RV64I-NEXT: addi sp, sp, 48
71967196 ; RV64I-NEXT: ret
72347234 ; RV32I: # %bb.0:
72357235 ; RV32I-NEXT: addi sp, sp, -32
72367236 ; RV32I-NEXT: sw ra, 28(sp)
7237 ; RV32I-NEXT: sw s1, 24(sp)
7238 ; RV32I-NEXT: sw s2, 20(sp)
7239 ; RV32I-NEXT: sw s3, 16(sp)
7240 ; RV32I-NEXT: sw s4, 12(sp)
7237 ; RV32I-NEXT: sw s0, 24(sp)
7238 ; RV32I-NEXT: sw s1, 20(sp)
7239 ; RV32I-NEXT: sw s2, 16(sp)
7240 ; RV32I-NEXT: sw s3, 12(sp)
72417241 ; RV32I-NEXT: mv s2, a1
7242 ; RV32I-NEXT: mv s4, a0
7242 ; RV32I-NEXT: mv s1, a0
72437243 ; RV32I-NEXT: lhu a0, 0(a0)
72447244 ; RV32I-NEXT: slli a1, a1, 16
7245 ; RV32I-NEXT: srai s1, a1, 16
7245 ; RV32I-NEXT: srai s0, a1, 16
72467246 ; RV32I-NEXT: addi s3, sp, 10
72477247 ; RV32I-NEXT: .LBB91_1: # %atomicrmw.start
72487248 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
72497249 ; RV32I-NEXT: slli a1, a0, 16
72507250 ; RV32I-NEXT: srai a1, a1, 16
72517251 ; RV32I-NEXT: mv a2, a0
7252 ; RV32I-NEXT: blt s1, a1, .LBB91_3
7252 ; RV32I-NEXT: blt s0, a1, .LBB91_3
72537253 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
72547254 ; RV32I-NEXT: # in Loop: Header=BB91_1 Depth=1
72557255 ; RV32I-NEXT: mv a2, s2
72567256 ; RV32I-NEXT: .LBB91_3: # %atomicrmw.start
72577257 ; RV32I-NEXT: # in Loop: Header=BB91_1 Depth=1
72587258 ; RV32I-NEXT: sh a0, 10(sp)
7259 ; RV32I-NEXT: mv a0, s4
7259 ; RV32I-NEXT: mv a0, s1
72607260 ; RV32I-NEXT: mv a1, s3
72617261 ; RV32I-NEXT: addi a3, zero, 2
72627262 ; RV32I-NEXT: addi a4, zero, 2
72657265 ; RV32I-NEXT: lh a0, 10(sp)
72667266 ; RV32I-NEXT: beqz a1, .LBB91_1
72677267 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
7268 ; RV32I-NEXT: lw s4, 12(sp)
7269 ; RV32I-NEXT: lw s3, 16(sp)
7270 ; RV32I-NEXT: lw s2, 20(sp)
7271 ; RV32I-NEXT: lw s1, 24(sp)
7268 ; RV32I-NEXT: lw s3, 12(sp)
7269 ; RV32I-NEXT: lw s2, 16(sp)
7270 ; RV32I-NEXT: lw s1, 20(sp)
7271 ; RV32I-NEXT: lw s0, 24(sp)
72727272 ; RV32I-NEXT: lw ra, 28(sp)
72737273 ; RV32I-NEXT: addi sp, sp, 32
72747274 ; RV32I-NEXT: ret
73087308 ; RV64I: # %bb.0:
73097309 ; RV64I-NEXT: addi sp, sp, -48
73107310 ; RV64I-NEXT: sd ra, 40(sp)
7311 ; RV64I-NEXT: sd s1, 32(sp)
7312 ; RV64I-NEXT: sd s2, 24(sp)
7313 ; RV64I-NEXT: sd s3, 16(sp)
7314 ; RV64I-NEXT: sd s4, 8(sp)
7311 ; RV64I-NEXT: sd s0, 32(sp)
7312 ; RV64I-NEXT: sd s1, 24(sp)
7313 ; RV64I-NEXT: sd s2, 16(sp)
7314 ; RV64I-NEXT: sd s3, 8(sp)
73157315 ; RV64I-NEXT: mv s2, a1
7316 ; RV64I-NEXT: mv s4, a0
7316 ; RV64I-NEXT: mv s1, a0
73177317 ; RV64I-NEXT: lhu a0, 0(a0)
73187318 ; RV64I-NEXT: slli a1, a1, 48
7319 ; RV64I-NEXT: srai s1, a1, 48
7319 ; RV64I-NEXT: srai s0, a1, 48
73207320 ; RV64I-NEXT: addi s3, sp, 6
73217321 ; RV64I-NEXT: .LBB91_1: # %atomicrmw.start
73227322 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
73237323 ; RV64I-NEXT: slli a1, a0, 48
73247324 ; RV64I-NEXT: srai a1, a1, 48
73257325 ; RV64I-NEXT: mv a2, a0
7326 ; RV64I-NEXT: blt s1, a1, .LBB91_3
7326 ; RV64I-NEXT: blt s0, a1, .LBB91_3
73277327 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
73287328 ; RV64I-NEXT: # in Loop: Header=BB91_1 Depth=1
73297329 ; RV64I-NEXT: mv a2, s2
73307330 ; RV64I-NEXT: .LBB91_3: # %atomicrmw.start
73317331 ; RV64I-NEXT: # in Loop: Header=BB91_1 Depth=1
73327332 ; RV64I-NEXT: sh a0, 6(sp)
7333 ; RV64I-NEXT: mv a0, s4
7333 ; RV64I-NEXT: mv a0, s1
73347334 ; RV64I-NEXT: mv a1, s3
73357335 ; RV64I-NEXT: addi a3, zero, 2
73367336 ; RV64I-NEXT: addi a4, zero, 2
73397339 ; RV64I-NEXT: lh a0, 6(sp)
73407340 ; RV64I-NEXT: beqz a1, .LBB91_1
73417341 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
7342 ; RV64I-NEXT: ld s4, 8(sp)
7343 ; RV64I-NEXT: ld s3, 16(sp)
7344 ; RV64I-NEXT: ld s2, 24(sp)
7345 ; RV64I-NEXT: ld s1, 32(sp)
7342 ; RV64I-NEXT: ld s3, 8(sp)
7343 ; RV64I-NEXT: ld s2, 16(sp)
7344 ; RV64I-NEXT: ld s1, 24(sp)
7345 ; RV64I-NEXT: ld s0, 32(sp)
73467346 ; RV64I-NEXT: ld ra, 40(sp)
73477347 ; RV64I-NEXT: addi sp, sp, 48
73487348 ; RV64I-NEXT: ret
73867386 ; RV32I: # %bb.0:
73877387 ; RV32I-NEXT: addi sp, sp, -32
73887388 ; RV32I-NEXT: sw ra, 28(sp)
7389 ; RV32I-NEXT: sw s1, 24(sp)
7390 ; RV32I-NEXT: sw s2, 20(sp)
7391 ; RV32I-NEXT: sw s3, 16(sp)
7392 ; RV32I-NEXT: sw s4, 12(sp)
7389 ; RV32I-NEXT: sw s0, 24(sp)
7390 ; RV32I-NEXT: sw s1, 20(sp)
7391 ; RV32I-NEXT: sw s2, 16(sp)
7392 ; RV32I-NEXT: sw s3, 12(sp)
73937393 ; RV32I-NEXT: mv s2, a1
7394 ; RV32I-NEXT: mv s4, a0
7394 ; RV32I-NEXT: mv s1, a0
73957395 ; RV32I-NEXT: lhu a0, 0(a0)
73967396 ; RV32I-NEXT: slli a1, a1, 16
7397 ; RV32I-NEXT: srai s1, a1, 16
7397 ; RV32I-NEXT: srai s0, a1, 16
73987398 ; RV32I-NEXT: addi s3, sp, 10
73997399 ; RV32I-NEXT: .LBB92_1: # %atomicrmw.start
74007400 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
74017401 ; RV32I-NEXT: slli a1, a0, 16
74027402 ; RV32I-NEXT: srai a1, a1, 16
74037403 ; RV32I-NEXT: mv a2, a0
7404 ; RV32I-NEXT: blt s1, a1, .LBB92_3
7404 ; RV32I-NEXT: blt s0, a1, .LBB92_3
74057405 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
74067406 ; RV32I-NEXT: # in Loop: Header=BB92_1 Depth=1
74077407 ; RV32I-NEXT: mv a2, s2
74087408 ; RV32I-NEXT: .LBB92_3: # %atomicrmw.start
74097409 ; RV32I-NEXT: # in Loop: Header=BB92_1 Depth=1
74107410 ; RV32I-NEXT: sh a0, 10(sp)
7411 ; RV32I-NEXT: mv a0, s4
7411 ; RV32I-NEXT: mv a0, s1
74127412 ; RV32I-NEXT: mv a1, s3
74137413 ; RV32I-NEXT: addi a3, zero, 3
74147414 ; RV32I-NEXT: mv a4, zero
74177417 ; RV32I-NEXT: lh a0, 10(sp)
74187418 ; RV32I-NEXT: beqz a1, .LBB92_1
74197419 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
7420 ; RV32I-NEXT: lw s4, 12(sp)
7421 ; RV32I-NEXT: lw s3, 16(sp)
7422 ; RV32I-NEXT: lw s2, 20(sp)
7423 ; RV32I-NEXT: lw s1, 24(sp)
7420 ; RV32I-NEXT: lw s3, 12(sp)
7421 ; RV32I-NEXT: lw s2, 16(sp)
7422 ; RV32I-NEXT: lw s1, 20(sp)
7423 ; RV32I-NEXT: lw s0, 24(sp)
74247424 ; RV32I-NEXT: lw ra, 28(sp)
74257425 ; RV32I-NEXT: addi sp, sp, 32
74267426 ; RV32I-NEXT: ret
74607460 ; RV64I: # %bb.0:
74617461 ; RV64I-NEXT: addi sp, sp, -48
74627462 ; RV64I-NEXT: sd ra, 40(sp)
7463 ; RV64I-NEXT: sd s1, 32(sp)
7464 ; RV64I-NEXT: sd s2, 24(sp)
7465 ; RV64I-NEXT: sd s3, 16(sp)
7466 ; RV64I-NEXT: sd s4, 8(sp)
7463 ; RV64I-NEXT: sd s0, 32(sp)
7464 ; RV64I-NEXT: sd s1, 24(sp)
7465 ; RV64I-NEXT: sd s2, 16(sp)
7466 ; RV64I-NEXT: sd s3, 8(sp)
74677467 ; RV64I-NEXT: mv s2, a1
7468 ; RV64I-NEXT: mv s4, a0
7468 ; RV64I-NEXT: mv s1, a0
74697469 ; RV64I-NEXT: lhu a0, 0(a0)
74707470 ; RV64I-NEXT: slli a1, a1, 48
7471 ; RV64I-NEXT: srai s1, a1, 48
7471 ; RV64I-NEXT: srai s0, a1, 48
74727472 ; RV64I-NEXT: addi s3, sp, 6
74737473 ; RV64I-NEXT: .LBB92_1: # %atomicrmw.start
74747474 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
74757475 ; RV64I-NEXT: slli a1, a0, 48
74767476 ; RV64I-NEXT: srai a1, a1, 48
74777477 ; RV64I-NEXT: mv a2, a0
7478 ; RV64I-NEXT: blt s1, a1, .LBB92_3
7478 ; RV64I-NEXT: blt s0, a1, .LBB92_3
74797479 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
74807480 ; RV64I-NEXT: # in Loop: Header=BB92_1 Depth=1
74817481 ; RV64I-NEXT: mv a2, s2
74827482 ; RV64I-NEXT: .LBB92_3: # %atomicrmw.start
74837483 ; RV64I-NEXT: # in Loop: Header=BB92_1 Depth=1
74847484 ; RV64I-NEXT: sh a0, 6(sp)
7485 ; RV64I-NEXT: mv a0, s4
7485 ; RV64I-NEXT: mv a0, s1
74867486 ; RV64I-NEXT: mv a1, s3
74877487 ; RV64I-NEXT: addi a3, zero, 3
74887488 ; RV64I-NEXT: mv a4, zero
74917491 ; RV64I-NEXT: lh a0, 6(sp)
74927492 ; RV64I-NEXT: beqz a1, .LBB92_1
74937493 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
7494 ; RV64I-NEXT: ld s4, 8(sp)
7495 ; RV64I-NEXT: ld s3, 16(sp)
7496 ; RV64I-NEXT: ld s2, 24(sp)
7497 ; RV64I-NEXT: ld s1, 32(sp)
7494 ; RV64I-NEXT: ld s3, 8(sp)
7495 ; RV64I-NEXT: ld s2, 16(sp)
7496 ; RV64I-NEXT: ld s1, 24(sp)
7497 ; RV64I-NEXT: ld s0, 32(sp)
74987498 ; RV64I-NEXT: ld ra, 40(sp)
74997499 ; RV64I-NEXT: addi sp, sp, 48
75007500 ; RV64I-NEXT: ret
75387538 ; RV32I: # %bb.0:
75397539 ; RV32I-NEXT: addi sp, sp, -32
75407540 ; RV32I-NEXT: sw ra, 28(sp)
7541 ; RV32I-NEXT: sw s1, 24(sp)
7542 ; RV32I-NEXT: sw s2, 20(sp)
7543 ; RV32I-NEXT: sw s3, 16(sp)
7544 ; RV32I-NEXT: sw s4, 12(sp)
7541 ; RV32I-NEXT: sw s0, 24(sp)
7542 ; RV32I-NEXT: sw s1, 20(sp)
7543 ; RV32I-NEXT: sw s2, 16(sp)
7544 ; RV32I-NEXT: sw s3, 12(sp)
75457545 ; RV32I-NEXT: mv s2, a1
7546 ; RV32I-NEXT: mv s4, a0
7546 ; RV32I-NEXT: mv s1, a0
75477547 ; RV32I-NEXT: lhu a0, 0(a0)
75487548 ; RV32I-NEXT: slli a1, a1, 16
7549 ; RV32I-NEXT: srai s1, a1, 16
7549 ; RV32I-NEXT: srai s0, a1, 16
75507550 ; RV32I-NEXT: addi s3, sp, 10
75517551 ; RV32I-NEXT: .LBB93_1: # %atomicrmw.start
75527552 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
75537553 ; RV32I-NEXT: slli a1, a0, 16
75547554 ; RV32I-NEXT: srai a1, a1, 16
75557555 ; RV32I-NEXT: mv a2, a0
7556 ; RV32I-NEXT: blt s1, a1, .LBB93_3
7556 ; RV32I-NEXT: blt s0, a1, .LBB93_3
75577557 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
75587558 ; RV32I-NEXT: # in Loop: Header=BB93_1 Depth=1
75597559 ; RV32I-NEXT: mv a2, s2
75607560 ; RV32I-NEXT: .LBB93_3: # %atomicrmw.start
75617561 ; RV32I-NEXT: # in Loop: Header=BB93_1 Depth=1
75627562 ; RV32I-NEXT: sh a0, 10(sp)
7563 ; RV32I-NEXT: mv a0, s4
7563 ; RV32I-NEXT: mv a0, s1
75647564 ; RV32I-NEXT: mv a1, s3
75657565 ; RV32I-NEXT: addi a3, zero, 4
75667566 ; RV32I-NEXT: addi a4, zero, 2
75697569 ; RV32I-NEXT: lh a0, 10(sp)
75707570 ; RV32I-NEXT: beqz a1, .LBB93_1
75717571 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
7572 ; RV32I-NEXT: lw s4, 12(sp)
7573 ; RV32I-NEXT: lw s3, 16(sp)
7574 ; RV32I-NEXT: lw s2, 20(sp)
7575 ; RV32I-NEXT: lw s1, 24(sp)
7572 ; RV32I-NEXT: lw s3, 12(sp)
7573 ; RV32I-NEXT: lw s2, 16(sp)
7574 ; RV32I-NEXT: lw s1, 20(sp)
7575 ; RV32I-NEXT: lw s0, 24(sp)
75767576 ; RV32I-NEXT: lw ra, 28(sp)
75777577 ; RV32I-NEXT: addi sp, sp, 32
75787578 ; RV32I-NEXT: ret
76127612 ; RV64I: # %bb.0:
76137613 ; RV64I-NEXT: addi sp, sp, -48
76147614 ; RV64I-NEXT: sd ra, 40(sp)
7615 ; RV64I-NEXT: sd s1, 32(sp)
7616 ; RV64I-NEXT: sd s2, 24(sp)
7617 ; RV64I-NEXT: sd s3, 16(sp)
7618 ; RV64I-NEXT: sd s4, 8(sp)
7615 ; RV64I-NEXT: sd s0, 32(sp)
7616 ; RV64I-NEXT: sd s1, 24(sp)
7617 ; RV64I-NEXT: sd s2, 16(sp)
7618 ; RV64I-NEXT: sd s3, 8(sp)
76197619 ; RV64I-NEXT: mv s2, a1
7620 ; RV64I-NEXT: mv s4, a0
7620 ; RV64I-NEXT: mv s1, a0
76217621 ; RV64I-NEXT: lhu a0, 0(a0)
76227622 ; RV64I-NEXT: slli a1, a1, 48
7623 ; RV64I-NEXT: srai s1, a1, 48
7623 ; RV64I-NEXT: srai s0, a1, 48
76247624 ; RV64I-NEXT: addi s3, sp, 6
76257625 ; RV64I-NEXT: .LBB93_1: # %atomicrmw.start
76267626 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
76277627 ; RV64I-NEXT: slli a1, a0, 48
76287628 ; RV64I-NEXT: srai a1, a1, 48
76297629 ; RV64I-NEXT: mv a2, a0
7630 ; RV64I-NEXT: blt s1, a1, .LBB93_3
7630 ; RV64I-NEXT: blt s0, a1, .LBB93_3
76317631 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
76327632 ; RV64I-NEXT: # in Loop: Header=BB93_1 Depth=1
76337633 ; RV64I-NEXT: mv a2, s2
76347634 ; RV64I-NEXT: .LBB93_3: # %atomicrmw.start
76357635 ; RV64I-NEXT: # in Loop: Header=BB93_1 Depth=1
76367636 ; RV64I-NEXT: sh a0, 6(sp)
7637 ; RV64I-NEXT: mv a0, s4
7637 ; RV64I-NEXT: mv a0, s1
76387638 ; RV64I-NEXT: mv a1, s3
76397639 ; RV64I-NEXT: addi a3, zero, 4
76407640 ; RV64I-NEXT: addi a4, zero, 2
76437643 ; RV64I-NEXT: lh a0, 6(sp)
76447644 ; RV64I-NEXT: beqz a1, .LBB93_1
76457645 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
7646 ; RV64I-NEXT: ld s4, 8(sp)
7647 ; RV64I-NEXT: ld s3, 16(sp)
7648 ; RV64I-NEXT: ld s2, 24(sp)
7649 ; RV64I-NEXT: ld s1, 32(sp)
7646 ; RV64I-NEXT: ld s3, 8(sp)
7647 ; RV64I-NEXT: ld s2, 16(sp)
7648 ; RV64I-NEXT: ld s1, 24(sp)
7649 ; RV64I-NEXT: ld s0, 32(sp)
76507650 ; RV64I-NEXT: ld ra, 40(sp)
76517651 ; RV64I-NEXT: addi sp, sp, 48
76527652 ; RV64I-NEXT: ret
76907690 ; RV32I: # %bb.0:
76917691 ; RV32I-NEXT: addi sp, sp, -32
76927692 ; RV32I-NEXT: sw ra, 28(sp)
7693 ; RV32I-NEXT: sw s1, 24(sp)
7694 ; RV32I-NEXT: sw s2, 20(sp)
7695 ; RV32I-NEXT: sw s3, 16(sp)
7696 ; RV32I-NEXT: sw s4, 12(sp)
7693 ; RV32I-NEXT: sw s0, 24(sp)
7694 ; RV32I-NEXT: sw s1, 20(sp)
7695 ; RV32I-NEXT: sw s2, 16(sp)
7696 ; RV32I-NEXT: sw s3, 12(sp)
76977697 ; RV32I-NEXT: mv s2, a1
7698 ; RV32I-NEXT: mv s4, a0
7698 ; RV32I-NEXT: mv s1, a0
76997699 ; RV32I-NEXT: lhu a0, 0(a0)
77007700 ; RV32I-NEXT: slli a1, a1, 16
7701 ; RV32I-NEXT: srai s1, a1, 16
7701 ; RV32I-NEXT: srai s0, a1, 16
77027702 ; RV32I-NEXT: addi s3, sp, 10
77037703 ; RV32I-NEXT: .LBB94_1: # %atomicrmw.start
77047704 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
77057705 ; RV32I-NEXT: slli a1, a0, 16
77067706 ; RV32I-NEXT: srai a1, a1, 16
77077707 ; RV32I-NEXT: mv a2, a0
7708 ; RV32I-NEXT: blt s1, a1, .LBB94_3
7708 ; RV32I-NEXT: blt s0, a1, .LBB94_3
77097709 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
77107710 ; RV32I-NEXT: # in Loop: Header=BB94_1 Depth=1
77117711 ; RV32I-NEXT: mv a2, s2
77127712 ; RV32I-NEXT: .LBB94_3: # %atomicrmw.start
77137713 ; RV32I-NEXT: # in Loop: Header=BB94_1 Depth=1
77147714 ; RV32I-NEXT: sh a0, 10(sp)
7715 ; RV32I-NEXT: mv a0, s4
7715 ; RV32I-NEXT: mv a0, s1
77167716 ; RV32I-NEXT: mv a1, s3
77177717 ; RV32I-NEXT: addi a3, zero, 5
77187718 ; RV32I-NEXT: addi a4, zero, 5
77217721 ; RV32I-NEXT: lh a0, 10(sp)
77227722 ; RV32I-NEXT: beqz a1, .LBB94_1
77237723 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
7724 ; RV32I-NEXT: lw s4, 12(sp)
7725 ; RV32I-NEXT: lw s3, 16(sp)
7726 ; RV32I-NEXT: lw s2, 20(sp)
7727 ; RV32I-NEXT: lw s1, 24(sp)
7724 ; RV32I-NEXT: lw s3, 12(sp)
7725 ; RV32I-NEXT: lw s2, 16(sp)
7726 ; RV32I-NEXT: lw s1, 20(sp)
7727 ; RV32I-NEXT: lw s0, 24(sp)
77287728 ; RV32I-NEXT: lw ra, 28(sp)
77297729 ; RV32I-NEXT: addi sp, sp, 32
77307730 ; RV32I-NEXT: ret
77647764 ; RV64I: # %bb.0:
77657765 ; RV64I-NEXT: addi sp, sp, -48
77667766 ; RV64I-NEXT: sd ra, 40(sp)
7767 ; RV64I-NEXT: sd s1, 32(sp)
7768 ; RV64I-NEXT: sd s2, 24(sp)
7769 ; RV64I-NEXT: sd s3, 16(sp)
7770 ; RV64I-NEXT: sd s4, 8(sp)
7767 ; RV64I-NEXT: sd s0, 32(sp)
7768 ; RV64I-NEXT: sd s1, 24(sp)
7769 ; RV64I-NEXT: sd s2, 16(sp)
7770 ; RV64I-NEXT: sd s3, 8(sp)
77717771 ; RV64I-NEXT: mv s2, a1
7772 ; RV64I-NEXT: mv s4, a0
7772 ; RV64I-NEXT: mv s1, a0
77737773 ; RV64I-NEXT: lhu a0, 0(a0)
77747774 ; RV64I-NEXT: slli a1, a1, 48
7775 ; RV64I-NEXT: srai s1, a1, 48
7775 ; RV64I-NEXT: srai s0, a1, 48
77767776 ; RV64I-NEXT: addi s3, sp, 6
77777777 ; RV64I-NEXT: .LBB94_1: # %atomicrmw.start
77787778 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
77797779 ; RV64I-NEXT: slli a1, a0, 48
77807780 ; RV64I-NEXT: srai a1, a1, 48
77817781 ; RV64I-NEXT: mv a2, a0
7782 ; RV64I-NEXT: blt s1, a1, .LBB94_3
7782 ; RV64I-NEXT: blt s0, a1, .LBB94_3
77837783 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
77847784 ; RV64I-NEXT: # in Loop: Header=BB94_1 Depth=1
77857785 ; RV64I-NEXT: mv a2, s2
77867786 ; RV64I-NEXT: .LBB94_3: # %atomicrmw.start
77877787 ; RV64I-NEXT: # in Loop: Header=BB94_1 Depth=1
77887788 ; RV64I-NEXT: sh a0, 6(sp)
7789 ; RV64I-NEXT: mv a0, s4
7789 ; RV64I-NEXT: mv a0, s1
77907790 ; RV64I-NEXT: mv a1, s3
77917791 ; RV64I-NEXT: addi a3, zero, 5
77927792 ; RV64I-NEXT: addi a4, zero, 5
77957795 ; RV64I-NEXT: lh a0, 6(sp)
77967796 ; RV64I-NEXT: beqz a1, .LBB94_1
77977797 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
7798 ; RV64I-NEXT: ld s4, 8(sp)
7799 ; RV64I-NEXT: ld s3, 16(sp)
7800 ; RV64I-NEXT: ld s2, 24(sp)
7801 ; RV64I-NEXT: ld s1, 32(sp)
7798 ; RV64I-NEXT: ld s3, 8(sp)
7799 ; RV64I-NEXT: ld s2, 16(sp)
7800 ; RV64I-NEXT: ld s1, 24(sp)
7801 ; RV64I-NEXT: ld s0, 32(sp)
78027802 ; RV64I-NEXT: ld ra, 40(sp)
78037803 ; RV64I-NEXT: addi sp, sp, 48
78047804 ; RV64I-NEXT: ret
78427842 ; RV32I: # %bb.0:
78437843 ; RV32I-NEXT: addi sp, sp, -32
78447844 ; RV32I-NEXT: sw ra, 28(sp)
7845 ; RV32I-NEXT: sw s1, 24(sp)
7846 ; RV32I-NEXT: sw s2, 20(sp)
7847 ; RV32I-NEXT: sw s3, 16(sp)
7848 ; RV32I-NEXT: sw s4, 12(sp)
7845 ; RV32I-NEXT: sw s0, 24(sp)
7846 ; RV32I-NEXT: sw s1, 20(sp)
7847 ; RV32I-NEXT: sw s2, 16(sp)
7848 ; RV32I-NEXT: sw s3, 12(sp)
78497849 ; RV32I-NEXT: mv s2, a1
7850 ; RV32I-NEXT: mv s4, a0
7850 ; RV32I-NEXT: mv s1, a0
78517851 ; RV32I-NEXT: lhu a0, 0(a0)
78527852 ; RV32I-NEXT: slli a1, a1, 16
7853 ; RV32I-NEXT: srai s1, a1, 16
7853 ; RV32I-NEXT: srai s0, a1, 16
78547854 ; RV32I-NEXT: addi s3, sp, 10
78557855 ; RV32I-NEXT: .LBB95_1: # %atomicrmw.start
78567856 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
78577857 ; RV32I-NEXT: slli a1, a0, 16
78587858 ; RV32I-NEXT: srai a1, a1, 16
78597859 ; RV32I-NEXT: mv a2, a0
7860 ; RV32I-NEXT: bge s1, a1, .LBB95_3
7860 ; RV32I-NEXT: bge s0, a1, .LBB95_3
78617861 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
78627862 ; RV32I-NEXT: # in Loop: Header=BB95_1 Depth=1
78637863 ; RV32I-NEXT: mv a2, s2
78647864 ; RV32I-NEXT: .LBB95_3: # %atomicrmw.start
78657865 ; RV32I-NEXT: # in Loop: Header=BB95_1 Depth=1
78667866 ; RV32I-NEXT: sh a0, 10(sp)
7867 ; RV32I-NEXT: mv a0, s4
7867 ; RV32I-NEXT: mv a0, s1
78687868 ; RV32I-NEXT: mv a1, s3
78697869 ; RV32I-NEXT: mv a3, zero
78707870 ; RV32I-NEXT: mv a4, zero
78737873 ; RV32I-NEXT: lh a0, 10(sp)
78747874 ; RV32I-NEXT: beqz a1, .LBB95_1
78757875 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
7876 ; RV32I-NEXT: lw s4, 12(sp)
7877 ; RV32I-NEXT: lw s3, 16(sp)
7878 ; RV32I-NEXT: lw s2, 20(sp)
7879 ; RV32I-NEXT: lw s1, 24(sp)
7876 ; RV32I-NEXT: lw s3, 12(sp)
7877 ; RV32I-NEXT: lw s2, 16(sp)
7878 ; RV32I-NEXT: lw s1, 20(sp)
7879 ; RV32I-NEXT: lw s0, 24(sp)
78807880 ; RV32I-NEXT: lw ra, 28(sp)
78817881 ; RV32I-NEXT: addi sp, sp, 32
78827882 ; RV32I-NEXT: ret
79167916 ; RV64I: # %bb.0:
79177917 ; RV64I-NEXT: addi sp, sp, -48
79187918 ; RV64I-NEXT: sd ra, 40(sp)
7919 ; RV64I-NEXT: sd s1, 32(sp)
7920 ; RV64I-NEXT: sd s2, 24(sp)
7921 ; RV64I-NEXT: sd s3, 16(sp)
7922 ; RV64I-NEXT: sd s4, 8(sp)
7919 ; RV64I-NEXT: sd s0, 32(sp)
7920 ; RV64I-NEXT: sd s1, 24(sp)
7921 ; RV64I-NEXT: sd s2, 16(sp)
7922 ; RV64I-NEXT: sd s3, 8(sp)
79237923 ; RV64I-NEXT: mv s2, a1
7924 ; RV64I-NEXT: mv s4, a0
7924 ; RV64I-NEXT: mv s1, a0
79257925 ; RV64I-NEXT: lhu a0, 0(a0)
79267926 ; RV64I-NEXT: slli a1, a1, 48
7927 ; RV64I-NEXT: srai s1, a1, 48
7927 ; RV64I-NEXT: srai s0, a1, 48
79287928 ; RV64I-NEXT: addi s3, sp, 6
79297929 ; RV64I-NEXT: .LBB95_1: # %atomicrmw.start
79307930 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
79317931 ; RV64I-NEXT: slli a1, a0, 48
79327932 ; RV64I-NEXT: srai a1, a1, 48
79337933 ; RV64I-NEXT: mv a2, a0
7934 ; RV64I-NEXT: bge s1, a1, .LBB95_3
7934 ; RV64I-NEXT: bge s0, a1, .LBB95_3
79357935 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
79367936 ; RV64I-NEXT: # in Loop: Header=BB95_1 Depth=1
79377937 ; RV64I-NEXT: mv a2, s2
79387938 ; RV64I-NEXT: .LBB95_3: # %atomicrmw.start
79397939 ; RV64I-NEXT: # in Loop: Header=BB95_1 Depth=1
79407940 ; RV64I-NEXT: sh a0, 6(sp)
7941 ; RV64I-NEXT: mv a0, s4
7941 ; RV64I-NEXT: mv a0, s1
79427942 ; RV64I-NEXT: mv a1, s3
79437943 ; RV64I-NEXT: mv a3, zero
79447944 ; RV64I-NEXT: mv a4, zero
79477947 ; RV64I-NEXT: lh a0, 6(sp)
79487948 ; RV64I-NEXT: beqz a1, .LBB95_1
79497949 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
7950 ; RV64I-NEXT: ld s4, 8(sp)
7951 ; RV64I-NEXT: ld s3, 16(sp)
7952 ; RV64I-NEXT: ld s2, 24(sp)
7953 ; RV64I-NEXT: ld s1, 32(sp)
7950 ; RV64I-NEXT: ld s3, 8(sp)
7951 ; RV64I-NEXT: ld s2, 16(sp)
7952 ; RV64I-NEXT: ld s1, 24(sp)
7953 ; RV64I-NEXT: ld s0, 32(sp)
79547954 ; RV64I-NEXT: ld ra, 40(sp)
79557955 ; RV64I-NEXT: addi sp, sp, 48
79567956 ; RV64I-NEXT: ret
79947994 ; RV32I: # %bb.0:
79957995 ; RV32I-NEXT: addi sp, sp, -32
79967996 ; RV32I-NEXT: sw ra, 28(sp)
7997 ; RV32I-NEXT: sw s1, 24(sp)
7998 ; RV32I-NEXT: sw s2, 20(sp)
7999 ; RV32I-NEXT: sw s3, 16(sp)
8000 ; RV32I-NEXT: sw s4, 12(sp)
7997 ; RV32I-NEXT: sw s0, 24(sp)
7998 ; RV32I-NEXT: sw s1, 20(sp)
7999 ; RV32I-NEXT: sw s2, 16(sp)
8000 ; RV32I-NEXT: sw s3, 12(sp)
80018001 ; RV32I-NEXT: mv s2, a1
8002 ; RV32I-NEXT: mv s4, a0
8002 ; RV32I-NEXT: mv s1, a0
80038003 ; RV32I-NEXT: lhu a0, 0(a0)
80048004 ; RV32I-NEXT: slli a1, a1, 16
8005 ; RV32I-NEXT: srai s1, a1, 16
8005 ; RV32I-NEXT: srai s0, a1, 16
80068006 ; RV32I-NEXT: addi s3, sp, 10
80078007 ; RV32I-NEXT: .LBB96_1: # %atomicrmw.start
80088008 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
80098009 ; RV32I-NEXT: slli a1, a0, 16
80108010 ; RV32I-NEXT: srai a1, a1, 16
80118011 ; RV32I-NEXT: mv a2, a0
8012 ; RV32I-NEXT: bge s1, a1, .LBB96_3
8012 ; RV32I-NEXT: bge s0, a1, .LBB96_3
80138013 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
80148014 ; RV32I-NEXT: # in Loop: Header=BB96_1 Depth=1
80158015 ; RV32I-NEXT: mv a2, s2
80168016 ; RV32I-NEXT: .LBB96_3: # %atomicrmw.start
80178017 ; RV32I-NEXT: # in Loop: Header=BB96_1 Depth=1
80188018 ; RV32I-NEXT: sh a0, 10(sp)
8019 ; RV32I-NEXT: mv a0, s4
8019 ; RV32I-NEXT: mv a0, s1
80208020 ; RV32I-NEXT: mv a1, s3
80218021 ; RV32I-NEXT: addi a3, zero, 2
80228022 ; RV32I-NEXT: addi a4, zero, 2
80258025 ; RV32I-NEXT: lh a0, 10(sp)
80268026 ; RV32I-NEXT: beqz a1, .LBB96_1
80278027 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
8028 ; RV32I-NEXT: lw s4, 12(sp)
8029 ; RV32I-NEXT: lw s3, 16(sp)
8030 ; RV32I-NEXT: lw s2, 20(sp)
8031 ; RV32I-NEXT: lw s1, 24(sp)
8028 ; RV32I-NEXT: lw s3, 12(sp)
8029 ; RV32I-NEXT: lw s2, 16(sp)
8030 ; RV32I-NEXT: lw s1, 20(sp)
8031 ; RV32I-NEXT: lw s0, 24(sp)
80328032 ; RV32I-NEXT: lw ra, 28(sp)
80338033 ; RV32I-NEXT: addi sp, sp, 32
80348034 ; RV32I-NEXT: ret
80688068 ; RV64I: # %bb.0:
80698069 ; RV64I-NEXT: addi sp, sp, -48
80708070 ; RV64I-NEXT: sd ra, 40(sp)
8071 ; RV64I-NEXT: sd s1, 32(sp)
8072 ; RV64I-NEXT: sd s2, 24(sp)
8073 ; RV64I-NEXT: sd s3, 16(sp)
8074 ; RV64I-NEXT: sd s4, 8(sp)
8071 ; RV64I-NEXT: sd s0, 32(sp)
8072 ; RV64I-NEXT: sd s1, 24(sp)
8073 ; RV64I-NEXT: sd s2, 16(sp)
8074 ; RV64I-NEXT: sd s3, 8(sp)
80758075 ; RV64I-NEXT: mv s2, a1
8076 ; RV64I-NEXT: mv s4, a0
8076 ; RV64I-NEXT: mv s1, a0
80778077 ; RV64I-NEXT: lhu a0, 0(a0)
80788078 ; RV64I-NEXT: slli a1, a1, 48
8079 ; RV64I-NEXT: srai s1, a1, 48
8079 ; RV64I-NEXT: srai s0, a1, 48
80808080 ; RV64I-NEXT: addi s3, sp, 6
80818081 ; RV64I-NEXT: .LBB96_1: # %atomicrmw.start
80828082 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
80838083 ; RV64I-NEXT: slli a1, a0, 48
80848084 ; RV64I-NEXT: srai a1, a1, 48
80858085 ; RV64I-NEXT: mv a2, a0
8086 ; RV64I-NEXT: bge s1, a1, .LBB96_3
8086 ; RV64I-NEXT: bge s0, a1, .LBB96_3
80878087 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
80888088 ; RV64I-NEXT: # in Loop: Header=BB96_1 Depth=1
80898089 ; RV64I-NEXT: mv a2, s2
80908090 ; RV64I-NEXT: .LBB96_3: # %atomicrmw.start
80918091 ; RV64I-NEXT: # in Loop: Header=BB96_1 Depth=1
80928092 ; RV64I-NEXT: sh a0, 6(sp)
8093 ; RV64I-NEXT: mv a0, s4
8093 ; RV64I-NEXT: mv a0, s1
80948094 ; RV64I-NEXT: mv a1, s3
80958095 ; RV64I-NEXT: addi a3, zero, 2
80968096 ; RV64I-NEXT: addi a4, zero, 2
80998099 ; RV64I-NEXT: lh a0, 6(sp)
81008100 ; RV64I-NEXT: beqz a1, .LBB96_1
81018101 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
8102 ; RV64I-NEXT: ld s4, 8(sp)
8103 ; RV64I-NEXT: ld s3, 16(sp)
8104 ; RV64I-NEXT: ld s2, 24(sp)
8105 ; RV64I-NEXT: ld s1, 32(sp)
8102 ; RV64I-NEXT: ld s3, 8(sp)
8103 ; RV64I-NEXT: ld s2, 16(sp)
8104 ; RV64I-NEXT: ld s1, 24(sp)
8105 ; RV64I-NEXT: ld s0, 32(sp)
81068106 ; RV64I-NEXT: ld ra, 40(sp)
81078107 ; RV64I-NEXT: addi sp, sp, 48
81088108 ; RV64I-NEXT: ret
81468146 ; RV32I: # %bb.0:
81478147 ; RV32I-NEXT: addi sp, sp, -32
81488148 ; RV32I-NEXT: sw ra, 28(sp)
8149 ; RV32I-NEXT: sw s1, 24(sp)
8150 ; RV32I-NEXT: sw s2, 20(sp)
8151 ; RV32I-NEXT: sw s3, 16(sp)
8152 ; RV32I-NEXT: sw s4, 12(sp)
8149 ; RV32I-NEXT: sw s0, 24(sp)
8150 ; RV32I-NEXT: sw s1, 20(sp)
8151 ; RV32I-NEXT: sw s2, 16(sp)
8152 ; RV32I-NEXT: sw s3, 12(sp)
81538153 ; RV32I-NEXT: mv s2, a1
8154 ; RV32I-NEXT: mv s4, a0
8154 ; RV32I-NEXT: mv s1, a0
81558155 ; RV32I-NEXT: lhu a0, 0(a0)
81568156 ; RV32I-NEXT: slli a1, a1, 16
8157 ; RV32I-NEXT: srai s1, a1, 16
8157 ; RV32I-NEXT: srai s0, a1, 16
81588158 ; RV32I-NEXT: addi s3, sp, 10
81598159 ; RV32I-NEXT: .LBB97_1: # %atomicrmw.start
81608160 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
81618161 ; RV32I-NEXT: slli a1, a0, 16
81628162 ; RV32I-NEXT: srai a1, a1, 16
81638163 ; RV32I-NEXT: mv a2, a0
8164 ; RV32I-NEXT: bge s1, a1, .LBB97_3
8164 ; RV32I-NEXT: bge s0, a1, .LBB97_3
81658165 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
81668166 ; RV32I-NEXT: # in Loop: Header=BB97_1 Depth=1
81678167 ; RV32I-NEXT: mv a2, s2
81688168 ; RV32I-NEXT: .LBB97_3: # %atomicrmw.start
81698169 ; RV32I-NEXT: # in Loop: Header=BB97_1 Depth=1
81708170 ; RV32I-NEXT: sh a0, 10(sp)
8171 ; RV32I-NEXT: mv a0, s4
8171 ; RV32I-NEXT: mv a0, s1
81728172 ; RV32I-NEXT: mv a1, s3
81738173 ; RV32I-NEXT: addi a3, zero, 3
81748174 ; RV32I-NEXT: mv a4, zero
81778177 ; RV32I-NEXT: lh a0, 10(sp)
81788178 ; RV32I-NEXT: beqz a1, .LBB97_1
81798179 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
8180 ; RV32I-NEXT: lw s4, 12(sp)
8181 ; RV32I-NEXT: lw s3, 16(sp)
8182 ; RV32I-NEXT: lw s2, 20(sp)
8183 ; RV32I-NEXT: lw s1, 24(sp)
8180 ; RV32I-NEXT: lw s3, 12(sp)
8181 ; RV32I-NEXT: lw s2, 16(sp)
8182 ; RV32I-NEXT: lw s1, 20(sp)
8183 ; RV32I-NEXT: lw s0, 24(sp)
81848184 ; RV32I-NEXT: lw ra, 28(sp)
81858185 ; RV32I-NEXT: addi sp, sp, 32
81868186 ; RV32I-NEXT: ret
82208220 ; RV64I: # %bb.0:
82218221 ; RV64I-NEXT: addi sp, sp, -48
82228222 ; RV64I-NEXT: sd ra, 40(sp)
8223 ; RV64I-NEXT: sd s1, 32(sp)
8224 ; RV64I-NEXT: sd s2, 24(sp)
8225 ; RV64I-NEXT: sd s3, 16(sp)
8226 ; RV64I-NEXT: sd s4, 8(sp)
8223 ; RV64I-NEXT: sd s0, 32(sp)
8224 ; RV64I-NEXT: sd s1, 24(sp)
8225 ; RV64I-NEXT: sd s2, 16(sp)
8226 ; RV64I-NEXT: sd s3, 8(sp)
82278227 ; RV64I-NEXT: mv s2, a1
8228 ; RV64I-NEXT: mv s4, a0
8228 ; RV64I-NEXT: mv s1, a0
82298229 ; RV64I-NEXT: lhu a0, 0(a0)
82308230 ; RV64I-NEXT: slli a1, a1, 48
8231 ; RV64I-NEXT: srai s1, a1, 48
8231 ; RV64I-NEXT: srai s0, a1, 48
82328232 ; RV64I-NEXT: addi s3, sp, 6
82338233 ; RV64I-NEXT: .LBB97_1: # %atomicrmw.start
82348234 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
82358235 ; RV64I-NEXT: slli a1, a0, 48
82368236 ; RV64I-NEXT: srai a1, a1, 48
82378237 ; RV64I-NEXT: mv a2, a0
8238 ; RV64I-NEXT: bge s1, a1, .LBB97_3
8238 ; RV64I-NEXT: bge s0, a1, .LBB97_3
82398239 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
82408240 ; RV64I-NEXT: # in Loop: Header=BB97_1 Depth=1
82418241 ; RV64I-NEXT: mv a2, s2
82428242 ; RV64I-NEXT: .LBB97_3: # %atomicrmw.start
82438243 ; RV64I-NEXT: # in Loop: Header=BB97_1 Depth=1
82448244 ; RV64I-NEXT: sh a0, 6(sp)
8245 ; RV64I-NEXT: mv a0, s4
8245 ; RV64I-NEXT: mv a0, s1
82468246 ; RV64I-NEXT: mv a1, s3
82478247 ; RV64I-NEXT: addi a3, zero, 3
82488248 ; RV64I-NEXT: mv a4, zero
82518251 ; RV64I-NEXT: lh a0, 6(sp)
82528252 ; RV64I-NEXT: beqz a1, .LBB97_1
82538253 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
8254 ; RV64I-NEXT: ld s4, 8(sp)
8255 ; RV64I-NEXT: ld s3, 16(sp)
8256 ; RV64I-NEXT: ld s2, 24(sp)
8257 ; RV64I-NEXT: ld s1, 32(sp)
8254 ; RV64I-NEXT: ld s3, 8(sp)
8255 ; RV64I-NEXT: ld s2, 16(sp)
8256 ; RV64I-NEXT: ld s1, 24(sp)
8257 ; RV64I-NEXT: ld s0, 32(sp)
82588258 ; RV64I-NEXT: ld ra, 40(sp)
82598259 ; RV64I-NEXT: addi sp, sp, 48
82608260 ; RV64I-NEXT: ret
82988298 ; RV32I: # %bb.0:
82998299 ; RV32I-NEXT: addi sp, sp, -32
83008300 ; RV32I-NEXT: sw ra, 28(sp)
8301 ; RV32I-NEXT: sw s1, 24(sp)
8302 ; RV32I-NEXT: sw s2, 20(sp)
8303 ; RV32I-NEXT: sw s3, 16(sp)
8304 ; RV32I-NEXT: sw s4, 12(sp)
8301 ; RV32I-NEXT: sw s0, 24(sp)
8302 ; RV32I-NEXT: sw s1, 20(sp)
8303 ; RV32I-NEXT: sw s2, 16(sp)
8304 ; RV32I-NEXT: sw s3, 12(sp)
83058305 ; RV32I-NEXT: mv s2, a1
8306 ; RV32I-NEXT: mv s4, a0
8306 ; RV32I-NEXT: mv s1, a0
83078307 ; RV32I-NEXT: lhu a0, 0(a0)
83088308 ; RV32I-NEXT: slli a1, a1, 16
8309 ; RV32I-NEXT: srai s1, a1, 16
8309 ; RV32I-NEXT: srai s0, a1, 16
83108310 ; RV32I-NEXT: addi s3, sp, 10
83118311 ; RV32I-NEXT: .LBB98_1: # %atomicrmw.start
83128312 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
83138313 ; RV32I-NEXT: slli a1, a0, 16
83148314 ; RV32I-NEXT: srai a1, a1, 16
83158315 ; RV32I-NEXT: mv a2, a0
8316 ; RV32I-NEXT: bge s1, a1, .LBB98_3
8316 ; RV32I-NEXT: bge s0, a1, .LBB98_3
83178317 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
83188318 ; RV32I-NEXT: # in Loop: Header=BB98_1 Depth=1
83198319 ; RV32I-NEXT: mv a2, s2
83208320 ; RV32I-NEXT: .LBB98_3: # %atomicrmw.start
83218321 ; RV32I-NEXT: # in Loop: Header=BB98_1 Depth=1
83228322 ; RV32I-NEXT: sh a0, 10(sp)
8323 ; RV32I-NEXT: mv a0, s4
8323 ; RV32I-NEXT: mv a0, s1
83248324 ; RV32I-NEXT: mv a1, s3
83258325 ; RV32I-NEXT: addi a3, zero, 4
83268326 ; RV32I-NEXT: addi a4, zero, 2
83298329 ; RV32I-NEXT: lh a0, 10(sp)
83308330 ; RV32I-NEXT: beqz a1, .LBB98_1
83318331 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
8332 ; RV32I-NEXT: lw s4, 12(sp)
8333 ; RV32I-NEXT: lw s3, 16(sp)
8334 ; RV32I-NEXT: lw s2, 20(sp)
8335 ; RV32I-NEXT: lw s1, 24(sp)
8332 ; RV32I-NEXT: lw s3, 12(sp)
8333 ; RV32I-NEXT: lw s2, 16(sp)
8334 ; RV32I-NEXT: lw s1, 20(sp)
8335 ; RV32I-NEXT: lw s0, 24(sp)
83368336 ; RV32I-NEXT: lw ra, 28(sp)
83378337 ; RV32I-NEXT: addi sp, sp, 32
83388338 ; RV32I-NEXT: ret
83728372 ; RV64I: # %bb.0:
83738373 ; RV64I-NEXT: addi sp, sp, -48
83748374 ; RV64I-NEXT: sd ra, 40(sp)
8375 ; RV64I-NEXT: sd s1, 32(sp)
8376 ; RV64I-NEXT: sd s2, 24(sp)
8377 ; RV64I-NEXT: sd s3, 16(sp)
8378 ; RV64I-NEXT: sd s4, 8(sp)
8375 ; RV64I-NEXT: sd s0, 32(sp)
8376 ; RV64I-NEXT: sd s1, 24(sp)
8377 ; RV64I-NEXT: sd s2, 16(sp)
8378 ; RV64I-NEXT: sd s3, 8(sp)
83798379 ; RV64I-NEXT: mv s2, a1
8380 ; RV64I-NEXT: mv s4, a0
8380 ; RV64I-NEXT: mv s1, a0
83818381 ; RV64I-NEXT: lhu a0, 0(a0)
83828382 ; RV64I-NEXT: slli a1, a1, 48
8383 ; RV64I-NEXT: srai s1, a1, 48
8383 ; RV64I-NEXT: srai s0, a1, 48
83848384 ; RV64I-NEXT: addi s3, sp, 6
83858385 ; RV64I-NEXT: .LBB98_1: # %atomicrmw.start
83868386 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
83878387 ; RV64I-NEXT: slli a1, a0, 48
83888388 ; RV64I-NEXT: srai a1, a1, 48
83898389 ; RV64I-NEXT: mv a2, a0
8390 ; RV64I-NEXT: bge s1, a1, .LBB98_3
8390 ; RV64I-NEXT: bge s0, a1, .LBB98_3
83918391 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
83928392 ; RV64I-NEXT: # in Loop: Header=BB98_1 Depth=1
83938393 ; RV64I-NEXT: mv a2, s2
83948394 ; RV64I-NEXT: .LBB98_3: # %atomicrmw.start
83958395 ; RV64I-NEXT: # in Loop: Header=BB98_1 Depth=1
83968396 ; RV64I-NEXT: sh a0, 6(sp)
8397 ; RV64I-NEXT: mv a0, s4
8397 ; RV64I-NEXT: mv a0, s1
83988398 ; RV64I-NEXT: mv a1, s3
83998399 ; RV64I-NEXT: addi a3, zero, 4
84008400 ; RV64I-NEXT: addi a4, zero, 2
84038403 ; RV64I-NEXT: lh a0, 6(sp)
84048404 ; RV64I-NEXT: beqz a1, .LBB98_1
84058405 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
8406 ; RV64I-NEXT: ld s4, 8(sp)
8407 ; RV64I-NEXT: ld s3, 16(sp)
8408 ; RV64I-NEXT: ld s2, 24(sp)
8409 ; RV64I-NEXT: ld s1, 32(sp)
8406 ; RV64I-NEXT: ld s3, 8(sp)
8407 ; RV64I-NEXT: ld s2, 16(sp)
8408 ; RV64I-NEXT: ld s1, 24(sp)
8409 ; RV64I-NEXT: ld s0, 32(sp)
84108410 ; RV64I-NEXT: ld ra, 40(sp)
84118411 ; RV64I-NEXT: addi sp, sp, 48
84128412 ; RV64I-NEXT: ret
84508450 ; RV32I: # %bb.0:
84518451 ; RV32I-NEXT: addi sp, sp, -32
84528452 ; RV32I-NEXT: sw ra, 28(sp)
8453 ; RV32I-NEXT: sw s1, 24(sp)
8454 ; RV32I-NEXT: sw s2, 20(sp)
8455 ; RV32I-NEXT: sw s3, 16(sp)
8456 ; RV32I-NEXT: sw s4, 12(sp)
8453 ; RV32I-NEXT: sw s0, 24(sp)
8454 ; RV32I-NEXT: sw s1, 20(sp)
8455 ; RV32I-NEXT: sw s2, 16(sp)
8456 ; RV32I-NEXT: sw s3, 12(sp)
84578457 ; RV32I-NEXT: mv s2, a1
8458 ; RV32I-NEXT: mv s4, a0
8458 ; RV32I-NEXT: mv s1, a0
84598459 ; RV32I-NEXT: lhu a0, 0(a0)
84608460 ; RV32I-NEXT: slli a1, a1, 16
8461 ; RV32I-NEXT: srai s1, a1, 16
8461 ; RV32I-NEXT: srai s0, a1, 16
84628462 ; RV32I-NEXT: addi s3, sp, 10
84638463 ; RV32I-NEXT: .LBB99_1: # %atomicrmw.start
84648464 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
84658465 ; RV32I-NEXT: slli a1, a0, 16
84668466 ; RV32I-NEXT: srai a1, a1, 16
84678467 ; RV32I-NEXT: mv a2, a0
8468 ; RV32I-NEXT: bge s1, a1, .LBB99_3
8468 ; RV32I-NEXT: bge s0, a1, .LBB99_3
84698469 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
84708470 ; RV32I-NEXT: # in Loop: Header=BB99_1 Depth=1
84718471 ; RV32I-NEXT: mv a2, s2
84728472 ; RV32I-NEXT: .LBB99_3: # %atomicrmw.start
84738473 ; RV32I-NEXT: # in Loop: Header=BB99_1 Depth=1
84748474 ; RV32I-NEXT: sh a0, 10(sp)
8475 ; RV32I-NEXT: mv a0, s4
8475 ; RV32I-NEXT: mv a0, s1
84768476 ; RV32I-NEXT: mv a1, s3
84778477 ; RV32I-NEXT: addi a3, zero, 5
84788478 ; RV32I-NEXT: addi a4, zero, 5
84818481 ; RV32I-NEXT: lh a0, 10(sp)
84828482 ; RV32I-NEXT: beqz a1, .LBB99_1
84838483 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
8484 ; RV32I-NEXT: lw s4, 12(sp)
8485 ; RV32I-NEXT: lw s3, 16(sp)
8486 ; RV32I-NEXT: lw s2, 20(sp)
8487 ; RV32I-NEXT: lw s1, 24(sp)
8484 ; RV32I-NEXT: lw s3, 12(sp)
8485 ; RV32I-NEXT: lw s2, 16(sp)
8486 ; RV32I-NEXT: lw s1, 20(sp)
8487 ; RV32I-NEXT: lw s0, 24(sp)
84888488 ; RV32I-NEXT: lw ra, 28(sp)
84898489 ; RV32I-NEXT: addi sp, sp, 32
84908490 ; RV32I-NEXT: ret
85248524 ; RV64I: # %bb.0:
85258525 ; RV64I-NEXT: addi sp, sp, -48
85268526 ; RV64I-NEXT: sd ra, 40(sp)
8527 ; RV64I-NEXT: sd s1, 32(sp)
8528 ; RV64I-NEXT: sd s2, 24(sp)
8529 ; RV64I-NEXT: sd s3, 16(sp)
8530 ; RV64I-NEXT: sd s4, 8(sp)
8527 ; RV64I-NEXT: sd s0, 32(sp)
8528 ; RV64I-NEXT: sd s1, 24(sp)
8529 ; RV64I-NEXT: sd s2, 16(sp)
8530 ; RV64I-NEXT: sd s3, 8(sp)
85318531 ; RV64I-NEXT: mv s2, a1
8532 ; RV64I-NEXT: mv s4, a0
8532 ; RV64I-NEXT: mv s1, a0
85338533 ; RV64I-NEXT: lhu a0, 0(a0)
85348534 ; RV64I-NEXT: slli a1, a1, 48
8535 ; RV64I-NEXT: srai s1, a1, 48
8535 ; RV64I-NEXT: srai s0, a1, 48
85368536 ; RV64I-NEXT: addi s3, sp, 6
85378537 ; RV64I-NEXT: .LBB99_1: # %atomicrmw.start
85388538 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
85398539 ; RV64I-NEXT: slli a1, a0, 48
85408540 ; RV64I-NEXT: srai a1, a1, 48
85418541 ; RV64I-NEXT: mv a2, a0
8542 ; RV64I-NEXT: bge s1, a1, .LBB99_3
8542 ; RV64I-NEXT: bge s0, a1, .LBB99_3
85438543 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
85448544 ; RV64I-NEXT: # in Loop: Header=BB99_1 Depth=1
85458545 ; RV64I-NEXT: mv a2, s2
85468546 ; RV64I-NEXT: .LBB99_3: # %atomicrmw.start
85478547 ; RV64I-NEXT: # in Loop: Header=BB99_1 Depth=1
85488548 ; RV64I-NEXT: sh a0, 6(sp)
8549 ; RV64I-NEXT: mv a0, s4
8549 ; RV64I-NEXT: mv a0, s1
85508550 ; RV64I-NEXT: mv a1, s3
85518551 ; RV64I-NEXT: addi a3, zero, 5
85528552 ; RV64I-NEXT: addi a4, zero, 5
85558555 ; RV64I-NEXT: lh a0, 6(sp)
85568556 ; RV64I-NEXT: beqz a1, .LBB99_1
85578557 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
8558 ; RV64I-NEXT: ld s4, 8(sp)
8559 ; RV64I-NEXT: ld s3, 16(sp)
8560 ; RV64I-NEXT: ld s2, 24(sp)
8561 ; RV64I-NEXT: ld s1, 32(sp)
8558 ; RV64I-NEXT: ld s3, 8(sp)
8559 ; RV64I-NEXT: ld s2, 16(sp)
8560 ; RV64I-NEXT: ld s1, 24(sp)
8561 ; RV64I-NEXT: ld s0, 32(sp)
85628562 ; RV64I-NEXT: ld ra, 40(sp)
85638563 ; RV64I-NEXT: addi sp, sp, 48
85648564 ; RV64I-NEXT: ret
86028602 ; RV32I: # %bb.0:
86038603 ; RV32I-NEXT: addi sp, sp, -32
86048604 ; RV32I-NEXT: sw ra, 28(sp)
8605 ; RV32I-NEXT: sw s1, 24(sp)
8606 ; RV32I-NEXT: sw s2, 20(sp)
8607 ; RV32I-NEXT: sw s3, 16(sp)
8608 ; RV32I-NEXT: sw s4, 12(sp)
8609 ; RV32I-NEXT: sw s5, 8(sp)
8605 ; RV32I-NEXT: sw s0, 24(sp)
8606 ; RV32I-NEXT: sw s1, 20(sp)
8607 ; RV32I-NEXT: sw s2, 16(sp)
8608 ; RV32I-NEXT: sw s3, 12(sp)
8609 ; RV32I-NEXT: sw s4, 8(sp)
86108610 ; RV32I-NEXT: mv s2, a1
86118611 ; RV32I-NEXT: mv s4, a0
86128612 ; RV32I-NEXT: lhu a0, 0(a0)
86138613 ; RV32I-NEXT: lui a1, 16
8614 ; RV32I-NEXT: addi s1, a1, -1
8615 ; RV32I-NEXT: and s5, s2, s1
8614 ; RV32I-NEXT: addi s0, a1, -1
8615 ; RV32I-NEXT: and s1, s2, s0
86168616 ; RV32I-NEXT: addi s3, sp, 6
86178617 ; RV32I-NEXT: .LBB100_1: # %atomicrmw.start
86188618 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
8619 ; RV32I-NEXT: and a1, a0, s1
8619 ; RV32I-NEXT: and a1, a0, s0
86208620 ; RV32I-NEXT: mv a2, a0
8621 ; RV32I-NEXT: bltu s5, a1, .LBB100_3
8621 ; RV32I-NEXT: bltu s1, a1, .LBB100_3
86228622 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
86238623 ; RV32I-NEXT: # in Loop: Header=BB100_1 Depth=1
86248624 ; RV32I-NEXT: mv a2, s2
86348634 ; RV32I-NEXT: lh a0, 6(sp)
86358635 ; RV32I-NEXT: beqz a1, .LBB100_1
86368636 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
8637 ; RV32I-NEXT: lw s5, 8(sp)
8638 ; RV32I-NEXT: lw s4, 12(sp)
8639 ; RV32I-NEXT: lw s3, 16(sp)
8640 ; RV32I-NEXT: lw s2, 20(sp)
8641 ; RV32I-NEXT: lw s1, 24(sp)
8637 ; RV32I-NEXT: lw s4, 8(sp)
8638 ; RV32I-NEXT: lw s3, 12(sp)
8639 ; RV32I-NEXT: lw s2, 16(sp)
8640 ; RV32I-NEXT: lw s1, 20(sp)
8641 ; RV32I-NEXT: lw s0, 24(sp)
86428642 ; RV32I-NEXT: lw ra, 28(sp)
86438643 ; RV32I-NEXT: addi sp, sp, 32
86448644 ; RV32I-NEXT: ret
86738673 ; RV64I: # %bb.0:
86748674 ; RV64I-NEXT: addi sp, sp, -64
86758675 ; RV64I-NEXT: sd ra, 56(sp)
8676 ; RV64I-NEXT: sd s1, 48(sp)
8677 ; RV64I-NEXT: sd s2, 40(sp)
8678 ; RV64I-NEXT: sd s3, 32(sp)
8679 ; RV64I-NEXT: sd s4, 24(sp)
8680 ; RV64I-NEXT: sd s5, 16(sp)
8676 ; RV64I-NEXT: sd s0, 48(sp)
8677 ; RV64I-NEXT: sd s1, 40(sp)
8678 ; RV64I-NEXT: sd s2, 32(sp)
8679 ; RV64I-NEXT: sd s3, 24(sp)
8680 ; RV64I-NEXT: sd s4, 16(sp)
86818681 ; RV64I-NEXT: mv s2, a1
86828682 ; RV64I-NEXT: mv s4, a0
86838683 ; RV64I-NEXT: lhu a0, 0(a0)
86848684 ; RV64I-NEXT: lui a1, 16
8685 ; RV64I-NEXT: addiw s1, a1, -1
8686 ; RV64I-NEXT: and s5, s2, s1
8685 ; RV64I-NEXT: addiw s0, a1, -1
8686 ; RV64I-NEXT: and s1, s2, s0
86878687 ; RV64I-NEXT: addi s3, sp, 14
86888688 ; RV64I-NEXT: .LBB100_1: # %atomicrmw.start
86898689 ; RV64I-NEXT: # =>This Inner Loop Header: Depth=1
8690 ; RV64I-NEXT: and a1, a0, s1
8690 ; RV64I-NEXT: and a1, a0, s0
86918691 ; RV64I-NEXT: mv a2, a0
8692 ; RV64I-NEXT: bltu s5, a1, .LBB100_3
8692 ; RV64I-NEXT: bltu s1, a1, .LBB100_3
86938693 ; RV64I-NEXT: # %bb.2: # %atomicrmw.start
86948694 ; RV64I-NEXT: # in Loop: Header=BB100_1 Depth=1
86958695 ; RV64I-NEXT: mv a2, s2
87058705 ; RV64I-NEXT: lh a0, 14(sp)
87068706 ; RV64I-NEXT: beqz a1, .LBB100_1
87078707 ; RV64I-NEXT: # %bb.4: # %atomicrmw.end
8708 ; RV64I-NEXT: ld s5, 16(sp)
8709 ; RV64I-NEXT: ld s4, 24(sp)
8710 ; RV64I-NEXT: ld s3, 32(sp)
8711 ; RV64I-NEXT: ld s2, 40(sp)
8712 ; RV64I-NEXT: ld s1, 48(sp)
8708 ; RV64I-NEXT: ld s4, 16(sp)
8709 ; RV64I-NEXT: ld s3, 24(sp)
8710 ; RV64I-NEXT: ld s2, 32(sp)
8711 ; RV64I-NEXT: ld s1, 40(sp)
8712 ; RV64I-NEXT: ld s0, 48(sp)
87138713 ; RV64I-NEXT: ld ra, 56(sp)
87148714 ; RV64I-NEXT: addi sp, sp, 64
87158715 ; RV64I-NEXT: ret
87488748 ; RV32I: # %bb.0:
87498749 ; RV32I-NEXT: addi sp, sp, -32
87508750 ; RV32I-NEXT: sw ra, 28(sp)
8751 ; RV32I-NEXT: sw s1, 24(sp)
8752 ; RV32I-NEXT: sw s2, 20(sp)
8753 ; RV32I-NEXT: sw s3, 16(sp)
8754 ; RV32I-NEXT: sw s4, 12(sp)
8755 ; RV32I-NEXT: sw s5, 8(sp)
8751 ; RV32I-NEXT: sw s0, 24(sp)
8752 ; RV32I-NEXT: sw s1, 20(sp)
8753 ; RV32I-NEXT: sw s2, 16(sp)
8754 ; RV32I-NEXT: sw s3, 12(sp)
8755 ; RV32I-NEXT: sw s4, 8(sp)
87568756 ; RV32I-NEXT: mv s2, a1
87578757 ; RV32I-NEXT: mv s4, a0
87588758 ; RV32I-NEXT: lhu a0, 0(a0)
87598759 ; RV32I-NEXT: lui a1, 16
8760 ; RV32I-NEXT: addi s1, a1, -1
8761 ; RV32I-NEXT: and s5, s2, s1
8760 ; RV32I-NEXT: addi s0, a1, -1
8761 ; RV32I-NEXT: and s1, s2, s0
87628762 ; RV32I-NEXT: addi s3, sp, 6
87638763 ; RV32I-NEXT: .LBB101_1: # %atomicrmw.start
87648764 ; RV32I-NEXT: # =>This Inner Loop Header: Depth=1
8765 ; RV32I-NEXT: and a1, a0, s1
8765 ; RV32I-NEXT: and a1, a0, s0
87668766 ; RV32I-NEXT: mv a2, a0
8767 ; RV32I-NEXT: bltu s5, a1, .LBB101_3
8767 ; RV32I-NEXT: bltu s1, a1, .LBB101_3
87688768 ; RV32I-NEXT: # %bb.2: # %atomicrmw.start
87698769 ; RV32I-NEXT: # in Loop: Header=BB101_1 Depth=1
87708770 ; RV32I-NEXT: mv a2, s2
87808780 ; RV32I-NEXT: lh a0, 6(sp)
87818781 ; RV32I-NEXT: beqz a1, .LBB101_1
87828782 ; RV32I-NEXT: # %bb.4: # %atomicrmw.end
8783 ; RV32I-NEXT: lw s5, 8(sp)
8784 ; RV32I-NEXT: lw s4, 12(sp)
8785 ; RV32I-NEXT: lw s3, 16(sp)
8786 ; RV32I-NEXT: lw s2, 20(sp)
8787 ; RV32I-NEXT: lw s1, 24(sp)