16269ed24SWuXinlong; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2 26269ed24SWuXinlong; RUN: llc -mtriple=riscv32 -mattr=+zcmp -verify-machineinstrs < %s \ 36269ed24SWuXinlong; RUN: | FileCheck %s -check-prefixes=RV32IZCMP 46269ed24SWuXinlong; RUN: llc -mtriple=riscv64 -mattr=+zcmp -verify-machineinstrs < %s \ 56269ed24SWuXinlong; RUN: | FileCheck %s -check-prefixes=RV64IZCMP 66269ed24SWuXinlong; RUN: llc -mtriple=riscv32 -mattr=+zcmp,+save-restore \ 76269ed24SWuXinlong; RUN: -verify-machineinstrs < %s | FileCheck %s -check-prefixes=RV32IZCMP-SR 86269ed24SWuXinlong; RUN: llc -mtriple=riscv64 -mattr=+zcmp,+save-restore \ 96269ed24SWuXinlong; RUN: -verify-machineinstrs < %s | FileCheck %s -check-prefixes=RV64IZCMP-SR 106269ed24SWuXinlong; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \ 116269ed24SWuXinlong; RUN: | FileCheck -check-prefixes=RV32I %s 126269ed24SWuXinlong; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \ 136269ed24SWuXinlong; RUN: | FileCheck -check-prefixes=RV64I %s 146269ed24SWuXinlong 15ff9af4c4SNikita Popovdeclare void @test(ptr) 16ff9af4c4SNikita Popovdeclare void @callee_void(ptr) 17ff9af4c4SNikita Popovdeclare i32 @callee(ptr) 186269ed24SWuXinlong 196269ed24SWuXinlongdefine i32 @foo() { 206269ed24SWuXinlong; RV32IZCMP-LABEL: foo: 216269ed24SWuXinlong; RV32IZCMP: # %bb.0: 226269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra}, -64 23*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_def_cfa_offset 64 24*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_offset ra, -4 256269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, sp, -464 266269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa_offset 528 276269ed24SWuXinlong; RV32IZCMP-NEXT: mv a0, sp 28eabaee0cSFangrui Song; RV32IZCMP-NEXT: call test 296269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, sp, 464 30*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_def_cfa_offset 64 31c0221e00SWuXinlong; RV32IZCMP-NEXT: cm.popretz {ra}, 64 326269ed24SWuXinlong; 336269ed24SWuXinlong; RV64IZCMP-LABEL: foo: 346269ed24SWuXinlong; RV64IZCMP: # %bb.0: 356269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra}, -64 36*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_def_cfa_offset 64 37*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_offset ra, -8 386269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, sp, -464 396269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa_offset 528 406269ed24SWuXinlong; RV64IZCMP-NEXT: mv a0, sp 41eabaee0cSFangrui Song; RV64IZCMP-NEXT: call test 426269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, sp, 464 43*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_def_cfa_offset 64 44c0221e00SWuXinlong; RV64IZCMP-NEXT: cm.popretz {ra}, 64 456269ed24SWuXinlong; 466269ed24SWuXinlong; RV32IZCMP-SR-LABEL: foo: 476269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: 48ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.push {ra}, -64 49*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 64 50*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_offset ra, -4 51ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: addi sp, sp, -464 526269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 528 536269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv a0, sp 54eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: call test 55ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: addi sp, sp, 464 56*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 64 57ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.popretz {ra}, 64 586269ed24SWuXinlong; 596269ed24SWuXinlong; RV64IZCMP-SR-LABEL: foo: 606269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: 61ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.push {ra}, -64 62*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 64 63*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_offset ra, -8 64ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: addi sp, sp, -464 656269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 528 666269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv a0, sp 67eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: call test 68ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: addi sp, sp, 464 69*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 64 70ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.popretz {ra}, 64 716269ed24SWuXinlong; 726269ed24SWuXinlong; RV32I-LABEL: foo: 736269ed24SWuXinlong; RV32I: # %bb.0: 746269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -528 756269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa_offset 528 766269ed24SWuXinlong; RV32I-NEXT: sw ra, 524(sp) # 4-byte Folded Spill 776269ed24SWuXinlong; RV32I-NEXT: .cfi_offset ra, -4 786269ed24SWuXinlong; RV32I-NEXT: addi a0, sp, 12 79eabaee0cSFangrui Song; RV32I-NEXT: call test 806269ed24SWuXinlong; RV32I-NEXT: li a0, 0 816269ed24SWuXinlong; RV32I-NEXT: lw ra, 524(sp) # 4-byte Folded Reload 82*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore ra 836269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 528 84*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa_offset 0 856269ed24SWuXinlong; RV32I-NEXT: ret 866269ed24SWuXinlong; 876269ed24SWuXinlong; RV64I-LABEL: foo: 886269ed24SWuXinlong; RV64I: # %bb.0: 896269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -528 906269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa_offset 528 916269ed24SWuXinlong; RV64I-NEXT: sd ra, 520(sp) # 8-byte Folded Spill 926269ed24SWuXinlong; RV64I-NEXT: .cfi_offset ra, -8 936269ed24SWuXinlong; RV64I-NEXT: addi a0, sp, 8 94eabaee0cSFangrui Song; RV64I-NEXT: call test 956269ed24SWuXinlong; RV64I-NEXT: li a0, 0 966269ed24SWuXinlong; RV64I-NEXT: ld ra, 520(sp) # 8-byte Folded Reload 97*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore ra 986269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 528 99*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa_offset 0 1006269ed24SWuXinlong; RV64I-NEXT: ret 1016269ed24SWuXinlong %1 = alloca [512 x i8] 102ff9af4c4SNikita Popov %2 = getelementptr [512 x i8], ptr %1, i32 0, i32 0 103ff9af4c4SNikita Popov call void @test(ptr %2) 1046269ed24SWuXinlong ret i32 0 1056269ed24SWuXinlong} 1066269ed24SWuXinlong 1076269ed24SWuXinlongdefine i32 @pushpopret0(i32 signext %size){ 1086269ed24SWuXinlong; RV32IZCMP-LABEL: pushpopret0: 1096269ed24SWuXinlong; RV32IZCMP: # %bb.0: # %entry 1106269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra, s0}, -16 1116269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa_offset 16 112d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset ra, -8 113d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s0, -4 1146269ed24SWuXinlong; RV32IZCMP-NEXT: addi s0, sp, 16 1156269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa s0, 0 1166269ed24SWuXinlong; RV32IZCMP-NEXT: addi a0, a0, 15 1176269ed24SWuXinlong; RV32IZCMP-NEXT: andi a0, a0, -16 1186269ed24SWuXinlong; RV32IZCMP-NEXT: sub a0, sp, a0 1196269ed24SWuXinlong; RV32IZCMP-NEXT: mv sp, a0 120eabaee0cSFangrui Song; RV32IZCMP-NEXT: call callee_void 1216269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, s0, -16 122*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_def_cfa sp, 16 123c0221e00SWuXinlong; RV32IZCMP-NEXT: cm.popretz {ra, s0}, 16 1246269ed24SWuXinlong; 1256269ed24SWuXinlong; RV64IZCMP-LABEL: pushpopret0: 1266269ed24SWuXinlong; RV64IZCMP: # %bb.0: # %entry 1276269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra, s0}, -16 1286269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa_offset 16 129d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset ra, -16 130d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s0, -8 1316269ed24SWuXinlong; RV64IZCMP-NEXT: addi s0, sp, 16 1326269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa s0, 0 1336269ed24SWuXinlong; RV64IZCMP-NEXT: slli a0, a0, 32 1346269ed24SWuXinlong; RV64IZCMP-NEXT: srli a0, a0, 32 1356269ed24SWuXinlong; RV64IZCMP-NEXT: addi a0, a0, 15 1366269ed24SWuXinlong; RV64IZCMP-NEXT: andi a0, a0, -16 1376269ed24SWuXinlong; RV64IZCMP-NEXT: sub a0, sp, a0 1386269ed24SWuXinlong; RV64IZCMP-NEXT: mv sp, a0 139eabaee0cSFangrui Song; RV64IZCMP-NEXT: call callee_void 1406269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, s0, -16 141*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_def_cfa sp, 16 142c0221e00SWuXinlong; RV64IZCMP-NEXT: cm.popretz {ra, s0}, 16 1436269ed24SWuXinlong; 1446269ed24SWuXinlong; RV32IZCMP-SR-LABEL: pushpopret0: 1456269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: # %entry 146ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.push {ra, s0}, -16 1476269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 16 148ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_offset ra, -8 149ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_offset s0, -4 1506269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi s0, sp, 16 1516269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 1526269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi a0, a0, 15 1536269ed24SWuXinlong; RV32IZCMP-SR-NEXT: andi a0, a0, -16 1546269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sub a0, sp, a0 1556269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv sp, a0 156eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: call callee_void 1576269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, s0, -16 158*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_def_cfa sp, 16 159ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.popretz {ra, s0}, 16 1606269ed24SWuXinlong; 1616269ed24SWuXinlong; RV64IZCMP-SR-LABEL: pushpopret0: 1626269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: # %entry 163ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.push {ra, s0}, -16 1646269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 16 165ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_offset ra, -16 166ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_offset s0, -8 1676269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi s0, sp, 16 1686269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 1696269ed24SWuXinlong; RV64IZCMP-SR-NEXT: slli a0, a0, 32 1706269ed24SWuXinlong; RV64IZCMP-SR-NEXT: srli a0, a0, 32 1716269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi a0, a0, 15 1726269ed24SWuXinlong; RV64IZCMP-SR-NEXT: andi a0, a0, -16 1736269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sub a0, sp, a0 1746269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv sp, a0 175eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: call callee_void 1766269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, s0, -16 177*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_def_cfa sp, 16 178ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.popretz {ra, s0}, 16 1796269ed24SWuXinlong; 1806269ed24SWuXinlong; RV32I-LABEL: pushpopret0: 1816269ed24SWuXinlong; RV32I: # %bb.0: # %entry 1826269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -16 1836269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa_offset 16 1846269ed24SWuXinlong; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill 1856269ed24SWuXinlong; RV32I-NEXT: sw s0, 8(sp) # 4-byte Folded Spill 1866269ed24SWuXinlong; RV32I-NEXT: .cfi_offset ra, -4 1876269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s0, -8 1886269ed24SWuXinlong; RV32I-NEXT: addi s0, sp, 16 1896269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa s0, 0 1906269ed24SWuXinlong; RV32I-NEXT: addi a0, a0, 15 1916269ed24SWuXinlong; RV32I-NEXT: andi a0, a0, -16 1926269ed24SWuXinlong; RV32I-NEXT: sub a0, sp, a0 1936269ed24SWuXinlong; RV32I-NEXT: mv sp, a0 194eabaee0cSFangrui Song; RV32I-NEXT: call callee_void 1956269ed24SWuXinlong; RV32I-NEXT: li a0, 0 1966269ed24SWuXinlong; RV32I-NEXT: addi sp, s0, -16 197*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa sp, 16 1986269ed24SWuXinlong; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload 1996269ed24SWuXinlong; RV32I-NEXT: lw s0, 8(sp) # 4-byte Folded Reload 200*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore ra 201*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s0 2026269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 16 203*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa_offset 0 2046269ed24SWuXinlong; RV32I-NEXT: ret 2056269ed24SWuXinlong; 2066269ed24SWuXinlong; RV64I-LABEL: pushpopret0: 2076269ed24SWuXinlong; RV64I: # %bb.0: # %entry 2086269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -16 2096269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa_offset 16 2106269ed24SWuXinlong; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill 2116269ed24SWuXinlong; RV64I-NEXT: sd s0, 0(sp) # 8-byte Folded Spill 2126269ed24SWuXinlong; RV64I-NEXT: .cfi_offset ra, -8 2136269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s0, -16 2146269ed24SWuXinlong; RV64I-NEXT: addi s0, sp, 16 2156269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa s0, 0 2166269ed24SWuXinlong; RV64I-NEXT: slli a0, a0, 32 2176269ed24SWuXinlong; RV64I-NEXT: srli a0, a0, 32 2186269ed24SWuXinlong; RV64I-NEXT: addi a0, a0, 15 2196269ed24SWuXinlong; RV64I-NEXT: andi a0, a0, -16 2206269ed24SWuXinlong; RV64I-NEXT: sub a0, sp, a0 2216269ed24SWuXinlong; RV64I-NEXT: mv sp, a0 222eabaee0cSFangrui Song; RV64I-NEXT: call callee_void 2236269ed24SWuXinlong; RV64I-NEXT: li a0, 0 2246269ed24SWuXinlong; RV64I-NEXT: addi sp, s0, -16 225*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa sp, 16 2266269ed24SWuXinlong; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload 2276269ed24SWuXinlong; RV64I-NEXT: ld s0, 0(sp) # 8-byte Folded Reload 228*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore ra 229*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s0 2306269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 16 231*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa_offset 0 2326269ed24SWuXinlong; RV64I-NEXT: ret 2336269ed24SWuXinlongentry: 2346269ed24SWuXinlong %0 = alloca i8, i32 %size, align 16 235ff9af4c4SNikita Popov call void @callee_void(ptr nonnull %0) 2366269ed24SWuXinlong ret i32 0 2376269ed24SWuXinlong} 2386269ed24SWuXinlong 2396269ed24SWuXinlongdefine i32 @pushpopret1(i32 signext %size) { 2406269ed24SWuXinlong; RV32IZCMP-LABEL: pushpopret1: 2416269ed24SWuXinlong; RV32IZCMP: # %bb.0: # %entry 2426269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra, s0}, -16 2436269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa_offset 16 244d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset ra, -8 245d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s0, -4 2466269ed24SWuXinlong; RV32IZCMP-NEXT: addi s0, sp, 16 2476269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa s0, 0 2486269ed24SWuXinlong; RV32IZCMP-NEXT: addi a0, a0, 15 2496269ed24SWuXinlong; RV32IZCMP-NEXT: andi a0, a0, -16 2506269ed24SWuXinlong; RV32IZCMP-NEXT: sub a0, sp, a0 2516269ed24SWuXinlong; RV32IZCMP-NEXT: mv sp, a0 252eabaee0cSFangrui Song; RV32IZCMP-NEXT: call callee_void 2536269ed24SWuXinlong; RV32IZCMP-NEXT: li a0, 1 2546269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, s0, -16 255*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_def_cfa sp, 16 256c0221e00SWuXinlong; RV32IZCMP-NEXT: cm.popret {ra, s0}, 16 2576269ed24SWuXinlong; 2586269ed24SWuXinlong; RV64IZCMP-LABEL: pushpopret1: 2596269ed24SWuXinlong; RV64IZCMP: # %bb.0: # %entry 2606269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra, s0}, -16 2616269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa_offset 16 262d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset ra, -16 263d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s0, -8 2646269ed24SWuXinlong; RV64IZCMP-NEXT: addi s0, sp, 16 2656269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa s0, 0 2666269ed24SWuXinlong; RV64IZCMP-NEXT: slli a0, a0, 32 2676269ed24SWuXinlong; RV64IZCMP-NEXT: srli a0, a0, 32 2686269ed24SWuXinlong; RV64IZCMP-NEXT: addi a0, a0, 15 2696269ed24SWuXinlong; RV64IZCMP-NEXT: andi a0, a0, -16 2706269ed24SWuXinlong; RV64IZCMP-NEXT: sub a0, sp, a0 2716269ed24SWuXinlong; RV64IZCMP-NEXT: mv sp, a0 272eabaee0cSFangrui Song; RV64IZCMP-NEXT: call callee_void 2736269ed24SWuXinlong; RV64IZCMP-NEXT: li a0, 1 2746269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, s0, -16 275*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_def_cfa sp, 16 276c0221e00SWuXinlong; RV64IZCMP-NEXT: cm.popret {ra, s0}, 16 2776269ed24SWuXinlong; 2786269ed24SWuXinlong; RV32IZCMP-SR-LABEL: pushpopret1: 2796269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: # %entry 280ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.push {ra, s0}, -16 2816269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 16 282ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_offset ra, -8 283ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_offset s0, -4 2846269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi s0, sp, 16 2856269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 2866269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi a0, a0, 15 2876269ed24SWuXinlong; RV32IZCMP-SR-NEXT: andi a0, a0, -16 2886269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sub a0, sp, a0 2896269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv sp, a0 290eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: call callee_void 2916269ed24SWuXinlong; RV32IZCMP-SR-NEXT: li a0, 1 2926269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, s0, -16 293*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_def_cfa sp, 16 294ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.popret {ra, s0}, 16 2956269ed24SWuXinlong; 2966269ed24SWuXinlong; RV64IZCMP-SR-LABEL: pushpopret1: 2976269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: # %entry 298ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.push {ra, s0}, -16 2996269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 16 300ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_offset ra, -16 301ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_offset s0, -8 3026269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi s0, sp, 16 3036269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 3046269ed24SWuXinlong; RV64IZCMP-SR-NEXT: slli a0, a0, 32 3056269ed24SWuXinlong; RV64IZCMP-SR-NEXT: srli a0, a0, 32 3066269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi a0, a0, 15 3076269ed24SWuXinlong; RV64IZCMP-SR-NEXT: andi a0, a0, -16 3086269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sub a0, sp, a0 3096269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv sp, a0 310eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: call callee_void 3116269ed24SWuXinlong; RV64IZCMP-SR-NEXT: li a0, 1 3126269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, s0, -16 313*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_def_cfa sp, 16 314ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.popret {ra, s0}, 16 3156269ed24SWuXinlong; 3166269ed24SWuXinlong; RV32I-LABEL: pushpopret1: 3176269ed24SWuXinlong; RV32I: # %bb.0: # %entry 3186269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -16 3196269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa_offset 16 3206269ed24SWuXinlong; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill 3216269ed24SWuXinlong; RV32I-NEXT: sw s0, 8(sp) # 4-byte Folded Spill 3226269ed24SWuXinlong; RV32I-NEXT: .cfi_offset ra, -4 3236269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s0, -8 3246269ed24SWuXinlong; RV32I-NEXT: addi s0, sp, 16 3256269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa s0, 0 3266269ed24SWuXinlong; RV32I-NEXT: addi a0, a0, 15 3276269ed24SWuXinlong; RV32I-NEXT: andi a0, a0, -16 3286269ed24SWuXinlong; RV32I-NEXT: sub a0, sp, a0 3296269ed24SWuXinlong; RV32I-NEXT: mv sp, a0 330eabaee0cSFangrui Song; RV32I-NEXT: call callee_void 3316269ed24SWuXinlong; RV32I-NEXT: li a0, 1 3326269ed24SWuXinlong; RV32I-NEXT: addi sp, s0, -16 333*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa sp, 16 3346269ed24SWuXinlong; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload 3356269ed24SWuXinlong; RV32I-NEXT: lw s0, 8(sp) # 4-byte Folded Reload 336*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore ra 337*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s0 3386269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 16 339*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa_offset 0 3406269ed24SWuXinlong; RV32I-NEXT: ret 3416269ed24SWuXinlong; 3426269ed24SWuXinlong; RV64I-LABEL: pushpopret1: 3436269ed24SWuXinlong; RV64I: # %bb.0: # %entry 3446269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -16 3456269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa_offset 16 3466269ed24SWuXinlong; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill 3476269ed24SWuXinlong; RV64I-NEXT: sd s0, 0(sp) # 8-byte Folded Spill 3486269ed24SWuXinlong; RV64I-NEXT: .cfi_offset ra, -8 3496269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s0, -16 3506269ed24SWuXinlong; RV64I-NEXT: addi s0, sp, 16 3516269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa s0, 0 3526269ed24SWuXinlong; RV64I-NEXT: slli a0, a0, 32 3536269ed24SWuXinlong; RV64I-NEXT: srli a0, a0, 32 3546269ed24SWuXinlong; RV64I-NEXT: addi a0, a0, 15 3556269ed24SWuXinlong; RV64I-NEXT: andi a0, a0, -16 3566269ed24SWuXinlong; RV64I-NEXT: sub a0, sp, a0 3576269ed24SWuXinlong; RV64I-NEXT: mv sp, a0 358eabaee0cSFangrui Song; RV64I-NEXT: call callee_void 3596269ed24SWuXinlong; RV64I-NEXT: li a0, 1 3606269ed24SWuXinlong; RV64I-NEXT: addi sp, s0, -16 361*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa sp, 16 3626269ed24SWuXinlong; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload 3636269ed24SWuXinlong; RV64I-NEXT: ld s0, 0(sp) # 8-byte Folded Reload 364*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore ra 365*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s0 3666269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 16 367*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa_offset 0 3686269ed24SWuXinlong; RV64I-NEXT: ret 3696269ed24SWuXinlongentry: 3706269ed24SWuXinlong %0 = alloca i8, i32 %size, align 16 371ff9af4c4SNikita Popov call void @callee_void(ptr nonnull %0) 3726269ed24SWuXinlong ret i32 1 3736269ed24SWuXinlong} 3746269ed24SWuXinlong 3756269ed24SWuXinlongdefine i32 @pushpopretneg1(i32 signext %size) { 3766269ed24SWuXinlong; RV32IZCMP-LABEL: pushpopretneg1: 3776269ed24SWuXinlong; RV32IZCMP: # %bb.0: # %entry 3786269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra, s0}, -16 3796269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa_offset 16 380d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset ra, -8 381d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s0, -4 3826269ed24SWuXinlong; RV32IZCMP-NEXT: addi s0, sp, 16 3836269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa s0, 0 3846269ed24SWuXinlong; RV32IZCMP-NEXT: addi a0, a0, 15 3856269ed24SWuXinlong; RV32IZCMP-NEXT: andi a0, a0, -16 3866269ed24SWuXinlong; RV32IZCMP-NEXT: sub a0, sp, a0 3876269ed24SWuXinlong; RV32IZCMP-NEXT: mv sp, a0 388eabaee0cSFangrui Song; RV32IZCMP-NEXT: call callee_void 3896269ed24SWuXinlong; RV32IZCMP-NEXT: li a0, -1 3906269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, s0, -16 391*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_def_cfa sp, 16 392c0221e00SWuXinlong; RV32IZCMP-NEXT: cm.popret {ra, s0}, 16 3936269ed24SWuXinlong; 3946269ed24SWuXinlong; RV64IZCMP-LABEL: pushpopretneg1: 3956269ed24SWuXinlong; RV64IZCMP: # %bb.0: # %entry 3966269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra, s0}, -16 3976269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa_offset 16 398d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset ra, -16 399d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s0, -8 4006269ed24SWuXinlong; RV64IZCMP-NEXT: addi s0, sp, 16 4016269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa s0, 0 4026269ed24SWuXinlong; RV64IZCMP-NEXT: slli a0, a0, 32 4036269ed24SWuXinlong; RV64IZCMP-NEXT: srli a0, a0, 32 4046269ed24SWuXinlong; RV64IZCMP-NEXT: addi a0, a0, 15 4056269ed24SWuXinlong; RV64IZCMP-NEXT: andi a0, a0, -16 4066269ed24SWuXinlong; RV64IZCMP-NEXT: sub a0, sp, a0 4076269ed24SWuXinlong; RV64IZCMP-NEXT: mv sp, a0 408eabaee0cSFangrui Song; RV64IZCMP-NEXT: call callee_void 4096269ed24SWuXinlong; RV64IZCMP-NEXT: li a0, -1 4106269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, s0, -16 411*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_def_cfa sp, 16 412c0221e00SWuXinlong; RV64IZCMP-NEXT: cm.popret {ra, s0}, 16 4136269ed24SWuXinlong; 4146269ed24SWuXinlong; RV32IZCMP-SR-LABEL: pushpopretneg1: 4156269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: # %entry 416ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.push {ra, s0}, -16 4176269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 16 418ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_offset ra, -8 419ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_offset s0, -4 4206269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi s0, sp, 16 4216269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 4226269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi a0, a0, 15 4236269ed24SWuXinlong; RV32IZCMP-SR-NEXT: andi a0, a0, -16 4246269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sub a0, sp, a0 4256269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv sp, a0 426eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: call callee_void 4276269ed24SWuXinlong; RV32IZCMP-SR-NEXT: li a0, -1 4286269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, s0, -16 429*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_def_cfa sp, 16 430ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.popret {ra, s0}, 16 4316269ed24SWuXinlong; 4326269ed24SWuXinlong; RV64IZCMP-SR-LABEL: pushpopretneg1: 4336269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: # %entry 434ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.push {ra, s0}, -16 4356269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 16 436ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_offset ra, -16 437ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_offset s0, -8 4386269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi s0, sp, 16 4396269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 4406269ed24SWuXinlong; RV64IZCMP-SR-NEXT: slli a0, a0, 32 4416269ed24SWuXinlong; RV64IZCMP-SR-NEXT: srli a0, a0, 32 4426269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi a0, a0, 15 4436269ed24SWuXinlong; RV64IZCMP-SR-NEXT: andi a0, a0, -16 4446269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sub a0, sp, a0 4456269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv sp, a0 446eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: call callee_void 4476269ed24SWuXinlong; RV64IZCMP-SR-NEXT: li a0, -1 4486269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, s0, -16 449*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_def_cfa sp, 16 450ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.popret {ra, s0}, 16 4516269ed24SWuXinlong; 4526269ed24SWuXinlong; RV32I-LABEL: pushpopretneg1: 4536269ed24SWuXinlong; RV32I: # %bb.0: # %entry 4546269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -16 4556269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa_offset 16 4566269ed24SWuXinlong; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill 4576269ed24SWuXinlong; RV32I-NEXT: sw s0, 8(sp) # 4-byte Folded Spill 4586269ed24SWuXinlong; RV32I-NEXT: .cfi_offset ra, -4 4596269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s0, -8 4606269ed24SWuXinlong; RV32I-NEXT: addi s0, sp, 16 4616269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa s0, 0 4626269ed24SWuXinlong; RV32I-NEXT: addi a0, a0, 15 4636269ed24SWuXinlong; RV32I-NEXT: andi a0, a0, -16 4646269ed24SWuXinlong; RV32I-NEXT: sub a0, sp, a0 4656269ed24SWuXinlong; RV32I-NEXT: mv sp, a0 466eabaee0cSFangrui Song; RV32I-NEXT: call callee_void 4676269ed24SWuXinlong; RV32I-NEXT: li a0, -1 4686269ed24SWuXinlong; RV32I-NEXT: addi sp, s0, -16 469*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa sp, 16 4706269ed24SWuXinlong; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload 4716269ed24SWuXinlong; RV32I-NEXT: lw s0, 8(sp) # 4-byte Folded Reload 472*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore ra 473*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s0 4746269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 16 475*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa_offset 0 4766269ed24SWuXinlong; RV32I-NEXT: ret 4776269ed24SWuXinlong; 4786269ed24SWuXinlong; RV64I-LABEL: pushpopretneg1: 4796269ed24SWuXinlong; RV64I: # %bb.0: # %entry 4806269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -16 4816269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa_offset 16 4826269ed24SWuXinlong; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill 4836269ed24SWuXinlong; RV64I-NEXT: sd s0, 0(sp) # 8-byte Folded Spill 4846269ed24SWuXinlong; RV64I-NEXT: .cfi_offset ra, -8 4856269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s0, -16 4866269ed24SWuXinlong; RV64I-NEXT: addi s0, sp, 16 4876269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa s0, 0 4886269ed24SWuXinlong; RV64I-NEXT: slli a0, a0, 32 4896269ed24SWuXinlong; RV64I-NEXT: srli a0, a0, 32 4906269ed24SWuXinlong; RV64I-NEXT: addi a0, a0, 15 4916269ed24SWuXinlong; RV64I-NEXT: andi a0, a0, -16 4926269ed24SWuXinlong; RV64I-NEXT: sub a0, sp, a0 4936269ed24SWuXinlong; RV64I-NEXT: mv sp, a0 494eabaee0cSFangrui Song; RV64I-NEXT: call callee_void 4956269ed24SWuXinlong; RV64I-NEXT: li a0, -1 4966269ed24SWuXinlong; RV64I-NEXT: addi sp, s0, -16 497*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa sp, 16 4986269ed24SWuXinlong; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload 4996269ed24SWuXinlong; RV64I-NEXT: ld s0, 0(sp) # 8-byte Folded Reload 500*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore ra 501*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s0 5026269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 16 503*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa_offset 0 5046269ed24SWuXinlong; RV64I-NEXT: ret 5056269ed24SWuXinlongentry: 5066269ed24SWuXinlong %0 = alloca i8, i32 %size, align 16 507ff9af4c4SNikita Popov call void @callee_void(ptr nonnull %0) 5086269ed24SWuXinlong ret i32 -1 5096269ed24SWuXinlong} 5106269ed24SWuXinlong 5116269ed24SWuXinlongdefine i32 @pushpopret2(i32 signext %size) { 5126269ed24SWuXinlong; RV32IZCMP-LABEL: pushpopret2: 5136269ed24SWuXinlong; RV32IZCMP: # %bb.0: # %entry 5146269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra, s0}, -16 5156269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa_offset 16 516d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset ra, -8 517d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s0, -4 5186269ed24SWuXinlong; RV32IZCMP-NEXT: addi s0, sp, 16 5196269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa s0, 0 5206269ed24SWuXinlong; RV32IZCMP-NEXT: addi a0, a0, 15 5216269ed24SWuXinlong; RV32IZCMP-NEXT: andi a0, a0, -16 5226269ed24SWuXinlong; RV32IZCMP-NEXT: sub a0, sp, a0 5236269ed24SWuXinlong; RV32IZCMP-NEXT: mv sp, a0 524eabaee0cSFangrui Song; RV32IZCMP-NEXT: call callee_void 5256269ed24SWuXinlong; RV32IZCMP-NEXT: li a0, 2 5266269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, s0, -16 527*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_def_cfa sp, 16 528c0221e00SWuXinlong; RV32IZCMP-NEXT: cm.popret {ra, s0}, 16 5296269ed24SWuXinlong; 5306269ed24SWuXinlong; RV64IZCMP-LABEL: pushpopret2: 5316269ed24SWuXinlong; RV64IZCMP: # %bb.0: # %entry 5326269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra, s0}, -16 5336269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa_offset 16 534d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset ra, -16 535d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s0, -8 5366269ed24SWuXinlong; RV64IZCMP-NEXT: addi s0, sp, 16 5376269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa s0, 0 5386269ed24SWuXinlong; RV64IZCMP-NEXT: slli a0, a0, 32 5396269ed24SWuXinlong; RV64IZCMP-NEXT: srli a0, a0, 32 5406269ed24SWuXinlong; RV64IZCMP-NEXT: addi a0, a0, 15 5416269ed24SWuXinlong; RV64IZCMP-NEXT: andi a0, a0, -16 5426269ed24SWuXinlong; RV64IZCMP-NEXT: sub a0, sp, a0 5436269ed24SWuXinlong; RV64IZCMP-NEXT: mv sp, a0 544eabaee0cSFangrui Song; RV64IZCMP-NEXT: call callee_void 5456269ed24SWuXinlong; RV64IZCMP-NEXT: li a0, 2 5466269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, s0, -16 547*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_def_cfa sp, 16 548c0221e00SWuXinlong; RV64IZCMP-NEXT: cm.popret {ra, s0}, 16 5496269ed24SWuXinlong; 5506269ed24SWuXinlong; RV32IZCMP-SR-LABEL: pushpopret2: 5516269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: # %entry 552ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.push {ra, s0}, -16 5536269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 16 554ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_offset ra, -8 555ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_offset s0, -4 5566269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi s0, sp, 16 5576269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 5586269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi a0, a0, 15 5596269ed24SWuXinlong; RV32IZCMP-SR-NEXT: andi a0, a0, -16 5606269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sub a0, sp, a0 5616269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv sp, a0 562eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: call callee_void 5636269ed24SWuXinlong; RV32IZCMP-SR-NEXT: li a0, 2 5646269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, s0, -16 565*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_def_cfa sp, 16 566ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.popret {ra, s0}, 16 5676269ed24SWuXinlong; 5686269ed24SWuXinlong; RV64IZCMP-SR-LABEL: pushpopret2: 5696269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: # %entry 570ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.push {ra, s0}, -16 5716269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 16 572ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_offset ra, -16 573ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_offset s0, -8 5746269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi s0, sp, 16 5756269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 5766269ed24SWuXinlong; RV64IZCMP-SR-NEXT: slli a0, a0, 32 5776269ed24SWuXinlong; RV64IZCMP-SR-NEXT: srli a0, a0, 32 5786269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi a0, a0, 15 5796269ed24SWuXinlong; RV64IZCMP-SR-NEXT: andi a0, a0, -16 5806269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sub a0, sp, a0 5816269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv sp, a0 582eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: call callee_void 5836269ed24SWuXinlong; RV64IZCMP-SR-NEXT: li a0, 2 5846269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, s0, -16 585*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_def_cfa sp, 16 586ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.popret {ra, s0}, 16 5876269ed24SWuXinlong; 5886269ed24SWuXinlong; RV32I-LABEL: pushpopret2: 5896269ed24SWuXinlong; RV32I: # %bb.0: # %entry 5906269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -16 5916269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa_offset 16 5926269ed24SWuXinlong; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill 5936269ed24SWuXinlong; RV32I-NEXT: sw s0, 8(sp) # 4-byte Folded Spill 5946269ed24SWuXinlong; RV32I-NEXT: .cfi_offset ra, -4 5956269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s0, -8 5966269ed24SWuXinlong; RV32I-NEXT: addi s0, sp, 16 5976269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa s0, 0 5986269ed24SWuXinlong; RV32I-NEXT: addi a0, a0, 15 5996269ed24SWuXinlong; RV32I-NEXT: andi a0, a0, -16 6006269ed24SWuXinlong; RV32I-NEXT: sub a0, sp, a0 6016269ed24SWuXinlong; RV32I-NEXT: mv sp, a0 602eabaee0cSFangrui Song; RV32I-NEXT: call callee_void 6036269ed24SWuXinlong; RV32I-NEXT: li a0, 2 6046269ed24SWuXinlong; RV32I-NEXT: addi sp, s0, -16 605*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa sp, 16 6066269ed24SWuXinlong; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload 6076269ed24SWuXinlong; RV32I-NEXT: lw s0, 8(sp) # 4-byte Folded Reload 608*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore ra 609*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s0 6106269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 16 611*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa_offset 0 6126269ed24SWuXinlong; RV32I-NEXT: ret 6136269ed24SWuXinlong; 6146269ed24SWuXinlong; RV64I-LABEL: pushpopret2: 6156269ed24SWuXinlong; RV64I: # %bb.0: # %entry 6166269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -16 6176269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa_offset 16 6186269ed24SWuXinlong; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill 6196269ed24SWuXinlong; RV64I-NEXT: sd s0, 0(sp) # 8-byte Folded Spill 6206269ed24SWuXinlong; RV64I-NEXT: .cfi_offset ra, -8 6216269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s0, -16 6226269ed24SWuXinlong; RV64I-NEXT: addi s0, sp, 16 6236269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa s0, 0 6246269ed24SWuXinlong; RV64I-NEXT: slli a0, a0, 32 6256269ed24SWuXinlong; RV64I-NEXT: srli a0, a0, 32 6266269ed24SWuXinlong; RV64I-NEXT: addi a0, a0, 15 6276269ed24SWuXinlong; RV64I-NEXT: andi a0, a0, -16 6286269ed24SWuXinlong; RV64I-NEXT: sub a0, sp, a0 6296269ed24SWuXinlong; RV64I-NEXT: mv sp, a0 630eabaee0cSFangrui Song; RV64I-NEXT: call callee_void 6316269ed24SWuXinlong; RV64I-NEXT: li a0, 2 6326269ed24SWuXinlong; RV64I-NEXT: addi sp, s0, -16 633*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa sp, 16 6346269ed24SWuXinlong; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload 6356269ed24SWuXinlong; RV64I-NEXT: ld s0, 0(sp) # 8-byte Folded Reload 636*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore ra 637*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s0 6386269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 16 639*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa_offset 0 6406269ed24SWuXinlong; RV64I-NEXT: ret 6416269ed24SWuXinlongentry: 6426269ed24SWuXinlong %0 = alloca i8, i32 %size, align 16 643ff9af4c4SNikita Popov call void @callee_void(ptr nonnull %0) 6446269ed24SWuXinlong ret i32 2 6456269ed24SWuXinlong} 6466269ed24SWuXinlong 6476269ed24SWuXinlongdefine dso_local i32 @tailcall(i32 signext %size) local_unnamed_addr #0 { 6486269ed24SWuXinlong; RV32IZCMP-LABEL: tailcall: 6496269ed24SWuXinlong; RV32IZCMP: # %bb.0: # %entry 6506269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra, s0}, -16 6516269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa_offset 16 652d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset ra, -8 653d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s0, -4 6546269ed24SWuXinlong; RV32IZCMP-NEXT: addi s0, sp, 16 6556269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa s0, 0 6566269ed24SWuXinlong; RV32IZCMP-NEXT: addi a0, a0, 15 6576269ed24SWuXinlong; RV32IZCMP-NEXT: andi a0, a0, -16 6586269ed24SWuXinlong; RV32IZCMP-NEXT: sub a0, sp, a0 6596269ed24SWuXinlong; RV32IZCMP-NEXT: mv sp, a0 6606269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, s0, -16 661*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_def_cfa sp, 16 6626269ed24SWuXinlong; RV32IZCMP-NEXT: cm.pop {ra, s0}, 16 663*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore ra 664*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore s0 665*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_def_cfa_offset 0 666eabaee0cSFangrui Song; RV32IZCMP-NEXT: tail callee 6676269ed24SWuXinlong; 6686269ed24SWuXinlong; RV64IZCMP-LABEL: tailcall: 6696269ed24SWuXinlong; RV64IZCMP: # %bb.0: # %entry 6706269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra, s0}, -16 6716269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa_offset 16 672d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset ra, -16 673d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s0, -8 6746269ed24SWuXinlong; RV64IZCMP-NEXT: addi s0, sp, 16 6756269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa s0, 0 6766269ed24SWuXinlong; RV64IZCMP-NEXT: slli a0, a0, 32 6776269ed24SWuXinlong; RV64IZCMP-NEXT: srli a0, a0, 32 6786269ed24SWuXinlong; RV64IZCMP-NEXT: addi a0, a0, 15 6796269ed24SWuXinlong; RV64IZCMP-NEXT: andi a0, a0, -16 6806269ed24SWuXinlong; RV64IZCMP-NEXT: sub a0, sp, a0 6816269ed24SWuXinlong; RV64IZCMP-NEXT: mv sp, a0 6826269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, s0, -16 683*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_def_cfa sp, 16 6846269ed24SWuXinlong; RV64IZCMP-NEXT: cm.pop {ra, s0}, 16 685*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore ra 686*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore s0 687*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_def_cfa_offset 0 688eabaee0cSFangrui Song; RV64IZCMP-NEXT: tail callee 6896269ed24SWuXinlong; 6906269ed24SWuXinlong; RV32IZCMP-SR-LABEL: tailcall: 6916269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: # %entry 6926269ed24SWuXinlong; RV32IZCMP-SR-NEXT: cm.push {ra, s0}, -16 6936269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 16 694d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset ra, -8 695d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset s0, -4 6966269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi s0, sp, 16 6976269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 6986269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi a0, a0, 15 6996269ed24SWuXinlong; RV32IZCMP-SR-NEXT: andi a0, a0, -16 7006269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sub a0, sp, a0 7016269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv sp, a0 7026269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, s0, -16 703*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_def_cfa sp, 16 7046269ed24SWuXinlong; RV32IZCMP-SR-NEXT: cm.pop {ra, s0}, 16 705*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore ra 706*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore s0 707*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 0 708eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: tail callee 7096269ed24SWuXinlong; 7106269ed24SWuXinlong; RV64IZCMP-SR-LABEL: tailcall: 7116269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: # %entry 7126269ed24SWuXinlong; RV64IZCMP-SR-NEXT: cm.push {ra, s0}, -16 7136269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 16 714d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset ra, -16 715d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset s0, -8 7166269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi s0, sp, 16 7176269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 7186269ed24SWuXinlong; RV64IZCMP-SR-NEXT: slli a0, a0, 32 7196269ed24SWuXinlong; RV64IZCMP-SR-NEXT: srli a0, a0, 32 7206269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi a0, a0, 15 7216269ed24SWuXinlong; RV64IZCMP-SR-NEXT: andi a0, a0, -16 7226269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sub a0, sp, a0 7236269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv sp, a0 7246269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, s0, -16 725*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_def_cfa sp, 16 7266269ed24SWuXinlong; RV64IZCMP-SR-NEXT: cm.pop {ra, s0}, 16 727*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore ra 728*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore s0 729*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 0 730eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: tail callee 7316269ed24SWuXinlong; 7326269ed24SWuXinlong; RV32I-LABEL: tailcall: 7336269ed24SWuXinlong; RV32I: # %bb.0: # %entry 7346269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -16 7356269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa_offset 16 7366269ed24SWuXinlong; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill 7376269ed24SWuXinlong; RV32I-NEXT: sw s0, 8(sp) # 4-byte Folded Spill 7386269ed24SWuXinlong; RV32I-NEXT: .cfi_offset ra, -4 7396269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s0, -8 7406269ed24SWuXinlong; RV32I-NEXT: addi s0, sp, 16 7416269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa s0, 0 7426269ed24SWuXinlong; RV32I-NEXT: addi a0, a0, 15 7436269ed24SWuXinlong; RV32I-NEXT: andi a0, a0, -16 7446269ed24SWuXinlong; RV32I-NEXT: sub a0, sp, a0 7456269ed24SWuXinlong; RV32I-NEXT: mv sp, a0 7466269ed24SWuXinlong; RV32I-NEXT: addi sp, s0, -16 747*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa sp, 16 7486269ed24SWuXinlong; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload 7496269ed24SWuXinlong; RV32I-NEXT: lw s0, 8(sp) # 4-byte Folded Reload 750*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore ra 751*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s0 7526269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 16 753*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa_offset 0 754eabaee0cSFangrui Song; RV32I-NEXT: tail callee 7556269ed24SWuXinlong; 7566269ed24SWuXinlong; RV64I-LABEL: tailcall: 7576269ed24SWuXinlong; RV64I: # %bb.0: # %entry 7586269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -16 7596269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa_offset 16 7606269ed24SWuXinlong; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill 7616269ed24SWuXinlong; RV64I-NEXT: sd s0, 0(sp) # 8-byte Folded Spill 7626269ed24SWuXinlong; RV64I-NEXT: .cfi_offset ra, -8 7636269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s0, -16 7646269ed24SWuXinlong; RV64I-NEXT: addi s0, sp, 16 7656269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa s0, 0 7666269ed24SWuXinlong; RV64I-NEXT: slli a0, a0, 32 7676269ed24SWuXinlong; RV64I-NEXT: srli a0, a0, 32 7686269ed24SWuXinlong; RV64I-NEXT: addi a0, a0, 15 7696269ed24SWuXinlong; RV64I-NEXT: andi a0, a0, -16 7706269ed24SWuXinlong; RV64I-NEXT: sub a0, sp, a0 7716269ed24SWuXinlong; RV64I-NEXT: mv sp, a0 7726269ed24SWuXinlong; RV64I-NEXT: addi sp, s0, -16 773*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa sp, 16 7746269ed24SWuXinlong; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload 7756269ed24SWuXinlong; RV64I-NEXT: ld s0, 0(sp) # 8-byte Folded Reload 776*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore ra 777*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s0 7786269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 16 779*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa_offset 0 780eabaee0cSFangrui Song; RV64I-NEXT: tail callee 7816269ed24SWuXinlongentry: 7826269ed24SWuXinlong %0 = alloca i8, i32 %size, align 16 783ff9af4c4SNikita Popov %1 = tail call i32 @callee(ptr nonnull %0) 7846269ed24SWuXinlong ret i32 %1 7856269ed24SWuXinlong} 7866269ed24SWuXinlong 7876269ed24SWuXinlong@var = global [5 x i32] zeroinitializer 7886269ed24SWuXinlongdefine i32 @nocompress(i32 signext %size) { 7896269ed24SWuXinlong; RV32IZCMP-LABEL: nocompress: 7906269ed24SWuXinlong; RV32IZCMP: # %bb.0: # %entry 7916269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra, s0-s8}, -48 7926269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa_offset 48 793d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset ra, -40 794d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s0, -36 795d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s1, -32 796d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s2, -28 797d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s3, -24 798d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s4, -20 799d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s5, -16 800d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s6, -12 801d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s7, -8 802d6a48a34SJim Lin; RV32IZCMP-NEXT: .cfi_offset s8, -4 8036269ed24SWuXinlong; RV32IZCMP-NEXT: addi s0, sp, 48 8046269ed24SWuXinlong; RV32IZCMP-NEXT: .cfi_def_cfa s0, 0 8056269ed24SWuXinlong; RV32IZCMP-NEXT: addi a0, a0, 15 8066269ed24SWuXinlong; RV32IZCMP-NEXT: andi a0, a0, -16 8076269ed24SWuXinlong; RV32IZCMP-NEXT: sub s2, sp, a0 8086269ed24SWuXinlong; RV32IZCMP-NEXT: mv sp, s2 8096269ed24SWuXinlong; RV32IZCMP-NEXT: lui s1, %hi(var) 8106269ed24SWuXinlong; RV32IZCMP-NEXT: lw s3, %lo(var)(s1) 8116269ed24SWuXinlong; RV32IZCMP-NEXT: lw s4, %lo(var+4)(s1) 8126269ed24SWuXinlong; RV32IZCMP-NEXT: lw s5, %lo(var+8)(s1) 8136269ed24SWuXinlong; RV32IZCMP-NEXT: lw s6, %lo(var+12)(s1) 8146269ed24SWuXinlong; RV32IZCMP-NEXT: addi s7, s1, %lo(var) 8156269ed24SWuXinlong; RV32IZCMP-NEXT: lw s8, 16(s7) 8166269ed24SWuXinlong; RV32IZCMP-NEXT: mv a0, s2 817eabaee0cSFangrui Song; RV32IZCMP-NEXT: call callee_void 8186269ed24SWuXinlong; RV32IZCMP-NEXT: sw s8, 16(s7) 8196269ed24SWuXinlong; RV32IZCMP-NEXT: sw s6, %lo(var+12)(s1) 8206269ed24SWuXinlong; RV32IZCMP-NEXT: sw s5, %lo(var+8)(s1) 8216269ed24SWuXinlong; RV32IZCMP-NEXT: sw s4, %lo(var+4)(s1) 8226269ed24SWuXinlong; RV32IZCMP-NEXT: sw s3, %lo(var)(s1) 8236269ed24SWuXinlong; RV32IZCMP-NEXT: mv a0, s2 8246269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, s0, -48 825*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_def_cfa sp, 48 8266269ed24SWuXinlong; RV32IZCMP-NEXT: cm.pop {ra, s0-s8}, 48 827*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore ra 828*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore s0 829*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore s1 830*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore s2 831*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore s3 832*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore s4 833*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore s5 834*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore s6 835*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore s7 836*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_restore s8 837*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_def_cfa_offset 0 838eabaee0cSFangrui Song; RV32IZCMP-NEXT: tail callee 8396269ed24SWuXinlong; 8406269ed24SWuXinlong; RV64IZCMP-LABEL: nocompress: 8416269ed24SWuXinlong; RV64IZCMP: # %bb.0: # %entry 8426269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra, s0-s8}, -80 8436269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa_offset 80 844d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset ra, -80 845d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s0, -72 846d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s1, -64 847d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s2, -56 848d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s3, -48 849d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s4, -40 850d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s5, -32 851d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s6, -24 852d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s7, -16 853d6a48a34SJim Lin; RV64IZCMP-NEXT: .cfi_offset s8, -8 8546269ed24SWuXinlong; RV64IZCMP-NEXT: addi s0, sp, 80 8556269ed24SWuXinlong; RV64IZCMP-NEXT: .cfi_def_cfa s0, 0 8566269ed24SWuXinlong; RV64IZCMP-NEXT: slli a0, a0, 32 8576269ed24SWuXinlong; RV64IZCMP-NEXT: srli a0, a0, 32 8586269ed24SWuXinlong; RV64IZCMP-NEXT: addi a0, a0, 15 8596269ed24SWuXinlong; RV64IZCMP-NEXT: andi a0, a0, -16 8606269ed24SWuXinlong; RV64IZCMP-NEXT: sub s2, sp, a0 8616269ed24SWuXinlong; RV64IZCMP-NEXT: mv sp, s2 8626269ed24SWuXinlong; RV64IZCMP-NEXT: lui s1, %hi(var) 8636269ed24SWuXinlong; RV64IZCMP-NEXT: lw s3, %lo(var)(s1) 8646269ed24SWuXinlong; RV64IZCMP-NEXT: lw s4, %lo(var+4)(s1) 8656269ed24SWuXinlong; RV64IZCMP-NEXT: lw s5, %lo(var+8)(s1) 8666269ed24SWuXinlong; RV64IZCMP-NEXT: lw s6, %lo(var+12)(s1) 8676269ed24SWuXinlong; RV64IZCMP-NEXT: addi s7, s1, %lo(var) 8686269ed24SWuXinlong; RV64IZCMP-NEXT: lw s8, 16(s7) 8696269ed24SWuXinlong; RV64IZCMP-NEXT: mv a0, s2 870eabaee0cSFangrui Song; RV64IZCMP-NEXT: call callee_void 8716269ed24SWuXinlong; RV64IZCMP-NEXT: sw s8, 16(s7) 8726269ed24SWuXinlong; RV64IZCMP-NEXT: sw s6, %lo(var+12)(s1) 8736269ed24SWuXinlong; RV64IZCMP-NEXT: sw s5, %lo(var+8)(s1) 8746269ed24SWuXinlong; RV64IZCMP-NEXT: sw s4, %lo(var+4)(s1) 8756269ed24SWuXinlong; RV64IZCMP-NEXT: sw s3, %lo(var)(s1) 8766269ed24SWuXinlong; RV64IZCMP-NEXT: mv a0, s2 8776269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, s0, -80 878*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_def_cfa sp, 80 8796269ed24SWuXinlong; RV64IZCMP-NEXT: cm.pop {ra, s0-s8}, 80 880*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore ra 881*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore s0 882*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore s1 883*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore s2 884*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore s3 885*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore s4 886*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore s5 887*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore s6 888*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore s7 889*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_restore s8 890*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_def_cfa_offset 0 891eabaee0cSFangrui Song; RV64IZCMP-NEXT: tail callee 8926269ed24SWuXinlong; 8936269ed24SWuXinlong; RV32IZCMP-SR-LABEL: nocompress: 8946269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: # %entry 8956269ed24SWuXinlong; RV32IZCMP-SR-NEXT: cm.push {ra, s0-s8}, -48 8966269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 48 897d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset ra, -40 898d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset s0, -36 899d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset s1, -32 900d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset s2, -28 901d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset s3, -24 902d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset s4, -20 903d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset s5, -16 904d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset s6, -12 905d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset s7, -8 906d6a48a34SJim Lin; RV32IZCMP-SR-NEXT: .cfi_offset s8, -4 9076269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi s0, sp, 48 9086269ed24SWuXinlong; RV32IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 9096269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi a0, a0, 15 9106269ed24SWuXinlong; RV32IZCMP-SR-NEXT: andi a0, a0, -16 9116269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sub s2, sp, a0 9126269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv sp, s2 9136269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lui s1, %hi(var) 9146269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s3, %lo(var)(s1) 9156269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s4, %lo(var+4)(s1) 9166269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s5, %lo(var+8)(s1) 9176269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s6, %lo(var+12)(s1) 9186269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi s7, s1, %lo(var) 9196269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s8, 16(s7) 9206269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv a0, s2 921eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: call callee_void 9226269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s8, 16(s7) 9236269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s6, %lo(var+12)(s1) 9246269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s5, %lo(var+8)(s1) 9256269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s4, %lo(var+4)(s1) 9266269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s3, %lo(var)(s1) 9276269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv a0, s2 9286269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, s0, -48 929*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_def_cfa sp, 48 9306269ed24SWuXinlong; RV32IZCMP-SR-NEXT: cm.pop {ra, s0-s8}, 48 931*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore ra 932*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore s0 933*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore s1 934*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore s2 935*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore s3 936*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore s4 937*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore s5 938*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore s6 939*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore s7 940*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_restore s8 941*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 0 942eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: tail callee 9436269ed24SWuXinlong; 9446269ed24SWuXinlong; RV64IZCMP-SR-LABEL: nocompress: 9456269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: # %entry 9466269ed24SWuXinlong; RV64IZCMP-SR-NEXT: cm.push {ra, s0-s8}, -80 9476269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 80 948d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset ra, -80 949d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset s0, -72 950d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset s1, -64 951d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset s2, -56 952d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset s3, -48 953d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset s4, -40 954d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset s5, -32 955d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset s6, -24 956d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset s7, -16 957d6a48a34SJim Lin; RV64IZCMP-SR-NEXT: .cfi_offset s8, -8 9586269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi s0, sp, 80 9596269ed24SWuXinlong; RV64IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 9606269ed24SWuXinlong; RV64IZCMP-SR-NEXT: slli a0, a0, 32 9616269ed24SWuXinlong; RV64IZCMP-SR-NEXT: srli a0, a0, 32 9626269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi a0, a0, 15 9636269ed24SWuXinlong; RV64IZCMP-SR-NEXT: andi a0, a0, -16 9646269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sub s2, sp, a0 9656269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv sp, s2 9666269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lui s1, %hi(var) 9676269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s3, %lo(var)(s1) 9686269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s4, %lo(var+4)(s1) 9696269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s5, %lo(var+8)(s1) 9706269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s6, %lo(var+12)(s1) 9716269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi s7, s1, %lo(var) 9726269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s8, 16(s7) 9736269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv a0, s2 974eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: call callee_void 9756269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s8, 16(s7) 9766269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s6, %lo(var+12)(s1) 9776269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s5, %lo(var+8)(s1) 9786269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s4, %lo(var+4)(s1) 9796269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s3, %lo(var)(s1) 9806269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv a0, s2 9816269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, s0, -80 982*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_def_cfa sp, 80 9836269ed24SWuXinlong; RV64IZCMP-SR-NEXT: cm.pop {ra, s0-s8}, 80 984*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore ra 985*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore s0 986*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore s1 987*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore s2 988*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore s3 989*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore s4 990*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore s5 991*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore s6 992*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore s7 993*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_restore s8 994*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 0 995eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: tail callee 9966269ed24SWuXinlong; 9976269ed24SWuXinlong; RV32I-LABEL: nocompress: 9986269ed24SWuXinlong; RV32I: # %bb.0: # %entry 9996269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -48 10006269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa_offset 48 10016269ed24SWuXinlong; RV32I-NEXT: sw ra, 44(sp) # 4-byte Folded Spill 10026269ed24SWuXinlong; RV32I-NEXT: sw s0, 40(sp) # 4-byte Folded Spill 10036269ed24SWuXinlong; RV32I-NEXT: sw s1, 36(sp) # 4-byte Folded Spill 10046269ed24SWuXinlong; RV32I-NEXT: sw s2, 32(sp) # 4-byte Folded Spill 10056269ed24SWuXinlong; RV32I-NEXT: sw s3, 28(sp) # 4-byte Folded Spill 10066269ed24SWuXinlong; RV32I-NEXT: sw s4, 24(sp) # 4-byte Folded Spill 10076269ed24SWuXinlong; RV32I-NEXT: sw s5, 20(sp) # 4-byte Folded Spill 10086269ed24SWuXinlong; RV32I-NEXT: sw s6, 16(sp) # 4-byte Folded Spill 10096269ed24SWuXinlong; RV32I-NEXT: sw s7, 12(sp) # 4-byte Folded Spill 10106269ed24SWuXinlong; RV32I-NEXT: sw s8, 8(sp) # 4-byte Folded Spill 10116269ed24SWuXinlong; RV32I-NEXT: .cfi_offset ra, -4 10126269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s0, -8 10136269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s1, -12 10146269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s2, -16 10156269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s3, -20 10166269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s4, -24 10176269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s5, -28 10186269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s6, -32 10196269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s7, -36 10206269ed24SWuXinlong; RV32I-NEXT: .cfi_offset s8, -40 10216269ed24SWuXinlong; RV32I-NEXT: addi s0, sp, 48 10226269ed24SWuXinlong; RV32I-NEXT: .cfi_def_cfa s0, 0 10236269ed24SWuXinlong; RV32I-NEXT: addi a0, a0, 15 10246269ed24SWuXinlong; RV32I-NEXT: andi a0, a0, -16 10256269ed24SWuXinlong; RV32I-NEXT: sub s1, sp, a0 10266269ed24SWuXinlong; RV32I-NEXT: mv sp, s1 10276269ed24SWuXinlong; RV32I-NEXT: lui s2, %hi(var) 10286269ed24SWuXinlong; RV32I-NEXT: lw s3, %lo(var)(s2) 10296269ed24SWuXinlong; RV32I-NEXT: lw s4, %lo(var+4)(s2) 10306269ed24SWuXinlong; RV32I-NEXT: lw s5, %lo(var+8)(s2) 10316269ed24SWuXinlong; RV32I-NEXT: lw s6, %lo(var+12)(s2) 10326269ed24SWuXinlong; RV32I-NEXT: addi s7, s2, %lo(var) 10336269ed24SWuXinlong; RV32I-NEXT: lw s8, 16(s7) 10346269ed24SWuXinlong; RV32I-NEXT: mv a0, s1 1035eabaee0cSFangrui Song; RV32I-NEXT: call callee_void 10366269ed24SWuXinlong; RV32I-NEXT: sw s8, 16(s7) 10376269ed24SWuXinlong; RV32I-NEXT: sw s6, %lo(var+12)(s2) 10386269ed24SWuXinlong; RV32I-NEXT: sw s5, %lo(var+8)(s2) 10396269ed24SWuXinlong; RV32I-NEXT: sw s4, %lo(var+4)(s2) 10406269ed24SWuXinlong; RV32I-NEXT: sw s3, %lo(var)(s2) 10416269ed24SWuXinlong; RV32I-NEXT: mv a0, s1 10426269ed24SWuXinlong; RV32I-NEXT: addi sp, s0, -48 1043*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa sp, 48 10446269ed24SWuXinlong; RV32I-NEXT: lw ra, 44(sp) # 4-byte Folded Reload 10456269ed24SWuXinlong; RV32I-NEXT: lw s0, 40(sp) # 4-byte Folded Reload 10466269ed24SWuXinlong; RV32I-NEXT: lw s1, 36(sp) # 4-byte Folded Reload 10476269ed24SWuXinlong; RV32I-NEXT: lw s2, 32(sp) # 4-byte Folded Reload 10486269ed24SWuXinlong; RV32I-NEXT: lw s3, 28(sp) # 4-byte Folded Reload 10496269ed24SWuXinlong; RV32I-NEXT: lw s4, 24(sp) # 4-byte Folded Reload 10506269ed24SWuXinlong; RV32I-NEXT: lw s5, 20(sp) # 4-byte Folded Reload 10516269ed24SWuXinlong; RV32I-NEXT: lw s6, 16(sp) # 4-byte Folded Reload 10526269ed24SWuXinlong; RV32I-NEXT: lw s7, 12(sp) # 4-byte Folded Reload 10536269ed24SWuXinlong; RV32I-NEXT: lw s8, 8(sp) # 4-byte Folded Reload 1054*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore ra 1055*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s0 1056*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s1 1057*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s2 1058*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s3 1059*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s4 1060*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s5 1061*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s6 1062*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s7 1063*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s8 10646269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 48 1065*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa_offset 0 1066eabaee0cSFangrui Song; RV32I-NEXT: tail callee 10676269ed24SWuXinlong; 10686269ed24SWuXinlong; RV64I-LABEL: nocompress: 10696269ed24SWuXinlong; RV64I: # %bb.0: # %entry 10706269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -80 10716269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa_offset 80 10726269ed24SWuXinlong; RV64I-NEXT: sd ra, 72(sp) # 8-byte Folded Spill 10736269ed24SWuXinlong; RV64I-NEXT: sd s0, 64(sp) # 8-byte Folded Spill 10746269ed24SWuXinlong; RV64I-NEXT: sd s1, 56(sp) # 8-byte Folded Spill 10756269ed24SWuXinlong; RV64I-NEXT: sd s2, 48(sp) # 8-byte Folded Spill 10766269ed24SWuXinlong; RV64I-NEXT: sd s3, 40(sp) # 8-byte Folded Spill 10776269ed24SWuXinlong; RV64I-NEXT: sd s4, 32(sp) # 8-byte Folded Spill 10786269ed24SWuXinlong; RV64I-NEXT: sd s5, 24(sp) # 8-byte Folded Spill 10796269ed24SWuXinlong; RV64I-NEXT: sd s6, 16(sp) # 8-byte Folded Spill 10806269ed24SWuXinlong; RV64I-NEXT: sd s7, 8(sp) # 8-byte Folded Spill 10816269ed24SWuXinlong; RV64I-NEXT: sd s8, 0(sp) # 8-byte Folded Spill 10826269ed24SWuXinlong; RV64I-NEXT: .cfi_offset ra, -8 10836269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s0, -16 10846269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s1, -24 10856269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s2, -32 10866269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s3, -40 10876269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s4, -48 10886269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s5, -56 10896269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s6, -64 10906269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s7, -72 10916269ed24SWuXinlong; RV64I-NEXT: .cfi_offset s8, -80 10926269ed24SWuXinlong; RV64I-NEXT: addi s0, sp, 80 10936269ed24SWuXinlong; RV64I-NEXT: .cfi_def_cfa s0, 0 10946269ed24SWuXinlong; RV64I-NEXT: slli a0, a0, 32 10956269ed24SWuXinlong; RV64I-NEXT: srli a0, a0, 32 10966269ed24SWuXinlong; RV64I-NEXT: addi a0, a0, 15 10976269ed24SWuXinlong; RV64I-NEXT: andi a0, a0, -16 10986269ed24SWuXinlong; RV64I-NEXT: sub s1, sp, a0 10996269ed24SWuXinlong; RV64I-NEXT: mv sp, s1 11006269ed24SWuXinlong; RV64I-NEXT: lui s2, %hi(var) 11016269ed24SWuXinlong; RV64I-NEXT: lw s3, %lo(var)(s2) 11026269ed24SWuXinlong; RV64I-NEXT: lw s4, %lo(var+4)(s2) 11036269ed24SWuXinlong; RV64I-NEXT: lw s5, %lo(var+8)(s2) 11046269ed24SWuXinlong; RV64I-NEXT: lw s6, %lo(var+12)(s2) 11056269ed24SWuXinlong; RV64I-NEXT: addi s7, s2, %lo(var) 11066269ed24SWuXinlong; RV64I-NEXT: lw s8, 16(s7) 11076269ed24SWuXinlong; RV64I-NEXT: mv a0, s1 1108eabaee0cSFangrui Song; RV64I-NEXT: call callee_void 11096269ed24SWuXinlong; RV64I-NEXT: sw s8, 16(s7) 11106269ed24SWuXinlong; RV64I-NEXT: sw s6, %lo(var+12)(s2) 11116269ed24SWuXinlong; RV64I-NEXT: sw s5, %lo(var+8)(s2) 11126269ed24SWuXinlong; RV64I-NEXT: sw s4, %lo(var+4)(s2) 11136269ed24SWuXinlong; RV64I-NEXT: sw s3, %lo(var)(s2) 11146269ed24SWuXinlong; RV64I-NEXT: mv a0, s1 11156269ed24SWuXinlong; RV64I-NEXT: addi sp, s0, -80 1116*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa sp, 80 11176269ed24SWuXinlong; RV64I-NEXT: ld ra, 72(sp) # 8-byte Folded Reload 11186269ed24SWuXinlong; RV64I-NEXT: ld s0, 64(sp) # 8-byte Folded Reload 11196269ed24SWuXinlong; RV64I-NEXT: ld s1, 56(sp) # 8-byte Folded Reload 11206269ed24SWuXinlong; RV64I-NEXT: ld s2, 48(sp) # 8-byte Folded Reload 11216269ed24SWuXinlong; RV64I-NEXT: ld s3, 40(sp) # 8-byte Folded Reload 11226269ed24SWuXinlong; RV64I-NEXT: ld s4, 32(sp) # 8-byte Folded Reload 11236269ed24SWuXinlong; RV64I-NEXT: ld s5, 24(sp) # 8-byte Folded Reload 11246269ed24SWuXinlong; RV64I-NEXT: ld s6, 16(sp) # 8-byte Folded Reload 11256269ed24SWuXinlong; RV64I-NEXT: ld s7, 8(sp) # 8-byte Folded Reload 11266269ed24SWuXinlong; RV64I-NEXT: ld s8, 0(sp) # 8-byte Folded Reload 1127*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore ra 1128*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s0 1129*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s1 1130*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s2 1131*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s3 1132*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s4 1133*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s5 1134*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s6 1135*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s7 1136*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s8 11376269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 80 1138*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa_offset 0 1139eabaee0cSFangrui Song; RV64I-NEXT: tail callee 11406269ed24SWuXinlongentry: 11416269ed24SWuXinlong %0 = alloca i8, i32 %size, align 16 1142ff9af4c4SNikita Popov %val = load [5 x i32], ptr @var 1143ff9af4c4SNikita Popov call void @callee_void(ptr nonnull %0) 1144ff9af4c4SNikita Popov store volatile [5 x i32] %val, ptr @var 1145ff9af4c4SNikita Popov %1 = tail call i32 @callee(ptr nonnull %0) 11466269ed24SWuXinlong ret i32 %1 11476269ed24SWuXinlong} 11486269ed24SWuXinlong 11496269ed24SWuXinlong; Check that functions with varargs do not use save/restore code 11506269ed24SWuXinlong 11516269ed24SWuXinlongdeclare void @llvm.va_start(ptr) 11526269ed24SWuXinlongdeclare void @llvm.va_end(ptr) 11536269ed24SWuXinlong 11546269ed24SWuXinlongdefine i32 @varargs(ptr %fmt, ...) nounwind { 11556269ed24SWuXinlong; RV32IZCMP-LABEL: varargs: 11566269ed24SWuXinlong; RV32IZCMP: # %bb.0: 11576269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, sp, -48 11586269ed24SWuXinlong; RV32IZCMP-NEXT: mv a0, a1 11596269ed24SWuXinlong; RV32IZCMP-NEXT: sw a5, 36(sp) 11602967e5f8SAlex Bradbury; RV32IZCMP-NEXT: sw a6, 40(sp) 11612967e5f8SAlex Bradbury; RV32IZCMP-NEXT: sw a7, 44(sp) 11626269ed24SWuXinlong; RV32IZCMP-NEXT: sw a1, 20(sp) 11632967e5f8SAlex Bradbury; RV32IZCMP-NEXT: sw a2, 24(sp) 11642967e5f8SAlex Bradbury; RV32IZCMP-NEXT: sw a3, 28(sp) 11652967e5f8SAlex Bradbury; RV32IZCMP-NEXT: sw a4, 32(sp) 11666269ed24SWuXinlong; RV32IZCMP-NEXT: addi a1, sp, 24 11676269ed24SWuXinlong; RV32IZCMP-NEXT: sw a1, 12(sp) 11686269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, sp, 48 11696269ed24SWuXinlong; RV32IZCMP-NEXT: ret 11706269ed24SWuXinlong; 11716269ed24SWuXinlong; RV64IZCMP-LABEL: varargs: 11726269ed24SWuXinlong; RV64IZCMP: # %bb.0: 11736269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, sp, -80 1174d5048240SCraig Topper; RV64IZCMP-NEXT: sd a1, 24(sp) 1175d6fbd96eSAlex Bradbury; RV64IZCMP-NEXT: addi a0, sp, 28 1176d6fbd96eSAlex Bradbury; RV64IZCMP-NEXT: sd a0, 8(sp) 1177d6fbd96eSAlex Bradbury; RV64IZCMP-NEXT: lw a0, 24(sp) 11786269ed24SWuXinlong; RV64IZCMP-NEXT: sd a5, 56(sp) 11792967e5f8SAlex Bradbury; RV64IZCMP-NEXT: sd a6, 64(sp) 11802967e5f8SAlex Bradbury; RV64IZCMP-NEXT: sd a7, 72(sp) 11816269ed24SWuXinlong; RV64IZCMP-NEXT: sd a2, 32(sp) 11822967e5f8SAlex Bradbury; RV64IZCMP-NEXT: sd a3, 40(sp) 11832967e5f8SAlex Bradbury; RV64IZCMP-NEXT: sd a4, 48(sp) 11846269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, sp, 80 11856269ed24SWuXinlong; RV64IZCMP-NEXT: ret 11866269ed24SWuXinlong; 11876269ed24SWuXinlong; RV32IZCMP-SR-LABEL: varargs: 11886269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: 11896269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, sp, -48 11906269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv a0, a1 11916269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a5, 36(sp) 11922967e5f8SAlex Bradbury; RV32IZCMP-SR-NEXT: sw a6, 40(sp) 11932967e5f8SAlex Bradbury; RV32IZCMP-SR-NEXT: sw a7, 44(sp) 11946269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a1, 20(sp) 11952967e5f8SAlex Bradbury; RV32IZCMP-SR-NEXT: sw a2, 24(sp) 11962967e5f8SAlex Bradbury; RV32IZCMP-SR-NEXT: sw a3, 28(sp) 11972967e5f8SAlex Bradbury; RV32IZCMP-SR-NEXT: sw a4, 32(sp) 11986269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi a1, sp, 24 11996269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a1, 12(sp) 12006269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, sp, 48 12016269ed24SWuXinlong; RV32IZCMP-SR-NEXT: ret 12026269ed24SWuXinlong; 12036269ed24SWuXinlong; RV64IZCMP-SR-LABEL: varargs: 12046269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: 12056269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, sp, -80 1206d5048240SCraig Topper; RV64IZCMP-SR-NEXT: sd a1, 24(sp) 1207d6fbd96eSAlex Bradbury; RV64IZCMP-SR-NEXT: addi a0, sp, 28 1208d6fbd96eSAlex Bradbury; RV64IZCMP-SR-NEXT: sd a0, 8(sp) 1209d6fbd96eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a0, 24(sp) 12106269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a5, 56(sp) 12112967e5f8SAlex Bradbury; RV64IZCMP-SR-NEXT: sd a6, 64(sp) 12122967e5f8SAlex Bradbury; RV64IZCMP-SR-NEXT: sd a7, 72(sp) 12136269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a2, 32(sp) 12142967e5f8SAlex Bradbury; RV64IZCMP-SR-NEXT: sd a3, 40(sp) 12152967e5f8SAlex Bradbury; RV64IZCMP-SR-NEXT: sd a4, 48(sp) 12166269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, sp, 80 12176269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ret 12186269ed24SWuXinlong; 12196269ed24SWuXinlong; RV32I-LABEL: varargs: 12206269ed24SWuXinlong; RV32I: # %bb.0: 12216269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -48 12226269ed24SWuXinlong; RV32I-NEXT: mv a0, a1 12236269ed24SWuXinlong; RV32I-NEXT: sw a5, 36(sp) 12242967e5f8SAlex Bradbury; RV32I-NEXT: sw a6, 40(sp) 12252967e5f8SAlex Bradbury; RV32I-NEXT: sw a7, 44(sp) 12266269ed24SWuXinlong; RV32I-NEXT: sw a1, 20(sp) 12272967e5f8SAlex Bradbury; RV32I-NEXT: sw a2, 24(sp) 12282967e5f8SAlex Bradbury; RV32I-NEXT: sw a3, 28(sp) 12292967e5f8SAlex Bradbury; RV32I-NEXT: sw a4, 32(sp) 12306269ed24SWuXinlong; RV32I-NEXT: addi a1, sp, 24 12316269ed24SWuXinlong; RV32I-NEXT: sw a1, 12(sp) 12326269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 48 12336269ed24SWuXinlong; RV32I-NEXT: ret 12346269ed24SWuXinlong; 12356269ed24SWuXinlong; RV64I-LABEL: varargs: 12366269ed24SWuXinlong; RV64I: # %bb.0: 12376269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -80 1238d5048240SCraig Topper; RV64I-NEXT: sd a1, 24(sp) 1239d6fbd96eSAlex Bradbury; RV64I-NEXT: addi a0, sp, 28 1240d6fbd96eSAlex Bradbury; RV64I-NEXT: sd a0, 8(sp) 1241d6fbd96eSAlex Bradbury; RV64I-NEXT: lw a0, 24(sp) 12426269ed24SWuXinlong; RV64I-NEXT: sd a5, 56(sp) 12432967e5f8SAlex Bradbury; RV64I-NEXT: sd a6, 64(sp) 12442967e5f8SAlex Bradbury; RV64I-NEXT: sd a7, 72(sp) 12456269ed24SWuXinlong; RV64I-NEXT: sd a2, 32(sp) 12462967e5f8SAlex Bradbury; RV64I-NEXT: sd a3, 40(sp) 12472967e5f8SAlex Bradbury; RV64I-NEXT: sd a4, 48(sp) 12486269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 80 12496269ed24SWuXinlong; RV64I-NEXT: ret 1250d5048240SCraig Topper %va = alloca ptr 12516269ed24SWuXinlong call void @llvm.va_start(ptr %va) 1252d5048240SCraig Topper %argp.cur = load ptr, ptr %va 12536269ed24SWuXinlong %argp.next = getelementptr inbounds i8, ptr %argp.cur, i32 4 1254d5048240SCraig Topper store ptr %argp.next, ptr %va 1255d5048240SCraig Topper %1 = load i32, ptr %argp.cur 12566269ed24SWuXinlong call void @llvm.va_end(ptr %va) 12576269ed24SWuXinlong ret i32 %1 12586269ed24SWuXinlong} 12596269ed24SWuXinlong 12606269ed24SWuXinlong@var0 = global [18 x i32] zeroinitializer 12616269ed24SWuXinlong 12626269ed24SWuXinlongdefine void @many_args(i32, i32, i32, i32, i32, i32, i32, i32, i32) nounwind { 12636269ed24SWuXinlong; RV32IZCMP-LABEL: many_args: 12646269ed24SWuXinlong; RV32IZCMP: # %bb.0: # %entry 12656269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra, s0-s4}, -32 12666269ed24SWuXinlong; RV32IZCMP-NEXT: lui a0, %hi(var0) 12676269ed24SWuXinlong; RV32IZCMP-NEXT: lw a6, %lo(var0)(a0) 12686269ed24SWuXinlong; RV32IZCMP-NEXT: lw a7, %lo(var0+4)(a0) 12696269ed24SWuXinlong; RV32IZCMP-NEXT: lw t0, %lo(var0+8)(a0) 12706269ed24SWuXinlong; RV32IZCMP-NEXT: lw t1, %lo(var0+12)(a0) 12716269ed24SWuXinlong; RV32IZCMP-NEXT: addi a5, a0, %lo(var0) 12726269ed24SWuXinlong; RV32IZCMP-NEXT: lw t2, 16(a5) 12736269ed24SWuXinlong; RV32IZCMP-NEXT: lw t3, 20(a5) 12746269ed24SWuXinlong; RV32IZCMP-NEXT: lw t4, 24(a5) 12756269ed24SWuXinlong; RV32IZCMP-NEXT: lw t5, 28(a5) 127614c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw t6, 48(a5) 127714c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw s2, 52(a5) 127814c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a3, 56(a5) 127914c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a4, 60(a5) 128014c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a1, 64(a5) 128114c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw s0, 68(a5) 128214c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw s3, 32(a5) 128314c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw s4, 36(a5) 128414c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw s1, 40(a5) 128514c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a2, 44(a5) 128614c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw s0, 68(a5) 128714c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a1, 64(a5) 128814c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a4, 60(a5) 128914c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a3, 56(a5) 129014c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw s2, 52(a5) 129114c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw t6, 48(a5) 129214c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a2, 44(a5) 129314c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw s1, 40(a5) 129414c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw s4, 36(a5) 129514c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw s3, 32(a5) 12966269ed24SWuXinlong; RV32IZCMP-NEXT: sw t5, 28(a5) 12976269ed24SWuXinlong; RV32IZCMP-NEXT: sw t4, 24(a5) 12986269ed24SWuXinlong; RV32IZCMP-NEXT: sw t3, 20(a5) 12996269ed24SWuXinlong; RV32IZCMP-NEXT: sw t2, 16(a5) 13006269ed24SWuXinlong; RV32IZCMP-NEXT: sw t1, %lo(var0+12)(a0) 13016269ed24SWuXinlong; RV32IZCMP-NEXT: sw t0, %lo(var0+8)(a0) 13026269ed24SWuXinlong; RV32IZCMP-NEXT: sw a7, %lo(var0+4)(a0) 13036269ed24SWuXinlong; RV32IZCMP-NEXT: sw a6, %lo(var0)(a0) 1304c0221e00SWuXinlong; RV32IZCMP-NEXT: cm.popret {ra, s0-s4}, 32 13056269ed24SWuXinlong; 13066269ed24SWuXinlong; RV64IZCMP-LABEL: many_args: 13076269ed24SWuXinlong; RV64IZCMP: # %bb.0: # %entry 13086269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra, s0-s4}, -48 13096269ed24SWuXinlong; RV64IZCMP-NEXT: lui a0, %hi(var0) 13106269ed24SWuXinlong; RV64IZCMP-NEXT: lw a6, %lo(var0)(a0) 13116269ed24SWuXinlong; RV64IZCMP-NEXT: lw a7, %lo(var0+4)(a0) 13126269ed24SWuXinlong; RV64IZCMP-NEXT: lw t0, %lo(var0+8)(a0) 13136269ed24SWuXinlong; RV64IZCMP-NEXT: lw t1, %lo(var0+12)(a0) 13146269ed24SWuXinlong; RV64IZCMP-NEXT: addi a5, a0, %lo(var0) 13156269ed24SWuXinlong; RV64IZCMP-NEXT: lw t2, 16(a5) 13166269ed24SWuXinlong; RV64IZCMP-NEXT: lw t3, 20(a5) 13176269ed24SWuXinlong; RV64IZCMP-NEXT: lw t4, 24(a5) 13186269ed24SWuXinlong; RV64IZCMP-NEXT: lw t5, 28(a5) 131914c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw t6, 48(a5) 132014c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw s2, 52(a5) 132114c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a3, 56(a5) 132214c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a4, 60(a5) 132314c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a1, 64(a5) 132414c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw s0, 68(a5) 132514c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw s3, 32(a5) 132614c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw s4, 36(a5) 132714c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw s1, 40(a5) 132814c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a2, 44(a5) 132914c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw s0, 68(a5) 133014c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a1, 64(a5) 133114c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a4, 60(a5) 133214c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a3, 56(a5) 133314c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw s2, 52(a5) 133414c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw t6, 48(a5) 133514c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a2, 44(a5) 133614c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw s1, 40(a5) 133714c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw s4, 36(a5) 133814c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw s3, 32(a5) 13396269ed24SWuXinlong; RV64IZCMP-NEXT: sw t5, 28(a5) 13406269ed24SWuXinlong; RV64IZCMP-NEXT: sw t4, 24(a5) 13416269ed24SWuXinlong; RV64IZCMP-NEXT: sw t3, 20(a5) 13426269ed24SWuXinlong; RV64IZCMP-NEXT: sw t2, 16(a5) 13436269ed24SWuXinlong; RV64IZCMP-NEXT: sw t1, %lo(var0+12)(a0) 13446269ed24SWuXinlong; RV64IZCMP-NEXT: sw t0, %lo(var0+8)(a0) 13456269ed24SWuXinlong; RV64IZCMP-NEXT: sw a7, %lo(var0+4)(a0) 13466269ed24SWuXinlong; RV64IZCMP-NEXT: sw a6, %lo(var0)(a0) 1347c0221e00SWuXinlong; RV64IZCMP-NEXT: cm.popret {ra, s0-s4}, 48 13486269ed24SWuXinlong; 13496269ed24SWuXinlong; RV32IZCMP-SR-LABEL: many_args: 13506269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: # %entry 1351ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.push {ra, s0-s4}, -32 13526269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lui a0, %hi(var0) 13536269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a6, %lo(var0)(a0) 13546269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a7, %lo(var0+4)(a0) 13556269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t0, %lo(var0+8)(a0) 13566269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t1, %lo(var0+12)(a0) 13576269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi a5, a0, %lo(var0) 13586269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t2, 16(a5) 13596269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t3, 20(a5) 13606269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t4, 24(a5) 13616269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t5, 28(a5) 136214c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw t6, 48(a5) 136314c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw s2, 52(a5) 136414c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a3, 56(a5) 136514c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a4, 60(a5) 136614c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a1, 64(a5) 136714c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw s0, 68(a5) 136814c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw s3, 32(a5) 136914c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw s4, 36(a5) 137014c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw s1, 40(a5) 137114c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a2, 44(a5) 137214c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw s0, 68(a5) 137314c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a1, 64(a5) 137414c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a4, 60(a5) 137514c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a3, 56(a5) 137614c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw s2, 52(a5) 137714c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw t6, 48(a5) 137814c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a2, 44(a5) 137914c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw s1, 40(a5) 138014c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw s4, 36(a5) 138114c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw s3, 32(a5) 13826269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t5, 28(a5) 13836269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t4, 24(a5) 13846269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t3, 20(a5) 13856269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t2, 16(a5) 13866269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t1, %lo(var0+12)(a0) 13876269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t0, %lo(var0+8)(a0) 13886269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a7, %lo(var0+4)(a0) 13896269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a6, %lo(var0)(a0) 1390ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.popret {ra, s0-s4}, 32 13916269ed24SWuXinlong; 13926269ed24SWuXinlong; RV64IZCMP-SR-LABEL: many_args: 13936269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: # %entry 1394ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.push {ra, s0-s4}, -48 13956269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lui a0, %hi(var0) 13966269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw a6, %lo(var0)(a0) 13976269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw a7, %lo(var0+4)(a0) 13986269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t0, %lo(var0+8)(a0) 13996269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t1, %lo(var0+12)(a0) 14006269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi a5, a0, %lo(var0) 14016269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t2, 16(a5) 14026269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t3, 20(a5) 14036269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t4, 24(a5) 14046269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t5, 28(a5) 140514c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw t6, 48(a5) 140614c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw s2, 52(a5) 140714c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a3, 56(a5) 140814c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a4, 60(a5) 140914c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a1, 64(a5) 141014c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw s0, 68(a5) 141114c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw s3, 32(a5) 141214c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw s4, 36(a5) 141314c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw s1, 40(a5) 141414c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a2, 44(a5) 141514c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw s0, 68(a5) 141614c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a1, 64(a5) 141714c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a4, 60(a5) 141814c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a3, 56(a5) 141914c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw s2, 52(a5) 142014c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw t6, 48(a5) 142114c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a2, 44(a5) 142214c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw s1, 40(a5) 142314c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw s4, 36(a5) 142414c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw s3, 32(a5) 14256269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t5, 28(a5) 14266269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t4, 24(a5) 14276269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t3, 20(a5) 14286269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t2, 16(a5) 14296269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t1, %lo(var0+12)(a0) 14306269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t0, %lo(var0+8)(a0) 14316269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw a7, %lo(var0+4)(a0) 14326269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw a6, %lo(var0)(a0) 1433ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.popret {ra, s0-s4}, 48 14346269ed24SWuXinlong; 14356269ed24SWuXinlong; RV32I-LABEL: many_args: 14366269ed24SWuXinlong; RV32I: # %bb.0: # %entry 14376269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -32 14386269ed24SWuXinlong; RV32I-NEXT: sw s0, 28(sp) # 4-byte Folded Spill 14396269ed24SWuXinlong; RV32I-NEXT: sw s1, 24(sp) # 4-byte Folded Spill 14406269ed24SWuXinlong; RV32I-NEXT: sw s2, 20(sp) # 4-byte Folded Spill 14416269ed24SWuXinlong; RV32I-NEXT: sw s3, 16(sp) # 4-byte Folded Spill 14426269ed24SWuXinlong; RV32I-NEXT: sw s4, 12(sp) # 4-byte Folded Spill 14436269ed24SWuXinlong; RV32I-NEXT: lui a0, %hi(var0) 14446269ed24SWuXinlong; RV32I-NEXT: lw a1, %lo(var0)(a0) 14456269ed24SWuXinlong; RV32I-NEXT: lw a2, %lo(var0+4)(a0) 14466269ed24SWuXinlong; RV32I-NEXT: lw a3, %lo(var0+8)(a0) 14476269ed24SWuXinlong; RV32I-NEXT: lw a4, %lo(var0+12)(a0) 14486269ed24SWuXinlong; RV32I-NEXT: addi a5, a0, %lo(var0) 14496269ed24SWuXinlong; RV32I-NEXT: lw a6, 16(a5) 14506269ed24SWuXinlong; RV32I-NEXT: lw a7, 20(a5) 14516269ed24SWuXinlong; RV32I-NEXT: lw t0, 24(a5) 14526269ed24SWuXinlong; RV32I-NEXT: lw t1, 28(a5) 145314c4f28eSAlex Bradbury; RV32I-NEXT: lw t2, 48(a5) 145414c4f28eSAlex Bradbury; RV32I-NEXT: lw t3, 52(a5) 145514c4f28eSAlex Bradbury; RV32I-NEXT: lw t4, 56(a5) 145614c4f28eSAlex Bradbury; RV32I-NEXT: lw t5, 60(a5) 145714c4f28eSAlex Bradbury; RV32I-NEXT: lw t6, 64(a5) 145814c4f28eSAlex Bradbury; RV32I-NEXT: lw s0, 68(a5) 145914c4f28eSAlex Bradbury; RV32I-NEXT: lw s1, 32(a5) 146014c4f28eSAlex Bradbury; RV32I-NEXT: lw s2, 36(a5) 146114c4f28eSAlex Bradbury; RV32I-NEXT: lw s3, 40(a5) 146214c4f28eSAlex Bradbury; RV32I-NEXT: lw s4, 44(a5) 146314c4f28eSAlex Bradbury; RV32I-NEXT: sw s0, 68(a5) 146414c4f28eSAlex Bradbury; RV32I-NEXT: sw t6, 64(a5) 146514c4f28eSAlex Bradbury; RV32I-NEXT: sw t5, 60(a5) 146614c4f28eSAlex Bradbury; RV32I-NEXT: sw t4, 56(a5) 146714c4f28eSAlex Bradbury; RV32I-NEXT: sw t3, 52(a5) 146814c4f28eSAlex Bradbury; RV32I-NEXT: sw t2, 48(a5) 146914c4f28eSAlex Bradbury; RV32I-NEXT: sw s4, 44(a5) 147014c4f28eSAlex Bradbury; RV32I-NEXT: sw s3, 40(a5) 147114c4f28eSAlex Bradbury; RV32I-NEXT: sw s2, 36(a5) 147214c4f28eSAlex Bradbury; RV32I-NEXT: sw s1, 32(a5) 14736269ed24SWuXinlong; RV32I-NEXT: sw t1, 28(a5) 14746269ed24SWuXinlong; RV32I-NEXT: sw t0, 24(a5) 14756269ed24SWuXinlong; RV32I-NEXT: sw a7, 20(a5) 14766269ed24SWuXinlong; RV32I-NEXT: sw a6, 16(a5) 14776269ed24SWuXinlong; RV32I-NEXT: sw a4, %lo(var0+12)(a0) 14786269ed24SWuXinlong; RV32I-NEXT: sw a3, %lo(var0+8)(a0) 14796269ed24SWuXinlong; RV32I-NEXT: sw a2, %lo(var0+4)(a0) 14806269ed24SWuXinlong; RV32I-NEXT: sw a1, %lo(var0)(a0) 14816269ed24SWuXinlong; RV32I-NEXT: lw s0, 28(sp) # 4-byte Folded Reload 14826269ed24SWuXinlong; RV32I-NEXT: lw s1, 24(sp) # 4-byte Folded Reload 14836269ed24SWuXinlong; RV32I-NEXT: lw s2, 20(sp) # 4-byte Folded Reload 14846269ed24SWuXinlong; RV32I-NEXT: lw s3, 16(sp) # 4-byte Folded Reload 14856269ed24SWuXinlong; RV32I-NEXT: lw s4, 12(sp) # 4-byte Folded Reload 14866269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 32 14876269ed24SWuXinlong; RV32I-NEXT: ret 14886269ed24SWuXinlong; 14896269ed24SWuXinlong; RV64I-LABEL: many_args: 14906269ed24SWuXinlong; RV64I: # %bb.0: # %entry 14916269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -48 14926269ed24SWuXinlong; RV64I-NEXT: sd s0, 40(sp) # 8-byte Folded Spill 14936269ed24SWuXinlong; RV64I-NEXT: sd s1, 32(sp) # 8-byte Folded Spill 14946269ed24SWuXinlong; RV64I-NEXT: sd s2, 24(sp) # 8-byte Folded Spill 14956269ed24SWuXinlong; RV64I-NEXT: sd s3, 16(sp) # 8-byte Folded Spill 14966269ed24SWuXinlong; RV64I-NEXT: sd s4, 8(sp) # 8-byte Folded Spill 14976269ed24SWuXinlong; RV64I-NEXT: lui a0, %hi(var0) 14986269ed24SWuXinlong; RV64I-NEXT: lw a1, %lo(var0)(a0) 14996269ed24SWuXinlong; RV64I-NEXT: lw a2, %lo(var0+4)(a0) 15006269ed24SWuXinlong; RV64I-NEXT: lw a3, %lo(var0+8)(a0) 15016269ed24SWuXinlong; RV64I-NEXT: lw a4, %lo(var0+12)(a0) 15026269ed24SWuXinlong; RV64I-NEXT: addi a5, a0, %lo(var0) 15036269ed24SWuXinlong; RV64I-NEXT: lw a6, 16(a5) 15046269ed24SWuXinlong; RV64I-NEXT: lw a7, 20(a5) 15056269ed24SWuXinlong; RV64I-NEXT: lw t0, 24(a5) 15066269ed24SWuXinlong; RV64I-NEXT: lw t1, 28(a5) 150714c4f28eSAlex Bradbury; RV64I-NEXT: lw t2, 48(a5) 150814c4f28eSAlex Bradbury; RV64I-NEXT: lw t3, 52(a5) 150914c4f28eSAlex Bradbury; RV64I-NEXT: lw t4, 56(a5) 151014c4f28eSAlex Bradbury; RV64I-NEXT: lw t5, 60(a5) 151114c4f28eSAlex Bradbury; RV64I-NEXT: lw t6, 64(a5) 151214c4f28eSAlex Bradbury; RV64I-NEXT: lw s0, 68(a5) 151314c4f28eSAlex Bradbury; RV64I-NEXT: lw s1, 32(a5) 151414c4f28eSAlex Bradbury; RV64I-NEXT: lw s2, 36(a5) 151514c4f28eSAlex Bradbury; RV64I-NEXT: lw s3, 40(a5) 151614c4f28eSAlex Bradbury; RV64I-NEXT: lw s4, 44(a5) 151714c4f28eSAlex Bradbury; RV64I-NEXT: sw s0, 68(a5) 151814c4f28eSAlex Bradbury; RV64I-NEXT: sw t6, 64(a5) 151914c4f28eSAlex Bradbury; RV64I-NEXT: sw t5, 60(a5) 152014c4f28eSAlex Bradbury; RV64I-NEXT: sw t4, 56(a5) 152114c4f28eSAlex Bradbury; RV64I-NEXT: sw t3, 52(a5) 152214c4f28eSAlex Bradbury; RV64I-NEXT: sw t2, 48(a5) 152314c4f28eSAlex Bradbury; RV64I-NEXT: sw s4, 44(a5) 152414c4f28eSAlex Bradbury; RV64I-NEXT: sw s3, 40(a5) 152514c4f28eSAlex Bradbury; RV64I-NEXT: sw s2, 36(a5) 152614c4f28eSAlex Bradbury; RV64I-NEXT: sw s1, 32(a5) 15276269ed24SWuXinlong; RV64I-NEXT: sw t1, 28(a5) 15286269ed24SWuXinlong; RV64I-NEXT: sw t0, 24(a5) 15296269ed24SWuXinlong; RV64I-NEXT: sw a7, 20(a5) 15306269ed24SWuXinlong; RV64I-NEXT: sw a6, 16(a5) 15316269ed24SWuXinlong; RV64I-NEXT: sw a4, %lo(var0+12)(a0) 15326269ed24SWuXinlong; RV64I-NEXT: sw a3, %lo(var0+8)(a0) 15336269ed24SWuXinlong; RV64I-NEXT: sw a2, %lo(var0+4)(a0) 15346269ed24SWuXinlong; RV64I-NEXT: sw a1, %lo(var0)(a0) 15356269ed24SWuXinlong; RV64I-NEXT: ld s0, 40(sp) # 8-byte Folded Reload 15366269ed24SWuXinlong; RV64I-NEXT: ld s1, 32(sp) # 8-byte Folded Reload 15376269ed24SWuXinlong; RV64I-NEXT: ld s2, 24(sp) # 8-byte Folded Reload 15386269ed24SWuXinlong; RV64I-NEXT: ld s3, 16(sp) # 8-byte Folded Reload 15396269ed24SWuXinlong; RV64I-NEXT: ld s4, 8(sp) # 8-byte Folded Reload 15406269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 48 15416269ed24SWuXinlong; RV64I-NEXT: ret 15426269ed24SWuXinlongentry: 15436269ed24SWuXinlong %val = load [18 x i32], ptr @var0 15446269ed24SWuXinlong store volatile [18 x i32] %val, ptr @var0 15456269ed24SWuXinlong ret void 15466269ed24SWuXinlong} 15476269ed24SWuXinlong 15486269ed24SWuXinlong; Check that dynamic allocation calculations remain correct 15496269ed24SWuXinlong 15506269ed24SWuXinlongdeclare ptr @llvm.stacksave() 15516269ed24SWuXinlongdeclare void @llvm.stackrestore(ptr) 15526269ed24SWuXinlongdeclare void @notdead(ptr) 15536269ed24SWuXinlong 15546269ed24SWuXinlongdefine void @alloca(i32 %n) nounwind { 15556269ed24SWuXinlong; RV32IZCMP-LABEL: alloca: 15566269ed24SWuXinlong; RV32IZCMP: # %bb.0: 15576269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra, s0-s1}, -16 15586269ed24SWuXinlong; RV32IZCMP-NEXT: addi s0, sp, 16 15596269ed24SWuXinlong; RV32IZCMP-NEXT: mv s1, sp 15606269ed24SWuXinlong; RV32IZCMP-NEXT: addi a0, a0, 15 15616269ed24SWuXinlong; RV32IZCMP-NEXT: andi a0, a0, -16 15626269ed24SWuXinlong; RV32IZCMP-NEXT: sub a0, sp, a0 15636269ed24SWuXinlong; RV32IZCMP-NEXT: mv sp, a0 1564eabaee0cSFangrui Song; RV32IZCMP-NEXT: call notdead 15656269ed24SWuXinlong; RV32IZCMP-NEXT: mv sp, s1 15666269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, s0, -16 1567c0221e00SWuXinlong; RV32IZCMP-NEXT: cm.popret {ra, s0-s1}, 16 15686269ed24SWuXinlong; 15696269ed24SWuXinlong; RV64IZCMP-LABEL: alloca: 15706269ed24SWuXinlong; RV64IZCMP: # %bb.0: 15716269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra, s0-s1}, -32 15726269ed24SWuXinlong; RV64IZCMP-NEXT: addi s0, sp, 32 15736269ed24SWuXinlong; RV64IZCMP-NEXT: mv s1, sp 15746269ed24SWuXinlong; RV64IZCMP-NEXT: slli a0, a0, 32 15756269ed24SWuXinlong; RV64IZCMP-NEXT: srli a0, a0, 32 15766269ed24SWuXinlong; RV64IZCMP-NEXT: addi a0, a0, 15 15776269ed24SWuXinlong; RV64IZCMP-NEXT: andi a0, a0, -16 15786269ed24SWuXinlong; RV64IZCMP-NEXT: sub a0, sp, a0 15796269ed24SWuXinlong; RV64IZCMP-NEXT: mv sp, a0 1580eabaee0cSFangrui Song; RV64IZCMP-NEXT: call notdead 15816269ed24SWuXinlong; RV64IZCMP-NEXT: mv sp, s1 15826269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, s0, -32 1583c0221e00SWuXinlong; RV64IZCMP-NEXT: cm.popret {ra, s0-s1}, 32 15846269ed24SWuXinlong; 15856269ed24SWuXinlong; RV32IZCMP-SR-LABEL: alloca: 15866269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: 1587ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.push {ra, s0-s1}, -16 15886269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi s0, sp, 16 15896269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv s1, sp 15906269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi a0, a0, 15 15916269ed24SWuXinlong; RV32IZCMP-SR-NEXT: andi a0, a0, -16 15926269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sub a0, sp, a0 15936269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv sp, a0 1594eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: call notdead 15956269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mv sp, s1 15966269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, s0, -16 1597ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.popret {ra, s0-s1}, 16 15986269ed24SWuXinlong; 15996269ed24SWuXinlong; RV64IZCMP-SR-LABEL: alloca: 16006269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: 1601ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.push {ra, s0-s1}, -32 16026269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi s0, sp, 32 16036269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv s1, sp 16046269ed24SWuXinlong; RV64IZCMP-SR-NEXT: slli a0, a0, 32 16056269ed24SWuXinlong; RV64IZCMP-SR-NEXT: srli a0, a0, 32 16066269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi a0, a0, 15 16076269ed24SWuXinlong; RV64IZCMP-SR-NEXT: andi a0, a0, -16 16086269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sub a0, sp, a0 16096269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv sp, a0 1610eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: call notdead 16116269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mv sp, s1 16126269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, s0, -32 1613ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.popret {ra, s0-s1}, 32 16146269ed24SWuXinlong; 16156269ed24SWuXinlong; RV32I-LABEL: alloca: 16166269ed24SWuXinlong; RV32I: # %bb.0: 16176269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -16 16186269ed24SWuXinlong; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill 16196269ed24SWuXinlong; RV32I-NEXT: sw s0, 8(sp) # 4-byte Folded Spill 16206269ed24SWuXinlong; RV32I-NEXT: sw s1, 4(sp) # 4-byte Folded Spill 16216269ed24SWuXinlong; RV32I-NEXT: addi s0, sp, 16 16226269ed24SWuXinlong; RV32I-NEXT: mv s1, sp 16236269ed24SWuXinlong; RV32I-NEXT: addi a0, a0, 15 16246269ed24SWuXinlong; RV32I-NEXT: andi a0, a0, -16 16256269ed24SWuXinlong; RV32I-NEXT: sub a0, sp, a0 16266269ed24SWuXinlong; RV32I-NEXT: mv sp, a0 1627eabaee0cSFangrui Song; RV32I-NEXT: call notdead 16286269ed24SWuXinlong; RV32I-NEXT: mv sp, s1 16296269ed24SWuXinlong; RV32I-NEXT: addi sp, s0, -16 16306269ed24SWuXinlong; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload 16316269ed24SWuXinlong; RV32I-NEXT: lw s0, 8(sp) # 4-byte Folded Reload 16326269ed24SWuXinlong; RV32I-NEXT: lw s1, 4(sp) # 4-byte Folded Reload 16336269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 16 16346269ed24SWuXinlong; RV32I-NEXT: ret 16356269ed24SWuXinlong; 16366269ed24SWuXinlong; RV64I-LABEL: alloca: 16376269ed24SWuXinlong; RV64I: # %bb.0: 16386269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -32 16396269ed24SWuXinlong; RV64I-NEXT: sd ra, 24(sp) # 8-byte Folded Spill 16406269ed24SWuXinlong; RV64I-NEXT: sd s0, 16(sp) # 8-byte Folded Spill 16416269ed24SWuXinlong; RV64I-NEXT: sd s1, 8(sp) # 8-byte Folded Spill 16426269ed24SWuXinlong; RV64I-NEXT: addi s0, sp, 32 16436269ed24SWuXinlong; RV64I-NEXT: mv s1, sp 16446269ed24SWuXinlong; RV64I-NEXT: slli a0, a0, 32 16456269ed24SWuXinlong; RV64I-NEXT: srli a0, a0, 32 16466269ed24SWuXinlong; RV64I-NEXT: addi a0, a0, 15 16476269ed24SWuXinlong; RV64I-NEXT: andi a0, a0, -16 16486269ed24SWuXinlong; RV64I-NEXT: sub a0, sp, a0 16496269ed24SWuXinlong; RV64I-NEXT: mv sp, a0 1650eabaee0cSFangrui Song; RV64I-NEXT: call notdead 16516269ed24SWuXinlong; RV64I-NEXT: mv sp, s1 16526269ed24SWuXinlong; RV64I-NEXT: addi sp, s0, -32 16536269ed24SWuXinlong; RV64I-NEXT: ld ra, 24(sp) # 8-byte Folded Reload 16546269ed24SWuXinlong; RV64I-NEXT: ld s0, 16(sp) # 8-byte Folded Reload 16556269ed24SWuXinlong; RV64I-NEXT: ld s1, 8(sp) # 8-byte Folded Reload 16566269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 32 16576269ed24SWuXinlong; RV64I-NEXT: ret 16586269ed24SWuXinlong %sp = call ptr @llvm.stacksave() 16596269ed24SWuXinlong %addr = alloca i8, i32 %n 16606269ed24SWuXinlong call void @notdead(ptr %addr) 16616269ed24SWuXinlong call void @llvm.stackrestore(ptr %sp) 16626269ed24SWuXinlong ret void 16636269ed24SWuXinlong} 16646269ed24SWuXinlong 16656269ed24SWuXinlongdeclare i32 @foo_test_irq(...) 16666269ed24SWuXinlong@var_test_irq = global [32 x i32] zeroinitializer 16676269ed24SWuXinlong 16686269ed24SWuXinlongdefine void @foo_with_irq() nounwind "interrupt"="user" { 16696269ed24SWuXinlong; RV32IZCMP-LABEL: foo_with_irq: 16706269ed24SWuXinlong; RV32IZCMP: # %bb.0: 16716269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra}, -64 16726269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, sp, -16 16736269ed24SWuXinlong; RV32IZCMP-NEXT: sw t0, 60(sp) # 4-byte Folded Spill 16746269ed24SWuXinlong; RV32IZCMP-NEXT: sw t1, 56(sp) # 4-byte Folded Spill 16756269ed24SWuXinlong; RV32IZCMP-NEXT: sw t2, 52(sp) # 4-byte Folded Spill 16766269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 48(sp) # 4-byte Folded Spill 16776269ed24SWuXinlong; RV32IZCMP-NEXT: sw a1, 44(sp) # 4-byte Folded Spill 16786269ed24SWuXinlong; RV32IZCMP-NEXT: sw a2, 40(sp) # 4-byte Folded Spill 16796269ed24SWuXinlong; RV32IZCMP-NEXT: sw a3, 36(sp) # 4-byte Folded Spill 16806269ed24SWuXinlong; RV32IZCMP-NEXT: sw a4, 32(sp) # 4-byte Folded Spill 16816269ed24SWuXinlong; RV32IZCMP-NEXT: sw a5, 28(sp) # 4-byte Folded Spill 16826269ed24SWuXinlong; RV32IZCMP-NEXT: sw a6, 24(sp) # 4-byte Folded Spill 16836269ed24SWuXinlong; RV32IZCMP-NEXT: sw a7, 20(sp) # 4-byte Folded Spill 16846269ed24SWuXinlong; RV32IZCMP-NEXT: sw t3, 16(sp) # 4-byte Folded Spill 16856269ed24SWuXinlong; RV32IZCMP-NEXT: sw t4, 12(sp) # 4-byte Folded Spill 16866269ed24SWuXinlong; RV32IZCMP-NEXT: sw t5, 8(sp) # 4-byte Folded Spill 16876269ed24SWuXinlong; RV32IZCMP-NEXT: sw t6, 4(sp) # 4-byte Folded Spill 1688eabaee0cSFangrui Song; RV32IZCMP-NEXT: call foo_test_irq 16896269ed24SWuXinlong; RV32IZCMP-NEXT: lw t0, 60(sp) # 4-byte Folded Reload 16906269ed24SWuXinlong; RV32IZCMP-NEXT: lw t1, 56(sp) # 4-byte Folded Reload 16916269ed24SWuXinlong; RV32IZCMP-NEXT: lw t2, 52(sp) # 4-byte Folded Reload 16926269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 48(sp) # 4-byte Folded Reload 16936269ed24SWuXinlong; RV32IZCMP-NEXT: lw a1, 44(sp) # 4-byte Folded Reload 16946269ed24SWuXinlong; RV32IZCMP-NEXT: lw a2, 40(sp) # 4-byte Folded Reload 16956269ed24SWuXinlong; RV32IZCMP-NEXT: lw a3, 36(sp) # 4-byte Folded Reload 16966269ed24SWuXinlong; RV32IZCMP-NEXT: lw a4, 32(sp) # 4-byte Folded Reload 16976269ed24SWuXinlong; RV32IZCMP-NEXT: lw a5, 28(sp) # 4-byte Folded Reload 16986269ed24SWuXinlong; RV32IZCMP-NEXT: lw a6, 24(sp) # 4-byte Folded Reload 16996269ed24SWuXinlong; RV32IZCMP-NEXT: lw a7, 20(sp) # 4-byte Folded Reload 17006269ed24SWuXinlong; RV32IZCMP-NEXT: lw t3, 16(sp) # 4-byte Folded Reload 17016269ed24SWuXinlong; RV32IZCMP-NEXT: lw t4, 12(sp) # 4-byte Folded Reload 17026269ed24SWuXinlong; RV32IZCMP-NEXT: lw t5, 8(sp) # 4-byte Folded Reload 17036269ed24SWuXinlong; RV32IZCMP-NEXT: lw t6, 4(sp) # 4-byte Folded Reload 17046269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, sp, 16 17056269ed24SWuXinlong; RV32IZCMP-NEXT: cm.pop {ra}, 64 17066269ed24SWuXinlong; RV32IZCMP-NEXT: mret 17076269ed24SWuXinlong; 17086269ed24SWuXinlong; RV64IZCMP-LABEL: foo_with_irq: 17096269ed24SWuXinlong; RV64IZCMP: # %bb.0: 17106269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra}, -64 17116269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, sp, -80 17126269ed24SWuXinlong; RV64IZCMP-NEXT: sd t0, 120(sp) # 8-byte Folded Spill 17136269ed24SWuXinlong; RV64IZCMP-NEXT: sd t1, 112(sp) # 8-byte Folded Spill 17146269ed24SWuXinlong; RV64IZCMP-NEXT: sd t2, 104(sp) # 8-byte Folded Spill 17156269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 96(sp) # 8-byte Folded Spill 17166269ed24SWuXinlong; RV64IZCMP-NEXT: sd a1, 88(sp) # 8-byte Folded Spill 17176269ed24SWuXinlong; RV64IZCMP-NEXT: sd a2, 80(sp) # 8-byte Folded Spill 17186269ed24SWuXinlong; RV64IZCMP-NEXT: sd a3, 72(sp) # 8-byte Folded Spill 17196269ed24SWuXinlong; RV64IZCMP-NEXT: sd a4, 64(sp) # 8-byte Folded Spill 17206269ed24SWuXinlong; RV64IZCMP-NEXT: sd a5, 56(sp) # 8-byte Folded Spill 17216269ed24SWuXinlong; RV64IZCMP-NEXT: sd a6, 48(sp) # 8-byte Folded Spill 17226269ed24SWuXinlong; RV64IZCMP-NEXT: sd a7, 40(sp) # 8-byte Folded Spill 17236269ed24SWuXinlong; RV64IZCMP-NEXT: sd t3, 32(sp) # 8-byte Folded Spill 17246269ed24SWuXinlong; RV64IZCMP-NEXT: sd t4, 24(sp) # 8-byte Folded Spill 17256269ed24SWuXinlong; RV64IZCMP-NEXT: sd t5, 16(sp) # 8-byte Folded Spill 17266269ed24SWuXinlong; RV64IZCMP-NEXT: sd t6, 8(sp) # 8-byte Folded Spill 1727eabaee0cSFangrui Song; RV64IZCMP-NEXT: call foo_test_irq 17286269ed24SWuXinlong; RV64IZCMP-NEXT: ld t0, 120(sp) # 8-byte Folded Reload 17296269ed24SWuXinlong; RV64IZCMP-NEXT: ld t1, 112(sp) # 8-byte Folded Reload 17306269ed24SWuXinlong; RV64IZCMP-NEXT: ld t2, 104(sp) # 8-byte Folded Reload 17316269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 96(sp) # 8-byte Folded Reload 17326269ed24SWuXinlong; RV64IZCMP-NEXT: ld a1, 88(sp) # 8-byte Folded Reload 17336269ed24SWuXinlong; RV64IZCMP-NEXT: ld a2, 80(sp) # 8-byte Folded Reload 17346269ed24SWuXinlong; RV64IZCMP-NEXT: ld a3, 72(sp) # 8-byte Folded Reload 17356269ed24SWuXinlong; RV64IZCMP-NEXT: ld a4, 64(sp) # 8-byte Folded Reload 17366269ed24SWuXinlong; RV64IZCMP-NEXT: ld a5, 56(sp) # 8-byte Folded Reload 17376269ed24SWuXinlong; RV64IZCMP-NEXT: ld a6, 48(sp) # 8-byte Folded Reload 17386269ed24SWuXinlong; RV64IZCMP-NEXT: ld a7, 40(sp) # 8-byte Folded Reload 17396269ed24SWuXinlong; RV64IZCMP-NEXT: ld t3, 32(sp) # 8-byte Folded Reload 17406269ed24SWuXinlong; RV64IZCMP-NEXT: ld t4, 24(sp) # 8-byte Folded Reload 17416269ed24SWuXinlong; RV64IZCMP-NEXT: ld t5, 16(sp) # 8-byte Folded Reload 17426269ed24SWuXinlong; RV64IZCMP-NEXT: ld t6, 8(sp) # 8-byte Folded Reload 17436269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, sp, 80 17446269ed24SWuXinlong; RV64IZCMP-NEXT: cm.pop {ra}, 64 17456269ed24SWuXinlong; RV64IZCMP-NEXT: mret 17466269ed24SWuXinlong; 17476269ed24SWuXinlong; RV32IZCMP-SR-LABEL: foo_with_irq: 17486269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: 17496269ed24SWuXinlong; RV32IZCMP-SR-NEXT: cm.push {ra}, -64 17506269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, sp, -16 17516269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t0, 60(sp) # 4-byte Folded Spill 17526269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t1, 56(sp) # 4-byte Folded Spill 17536269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t2, 52(sp) # 4-byte Folded Spill 17546269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 48(sp) # 4-byte Folded Spill 17556269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a1, 44(sp) # 4-byte Folded Spill 17566269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a2, 40(sp) # 4-byte Folded Spill 17576269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a3, 36(sp) # 4-byte Folded Spill 17586269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a4, 32(sp) # 4-byte Folded Spill 17596269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a5, 28(sp) # 4-byte Folded Spill 17606269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a6, 24(sp) # 4-byte Folded Spill 17616269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a7, 20(sp) # 4-byte Folded Spill 17626269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t3, 16(sp) # 4-byte Folded Spill 17636269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t4, 12(sp) # 4-byte Folded Spill 17646269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t5, 8(sp) # 4-byte Folded Spill 17656269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t6, 4(sp) # 4-byte Folded Spill 1766eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: call foo_test_irq 17676269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t0, 60(sp) # 4-byte Folded Reload 17686269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t1, 56(sp) # 4-byte Folded Reload 17696269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t2, 52(sp) # 4-byte Folded Reload 17706269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 48(sp) # 4-byte Folded Reload 17716269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a1, 44(sp) # 4-byte Folded Reload 17726269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a2, 40(sp) # 4-byte Folded Reload 17736269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a3, 36(sp) # 4-byte Folded Reload 17746269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a4, 32(sp) # 4-byte Folded Reload 17756269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a5, 28(sp) # 4-byte Folded Reload 17766269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a6, 24(sp) # 4-byte Folded Reload 17776269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a7, 20(sp) # 4-byte Folded Reload 17786269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t3, 16(sp) # 4-byte Folded Reload 17796269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t4, 12(sp) # 4-byte Folded Reload 17806269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t5, 8(sp) # 4-byte Folded Reload 17816269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t6, 4(sp) # 4-byte Folded Reload 17826269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, sp, 16 17836269ed24SWuXinlong; RV32IZCMP-SR-NEXT: cm.pop {ra}, 64 17846269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mret 17856269ed24SWuXinlong; 17866269ed24SWuXinlong; RV64IZCMP-SR-LABEL: foo_with_irq: 17876269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: 17886269ed24SWuXinlong; RV64IZCMP-SR-NEXT: cm.push {ra}, -64 17896269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, sp, -80 17906269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t0, 120(sp) # 8-byte Folded Spill 17916269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t1, 112(sp) # 8-byte Folded Spill 17926269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t2, 104(sp) # 8-byte Folded Spill 17936269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 96(sp) # 8-byte Folded Spill 17946269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a1, 88(sp) # 8-byte Folded Spill 17956269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a2, 80(sp) # 8-byte Folded Spill 17966269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a3, 72(sp) # 8-byte Folded Spill 17976269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a4, 64(sp) # 8-byte Folded Spill 17986269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a5, 56(sp) # 8-byte Folded Spill 17996269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a6, 48(sp) # 8-byte Folded Spill 18006269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a7, 40(sp) # 8-byte Folded Spill 18016269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t3, 32(sp) # 8-byte Folded Spill 18026269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t4, 24(sp) # 8-byte Folded Spill 18036269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t5, 16(sp) # 8-byte Folded Spill 18046269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t6, 8(sp) # 8-byte Folded Spill 1805eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: call foo_test_irq 18066269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t0, 120(sp) # 8-byte Folded Reload 18076269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t1, 112(sp) # 8-byte Folded Reload 18086269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t2, 104(sp) # 8-byte Folded Reload 18096269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 96(sp) # 8-byte Folded Reload 18106269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a1, 88(sp) # 8-byte Folded Reload 18116269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a2, 80(sp) # 8-byte Folded Reload 18126269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a3, 72(sp) # 8-byte Folded Reload 18136269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a4, 64(sp) # 8-byte Folded Reload 18146269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a5, 56(sp) # 8-byte Folded Reload 18156269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a6, 48(sp) # 8-byte Folded Reload 18166269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a7, 40(sp) # 8-byte Folded Reload 18176269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t3, 32(sp) # 8-byte Folded Reload 18186269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t4, 24(sp) # 8-byte Folded Reload 18196269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t5, 16(sp) # 8-byte Folded Reload 18206269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t6, 8(sp) # 8-byte Folded Reload 18216269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, sp, 80 18226269ed24SWuXinlong; RV64IZCMP-SR-NEXT: cm.pop {ra}, 64 18236269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mret 18246269ed24SWuXinlong; 18256269ed24SWuXinlong; RV32I-LABEL: foo_with_irq: 18266269ed24SWuXinlong; RV32I: # %bb.0: 18276269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -64 18286269ed24SWuXinlong; RV32I-NEXT: sw ra, 60(sp) # 4-byte Folded Spill 18296269ed24SWuXinlong; RV32I-NEXT: sw t0, 56(sp) # 4-byte Folded Spill 18306269ed24SWuXinlong; RV32I-NEXT: sw t1, 52(sp) # 4-byte Folded Spill 18316269ed24SWuXinlong; RV32I-NEXT: sw t2, 48(sp) # 4-byte Folded Spill 18326269ed24SWuXinlong; RV32I-NEXT: sw a0, 44(sp) # 4-byte Folded Spill 18336269ed24SWuXinlong; RV32I-NEXT: sw a1, 40(sp) # 4-byte Folded Spill 18346269ed24SWuXinlong; RV32I-NEXT: sw a2, 36(sp) # 4-byte Folded Spill 18356269ed24SWuXinlong; RV32I-NEXT: sw a3, 32(sp) # 4-byte Folded Spill 18366269ed24SWuXinlong; RV32I-NEXT: sw a4, 28(sp) # 4-byte Folded Spill 18376269ed24SWuXinlong; RV32I-NEXT: sw a5, 24(sp) # 4-byte Folded Spill 18386269ed24SWuXinlong; RV32I-NEXT: sw a6, 20(sp) # 4-byte Folded Spill 18396269ed24SWuXinlong; RV32I-NEXT: sw a7, 16(sp) # 4-byte Folded Spill 18406269ed24SWuXinlong; RV32I-NEXT: sw t3, 12(sp) # 4-byte Folded Spill 18416269ed24SWuXinlong; RV32I-NEXT: sw t4, 8(sp) # 4-byte Folded Spill 18426269ed24SWuXinlong; RV32I-NEXT: sw t5, 4(sp) # 4-byte Folded Spill 18436269ed24SWuXinlong; RV32I-NEXT: sw t6, 0(sp) # 4-byte Folded Spill 1844eabaee0cSFangrui Song; RV32I-NEXT: call foo_test_irq 18456269ed24SWuXinlong; RV32I-NEXT: lw ra, 60(sp) # 4-byte Folded Reload 18466269ed24SWuXinlong; RV32I-NEXT: lw t0, 56(sp) # 4-byte Folded Reload 18476269ed24SWuXinlong; RV32I-NEXT: lw t1, 52(sp) # 4-byte Folded Reload 18486269ed24SWuXinlong; RV32I-NEXT: lw t2, 48(sp) # 4-byte Folded Reload 18496269ed24SWuXinlong; RV32I-NEXT: lw a0, 44(sp) # 4-byte Folded Reload 18506269ed24SWuXinlong; RV32I-NEXT: lw a1, 40(sp) # 4-byte Folded Reload 18516269ed24SWuXinlong; RV32I-NEXT: lw a2, 36(sp) # 4-byte Folded Reload 18526269ed24SWuXinlong; RV32I-NEXT: lw a3, 32(sp) # 4-byte Folded Reload 18536269ed24SWuXinlong; RV32I-NEXT: lw a4, 28(sp) # 4-byte Folded Reload 18546269ed24SWuXinlong; RV32I-NEXT: lw a5, 24(sp) # 4-byte Folded Reload 18556269ed24SWuXinlong; RV32I-NEXT: lw a6, 20(sp) # 4-byte Folded Reload 18566269ed24SWuXinlong; RV32I-NEXT: lw a7, 16(sp) # 4-byte Folded Reload 18576269ed24SWuXinlong; RV32I-NEXT: lw t3, 12(sp) # 4-byte Folded Reload 18586269ed24SWuXinlong; RV32I-NEXT: lw t4, 8(sp) # 4-byte Folded Reload 18596269ed24SWuXinlong; RV32I-NEXT: lw t5, 4(sp) # 4-byte Folded Reload 18606269ed24SWuXinlong; RV32I-NEXT: lw t6, 0(sp) # 4-byte Folded Reload 18616269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 64 18626269ed24SWuXinlong; RV32I-NEXT: mret 18636269ed24SWuXinlong; 18646269ed24SWuXinlong; RV64I-LABEL: foo_with_irq: 18656269ed24SWuXinlong; RV64I: # %bb.0: 18666269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -128 18676269ed24SWuXinlong; RV64I-NEXT: sd ra, 120(sp) # 8-byte Folded Spill 18686269ed24SWuXinlong; RV64I-NEXT: sd t0, 112(sp) # 8-byte Folded Spill 18696269ed24SWuXinlong; RV64I-NEXT: sd t1, 104(sp) # 8-byte Folded Spill 18706269ed24SWuXinlong; RV64I-NEXT: sd t2, 96(sp) # 8-byte Folded Spill 18716269ed24SWuXinlong; RV64I-NEXT: sd a0, 88(sp) # 8-byte Folded Spill 18726269ed24SWuXinlong; RV64I-NEXT: sd a1, 80(sp) # 8-byte Folded Spill 18736269ed24SWuXinlong; RV64I-NEXT: sd a2, 72(sp) # 8-byte Folded Spill 18746269ed24SWuXinlong; RV64I-NEXT: sd a3, 64(sp) # 8-byte Folded Spill 18756269ed24SWuXinlong; RV64I-NEXT: sd a4, 56(sp) # 8-byte Folded Spill 18766269ed24SWuXinlong; RV64I-NEXT: sd a5, 48(sp) # 8-byte Folded Spill 18776269ed24SWuXinlong; RV64I-NEXT: sd a6, 40(sp) # 8-byte Folded Spill 18786269ed24SWuXinlong; RV64I-NEXT: sd a7, 32(sp) # 8-byte Folded Spill 18796269ed24SWuXinlong; RV64I-NEXT: sd t3, 24(sp) # 8-byte Folded Spill 18806269ed24SWuXinlong; RV64I-NEXT: sd t4, 16(sp) # 8-byte Folded Spill 18816269ed24SWuXinlong; RV64I-NEXT: sd t5, 8(sp) # 8-byte Folded Spill 18826269ed24SWuXinlong; RV64I-NEXT: sd t6, 0(sp) # 8-byte Folded Spill 1883eabaee0cSFangrui Song; RV64I-NEXT: call foo_test_irq 18846269ed24SWuXinlong; RV64I-NEXT: ld ra, 120(sp) # 8-byte Folded Reload 18856269ed24SWuXinlong; RV64I-NEXT: ld t0, 112(sp) # 8-byte Folded Reload 18866269ed24SWuXinlong; RV64I-NEXT: ld t1, 104(sp) # 8-byte Folded Reload 18876269ed24SWuXinlong; RV64I-NEXT: ld t2, 96(sp) # 8-byte Folded Reload 18886269ed24SWuXinlong; RV64I-NEXT: ld a0, 88(sp) # 8-byte Folded Reload 18896269ed24SWuXinlong; RV64I-NEXT: ld a1, 80(sp) # 8-byte Folded Reload 18906269ed24SWuXinlong; RV64I-NEXT: ld a2, 72(sp) # 8-byte Folded Reload 18916269ed24SWuXinlong; RV64I-NEXT: ld a3, 64(sp) # 8-byte Folded Reload 18926269ed24SWuXinlong; RV64I-NEXT: ld a4, 56(sp) # 8-byte Folded Reload 18936269ed24SWuXinlong; RV64I-NEXT: ld a5, 48(sp) # 8-byte Folded Reload 18946269ed24SWuXinlong; RV64I-NEXT: ld a6, 40(sp) # 8-byte Folded Reload 18956269ed24SWuXinlong; RV64I-NEXT: ld a7, 32(sp) # 8-byte Folded Reload 18966269ed24SWuXinlong; RV64I-NEXT: ld t3, 24(sp) # 8-byte Folded Reload 18976269ed24SWuXinlong; RV64I-NEXT: ld t4, 16(sp) # 8-byte Folded Reload 18986269ed24SWuXinlong; RV64I-NEXT: ld t5, 8(sp) # 8-byte Folded Reload 18996269ed24SWuXinlong; RV64I-NEXT: ld t6, 0(sp) # 8-byte Folded Reload 19006269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 128 19016269ed24SWuXinlong; RV64I-NEXT: mret 1902ff9af4c4SNikita Popov %call = call i32 @foo_test_irq() 19036269ed24SWuXinlong ret void 19046269ed24SWuXinlong} 19056269ed24SWuXinlong 1906c0221e00SWuXinlongdefine void @foo_no_irq() nounwind{ 1907c0221e00SWuXinlong; RV32IZCMP-LABEL: foo_no_irq: 1908c0221e00SWuXinlong; RV32IZCMP: # %bb.0: 1909c0221e00SWuXinlong; RV32IZCMP-NEXT: cm.push {ra}, -16 1910eabaee0cSFangrui Song; RV32IZCMP-NEXT: call foo_test_irq 1911c0221e00SWuXinlong; RV32IZCMP-NEXT: cm.popret {ra}, 16 1912c0221e00SWuXinlong; 1913c0221e00SWuXinlong; RV64IZCMP-LABEL: foo_no_irq: 1914c0221e00SWuXinlong; RV64IZCMP: # %bb.0: 1915c0221e00SWuXinlong; RV64IZCMP-NEXT: cm.push {ra}, -16 1916eabaee0cSFangrui Song; RV64IZCMP-NEXT: call foo_test_irq 1917c0221e00SWuXinlong; RV64IZCMP-NEXT: cm.popret {ra}, 16 1918c0221e00SWuXinlong; 1919c0221e00SWuXinlong; RV32IZCMP-SR-LABEL: foo_no_irq: 1920c0221e00SWuXinlong; RV32IZCMP-SR: # %bb.0: 1921ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.push {ra}, -16 1922eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: call foo_test_irq 1923ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.popret {ra}, 16 1924c0221e00SWuXinlong; 1925c0221e00SWuXinlong; RV64IZCMP-SR-LABEL: foo_no_irq: 1926c0221e00SWuXinlong; RV64IZCMP-SR: # %bb.0: 1927ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.push {ra}, -16 1928eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: call foo_test_irq 1929ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.popret {ra}, 16 1930c0221e00SWuXinlong; 1931c0221e00SWuXinlong; RV32I-LABEL: foo_no_irq: 1932c0221e00SWuXinlong; RV32I: # %bb.0: 1933c0221e00SWuXinlong; RV32I-NEXT: addi sp, sp, -16 1934c0221e00SWuXinlong; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill 1935eabaee0cSFangrui Song; RV32I-NEXT: call foo_test_irq 1936c0221e00SWuXinlong; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload 1937c0221e00SWuXinlong; RV32I-NEXT: addi sp, sp, 16 1938c0221e00SWuXinlong; RV32I-NEXT: ret 1939c0221e00SWuXinlong; 1940c0221e00SWuXinlong; RV64I-LABEL: foo_no_irq: 1941c0221e00SWuXinlong; RV64I: # %bb.0: 1942c0221e00SWuXinlong; RV64I-NEXT: addi sp, sp, -16 1943c0221e00SWuXinlong; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill 1944eabaee0cSFangrui Song; RV64I-NEXT: call foo_test_irq 1945c0221e00SWuXinlong; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload 1946c0221e00SWuXinlong; RV64I-NEXT: addi sp, sp, 16 1947c0221e00SWuXinlong; RV64I-NEXT: ret 1948ff9af4c4SNikita Popov %call = call i32 @foo_test_irq() 1949c0221e00SWuXinlong ret void 1950c0221e00SWuXinlong} 1951c0221e00SWuXinlong 19526269ed24SWuXinlongdefine void @callee_with_irq() nounwind "interrupt"="user" { 19536269ed24SWuXinlong; RV32IZCMP-LABEL: callee_with_irq: 19546269ed24SWuXinlong; RV32IZCMP: # %bb.0: 19556269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra, s0-s11}, -112 19566269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, sp, -48 19576269ed24SWuXinlong; RV32IZCMP-NEXT: sw t0, 92(sp) # 4-byte Folded Spill 19586269ed24SWuXinlong; RV32IZCMP-NEXT: sw t1, 88(sp) # 4-byte Folded Spill 19596269ed24SWuXinlong; RV32IZCMP-NEXT: sw t2, 84(sp) # 4-byte Folded Spill 19606269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 80(sp) # 4-byte Folded Spill 19616269ed24SWuXinlong; RV32IZCMP-NEXT: sw a1, 76(sp) # 4-byte Folded Spill 19626269ed24SWuXinlong; RV32IZCMP-NEXT: sw a2, 72(sp) # 4-byte Folded Spill 19636269ed24SWuXinlong; RV32IZCMP-NEXT: sw a3, 68(sp) # 4-byte Folded Spill 19646269ed24SWuXinlong; RV32IZCMP-NEXT: sw a4, 64(sp) # 4-byte Folded Spill 19656269ed24SWuXinlong; RV32IZCMP-NEXT: sw a5, 60(sp) # 4-byte Folded Spill 19666269ed24SWuXinlong; RV32IZCMP-NEXT: sw a6, 56(sp) # 4-byte Folded Spill 19676269ed24SWuXinlong; RV32IZCMP-NEXT: sw a7, 52(sp) # 4-byte Folded Spill 19686269ed24SWuXinlong; RV32IZCMP-NEXT: sw t3, 48(sp) # 4-byte Folded Spill 19696269ed24SWuXinlong; RV32IZCMP-NEXT: sw t4, 44(sp) # 4-byte Folded Spill 19706269ed24SWuXinlong; RV32IZCMP-NEXT: sw t5, 40(sp) # 4-byte Folded Spill 19716269ed24SWuXinlong; RV32IZCMP-NEXT: sw t6, 36(sp) # 4-byte Folded Spill 197214c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lui t0, %hi(var_test_irq) 197314c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a0, %lo(var_test_irq)(t0) 19746269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 32(sp) # 4-byte Folded Spill 197514c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a0, %lo(var_test_irq+4)(t0) 19766269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 28(sp) # 4-byte Folded Spill 197714c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a0, %lo(var_test_irq+8)(t0) 19786269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 24(sp) # 4-byte Folded Spill 197914c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a0, %lo(var_test_irq+12)(t0) 19806269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 20(sp) # 4-byte Folded Spill 198114c4f28eSAlex Bradbury; RV32IZCMP-NEXT: addi a5, t0, %lo(var_test_irq) 19826269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 16(a5) 19836269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill 19846269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 20(a5) 19856269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 12(sp) # 4-byte Folded Spill 19866269ed24SWuXinlong; RV32IZCMP-NEXT: lw t4, 24(a5) 19876269ed24SWuXinlong; RV32IZCMP-NEXT: lw t5, 28(a5) 19886269ed24SWuXinlong; RV32IZCMP-NEXT: lw t6, 32(a5) 19896269ed24SWuXinlong; RV32IZCMP-NEXT: lw s2, 36(a5) 19906269ed24SWuXinlong; RV32IZCMP-NEXT: lw s3, 40(a5) 19916269ed24SWuXinlong; RV32IZCMP-NEXT: lw s4, 44(a5) 19926269ed24SWuXinlong; RV32IZCMP-NEXT: lw s5, 48(a5) 19936269ed24SWuXinlong; RV32IZCMP-NEXT: lw s6, 52(a5) 19946269ed24SWuXinlong; RV32IZCMP-NEXT: lw s7, 56(a5) 19956269ed24SWuXinlong; RV32IZCMP-NEXT: lw s8, 60(a5) 19966269ed24SWuXinlong; RV32IZCMP-NEXT: lw s9, 64(a5) 19976269ed24SWuXinlong; RV32IZCMP-NEXT: lw s10, 68(a5) 19986269ed24SWuXinlong; RV32IZCMP-NEXT: lw s11, 72(a5) 19996269ed24SWuXinlong; RV32IZCMP-NEXT: lw ra, 76(a5) 20006269ed24SWuXinlong; RV32IZCMP-NEXT: lw s1, 80(a5) 20016269ed24SWuXinlong; RV32IZCMP-NEXT: lw t3, 84(a5) 20026269ed24SWuXinlong; RV32IZCMP-NEXT: lw t2, 88(a5) 20036269ed24SWuXinlong; RV32IZCMP-NEXT: lw t1, 92(a5) 200414c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a7, 112(a5) 200514c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw s0, 116(a5) 200614c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a3, 120(a5) 20076269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 124(a5) 200814c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a6, 96(a5) 200914c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a4, 100(a5) 201014c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a2, 104(a5) 201114c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a1, 108(a5) 20126269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 124(a5) 201314c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a3, 120(a5) 201414c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw s0, 116(a5) 201514c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a7, 112(a5) 201614c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a1, 108(a5) 201714c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a2, 104(a5) 201814c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a4, 100(a5) 201914c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a6, 96(a5) 20206269ed24SWuXinlong; RV32IZCMP-NEXT: sw t1, 92(a5) 20216269ed24SWuXinlong; RV32IZCMP-NEXT: sw t2, 88(a5) 20226269ed24SWuXinlong; RV32IZCMP-NEXT: sw t3, 84(a5) 20236269ed24SWuXinlong; RV32IZCMP-NEXT: sw s1, 80(a5) 20246269ed24SWuXinlong; RV32IZCMP-NEXT: sw ra, 76(a5) 20256269ed24SWuXinlong; RV32IZCMP-NEXT: sw s11, 72(a5) 20266269ed24SWuXinlong; RV32IZCMP-NEXT: sw s10, 68(a5) 20276269ed24SWuXinlong; RV32IZCMP-NEXT: sw s9, 64(a5) 20286269ed24SWuXinlong; RV32IZCMP-NEXT: sw s8, 60(a5) 20296269ed24SWuXinlong; RV32IZCMP-NEXT: sw s7, 56(a5) 20306269ed24SWuXinlong; RV32IZCMP-NEXT: sw s6, 52(a5) 20316269ed24SWuXinlong; RV32IZCMP-NEXT: sw s5, 48(a5) 20326269ed24SWuXinlong; RV32IZCMP-NEXT: sw s4, 44(a5) 20336269ed24SWuXinlong; RV32IZCMP-NEXT: sw s3, 40(a5) 20346269ed24SWuXinlong; RV32IZCMP-NEXT: sw s2, 36(a5) 20356269ed24SWuXinlong; RV32IZCMP-NEXT: sw t6, 32(a5) 20366269ed24SWuXinlong; RV32IZCMP-NEXT: sw t5, 28(a5) 20376269ed24SWuXinlong; RV32IZCMP-NEXT: sw t4, 24(a5) 20386269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload 20396269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 20(a5) 20406269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload 20416269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 16(a5) 20426269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload 204314c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a0, %lo(var_test_irq+12)(t0) 20446269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload 204514c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a0, %lo(var_test_irq+8)(t0) 20466269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload 204714c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a0, %lo(var_test_irq+4)(t0) 20486269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 32(sp) # 4-byte Folded Reload 204914c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a0, %lo(var_test_irq)(t0) 20506269ed24SWuXinlong; RV32IZCMP-NEXT: lw t0, 92(sp) # 4-byte Folded Reload 20516269ed24SWuXinlong; RV32IZCMP-NEXT: lw t1, 88(sp) # 4-byte Folded Reload 20526269ed24SWuXinlong; RV32IZCMP-NEXT: lw t2, 84(sp) # 4-byte Folded Reload 20536269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 80(sp) # 4-byte Folded Reload 20546269ed24SWuXinlong; RV32IZCMP-NEXT: lw a1, 76(sp) # 4-byte Folded Reload 20556269ed24SWuXinlong; RV32IZCMP-NEXT: lw a2, 72(sp) # 4-byte Folded Reload 20566269ed24SWuXinlong; RV32IZCMP-NEXT: lw a3, 68(sp) # 4-byte Folded Reload 20576269ed24SWuXinlong; RV32IZCMP-NEXT: lw a4, 64(sp) # 4-byte Folded Reload 20586269ed24SWuXinlong; RV32IZCMP-NEXT: lw a5, 60(sp) # 4-byte Folded Reload 20596269ed24SWuXinlong; RV32IZCMP-NEXT: lw a6, 56(sp) # 4-byte Folded Reload 20606269ed24SWuXinlong; RV32IZCMP-NEXT: lw a7, 52(sp) # 4-byte Folded Reload 20616269ed24SWuXinlong; RV32IZCMP-NEXT: lw t3, 48(sp) # 4-byte Folded Reload 20626269ed24SWuXinlong; RV32IZCMP-NEXT: lw t4, 44(sp) # 4-byte Folded Reload 20636269ed24SWuXinlong; RV32IZCMP-NEXT: lw t5, 40(sp) # 4-byte Folded Reload 20646269ed24SWuXinlong; RV32IZCMP-NEXT: lw t6, 36(sp) # 4-byte Folded Reload 20656269ed24SWuXinlong; RV32IZCMP-NEXT: addi sp, sp, 48 20666269ed24SWuXinlong; RV32IZCMP-NEXT: cm.pop {ra, s0-s11}, 112 20676269ed24SWuXinlong; RV32IZCMP-NEXT: mret 20686269ed24SWuXinlong; 20696269ed24SWuXinlong; RV64IZCMP-LABEL: callee_with_irq: 20706269ed24SWuXinlong; RV64IZCMP: # %bb.0: 20716269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra, s0-s11}, -160 20726269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, sp, -128 20736269ed24SWuXinlong; RV64IZCMP-NEXT: sd t0, 168(sp) # 8-byte Folded Spill 20746269ed24SWuXinlong; RV64IZCMP-NEXT: sd t1, 160(sp) # 8-byte Folded Spill 20756269ed24SWuXinlong; RV64IZCMP-NEXT: sd t2, 152(sp) # 8-byte Folded Spill 20766269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 144(sp) # 8-byte Folded Spill 20776269ed24SWuXinlong; RV64IZCMP-NEXT: sd a1, 136(sp) # 8-byte Folded Spill 20786269ed24SWuXinlong; RV64IZCMP-NEXT: sd a2, 128(sp) # 8-byte Folded Spill 20796269ed24SWuXinlong; RV64IZCMP-NEXT: sd a3, 120(sp) # 8-byte Folded Spill 20806269ed24SWuXinlong; RV64IZCMP-NEXT: sd a4, 112(sp) # 8-byte Folded Spill 20816269ed24SWuXinlong; RV64IZCMP-NEXT: sd a5, 104(sp) # 8-byte Folded Spill 20826269ed24SWuXinlong; RV64IZCMP-NEXT: sd a6, 96(sp) # 8-byte Folded Spill 20836269ed24SWuXinlong; RV64IZCMP-NEXT: sd a7, 88(sp) # 8-byte Folded Spill 20846269ed24SWuXinlong; RV64IZCMP-NEXT: sd t3, 80(sp) # 8-byte Folded Spill 20856269ed24SWuXinlong; RV64IZCMP-NEXT: sd t4, 72(sp) # 8-byte Folded Spill 20866269ed24SWuXinlong; RV64IZCMP-NEXT: sd t5, 64(sp) # 8-byte Folded Spill 20876269ed24SWuXinlong; RV64IZCMP-NEXT: sd t6, 56(sp) # 8-byte Folded Spill 208814c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lui t0, %hi(var_test_irq) 208914c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a0, %lo(var_test_irq)(t0) 20906269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 48(sp) # 8-byte Folded Spill 209114c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a0, %lo(var_test_irq+4)(t0) 20926269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 40(sp) # 8-byte Folded Spill 209314c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a0, %lo(var_test_irq+8)(t0) 20946269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 32(sp) # 8-byte Folded Spill 209514c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a0, %lo(var_test_irq+12)(t0) 20966269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 24(sp) # 8-byte Folded Spill 209714c4f28eSAlex Bradbury; RV64IZCMP-NEXT: addi a5, t0, %lo(var_test_irq) 20986269ed24SWuXinlong; RV64IZCMP-NEXT: lw a0, 16(a5) 20996269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 16(sp) # 8-byte Folded Spill 21006269ed24SWuXinlong; RV64IZCMP-NEXT: lw a0, 20(a5) 21016269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 8(sp) # 8-byte Folded Spill 21026269ed24SWuXinlong; RV64IZCMP-NEXT: lw t4, 24(a5) 21036269ed24SWuXinlong; RV64IZCMP-NEXT: lw t5, 28(a5) 21046269ed24SWuXinlong; RV64IZCMP-NEXT: lw t6, 32(a5) 21056269ed24SWuXinlong; RV64IZCMP-NEXT: lw s2, 36(a5) 21066269ed24SWuXinlong; RV64IZCMP-NEXT: lw s3, 40(a5) 21076269ed24SWuXinlong; RV64IZCMP-NEXT: lw s4, 44(a5) 21086269ed24SWuXinlong; RV64IZCMP-NEXT: lw s5, 48(a5) 21096269ed24SWuXinlong; RV64IZCMP-NEXT: lw s6, 52(a5) 21106269ed24SWuXinlong; RV64IZCMP-NEXT: lw s7, 56(a5) 21116269ed24SWuXinlong; RV64IZCMP-NEXT: lw s8, 60(a5) 21126269ed24SWuXinlong; RV64IZCMP-NEXT: lw s9, 64(a5) 21136269ed24SWuXinlong; RV64IZCMP-NEXT: lw s10, 68(a5) 21146269ed24SWuXinlong; RV64IZCMP-NEXT: lw s11, 72(a5) 21156269ed24SWuXinlong; RV64IZCMP-NEXT: lw ra, 76(a5) 21166269ed24SWuXinlong; RV64IZCMP-NEXT: lw s1, 80(a5) 21176269ed24SWuXinlong; RV64IZCMP-NEXT: lw t3, 84(a5) 21186269ed24SWuXinlong; RV64IZCMP-NEXT: lw t2, 88(a5) 21196269ed24SWuXinlong; RV64IZCMP-NEXT: lw t1, 92(a5) 212014c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a7, 112(a5) 212114c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw s0, 116(a5) 212214c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a3, 120(a5) 21236269ed24SWuXinlong; RV64IZCMP-NEXT: lw a0, 124(a5) 212414c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a6, 96(a5) 212514c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a4, 100(a5) 212614c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a2, 104(a5) 212714c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a1, 108(a5) 21286269ed24SWuXinlong; RV64IZCMP-NEXT: sw a0, 124(a5) 212914c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a3, 120(a5) 213014c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw s0, 116(a5) 213114c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a7, 112(a5) 213214c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a1, 108(a5) 213314c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a2, 104(a5) 213414c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a4, 100(a5) 213514c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a6, 96(a5) 21366269ed24SWuXinlong; RV64IZCMP-NEXT: sw t1, 92(a5) 21376269ed24SWuXinlong; RV64IZCMP-NEXT: sw t2, 88(a5) 21386269ed24SWuXinlong; RV64IZCMP-NEXT: sw t3, 84(a5) 21396269ed24SWuXinlong; RV64IZCMP-NEXT: sw s1, 80(a5) 21406269ed24SWuXinlong; RV64IZCMP-NEXT: sw ra, 76(a5) 21416269ed24SWuXinlong; RV64IZCMP-NEXT: sw s11, 72(a5) 21426269ed24SWuXinlong; RV64IZCMP-NEXT: sw s10, 68(a5) 21436269ed24SWuXinlong; RV64IZCMP-NEXT: sw s9, 64(a5) 21446269ed24SWuXinlong; RV64IZCMP-NEXT: sw s8, 60(a5) 21456269ed24SWuXinlong; RV64IZCMP-NEXT: sw s7, 56(a5) 21466269ed24SWuXinlong; RV64IZCMP-NEXT: sw s6, 52(a5) 21476269ed24SWuXinlong; RV64IZCMP-NEXT: sw s5, 48(a5) 21486269ed24SWuXinlong; RV64IZCMP-NEXT: sw s4, 44(a5) 21496269ed24SWuXinlong; RV64IZCMP-NEXT: sw s3, 40(a5) 21506269ed24SWuXinlong; RV64IZCMP-NEXT: sw s2, 36(a5) 21516269ed24SWuXinlong; RV64IZCMP-NEXT: sw t6, 32(a5) 21526269ed24SWuXinlong; RV64IZCMP-NEXT: sw t5, 28(a5) 21536269ed24SWuXinlong; RV64IZCMP-NEXT: sw t4, 24(a5) 21546269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 8(sp) # 8-byte Folded Reload 21556269ed24SWuXinlong; RV64IZCMP-NEXT: sw a0, 20(a5) 21566269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 16(sp) # 8-byte Folded Reload 21576269ed24SWuXinlong; RV64IZCMP-NEXT: sw a0, 16(a5) 21586269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 24(sp) # 8-byte Folded Reload 215914c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a0, %lo(var_test_irq+12)(t0) 21606269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 32(sp) # 8-byte Folded Reload 216114c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a0, %lo(var_test_irq+8)(t0) 21626269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 40(sp) # 8-byte Folded Reload 216314c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a0, %lo(var_test_irq+4)(t0) 21646269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 48(sp) # 8-byte Folded Reload 216514c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a0, %lo(var_test_irq)(t0) 21666269ed24SWuXinlong; RV64IZCMP-NEXT: ld t0, 168(sp) # 8-byte Folded Reload 21676269ed24SWuXinlong; RV64IZCMP-NEXT: ld t1, 160(sp) # 8-byte Folded Reload 21686269ed24SWuXinlong; RV64IZCMP-NEXT: ld t2, 152(sp) # 8-byte Folded Reload 21696269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 144(sp) # 8-byte Folded Reload 21706269ed24SWuXinlong; RV64IZCMP-NEXT: ld a1, 136(sp) # 8-byte Folded Reload 21716269ed24SWuXinlong; RV64IZCMP-NEXT: ld a2, 128(sp) # 8-byte Folded Reload 21726269ed24SWuXinlong; RV64IZCMP-NEXT: ld a3, 120(sp) # 8-byte Folded Reload 21736269ed24SWuXinlong; RV64IZCMP-NEXT: ld a4, 112(sp) # 8-byte Folded Reload 21746269ed24SWuXinlong; RV64IZCMP-NEXT: ld a5, 104(sp) # 8-byte Folded Reload 21756269ed24SWuXinlong; RV64IZCMP-NEXT: ld a6, 96(sp) # 8-byte Folded Reload 21766269ed24SWuXinlong; RV64IZCMP-NEXT: ld a7, 88(sp) # 8-byte Folded Reload 21776269ed24SWuXinlong; RV64IZCMP-NEXT: ld t3, 80(sp) # 8-byte Folded Reload 21786269ed24SWuXinlong; RV64IZCMP-NEXT: ld t4, 72(sp) # 8-byte Folded Reload 21796269ed24SWuXinlong; RV64IZCMP-NEXT: ld t5, 64(sp) # 8-byte Folded Reload 21806269ed24SWuXinlong; RV64IZCMP-NEXT: ld t6, 56(sp) # 8-byte Folded Reload 21816269ed24SWuXinlong; RV64IZCMP-NEXT: addi sp, sp, 128 21826269ed24SWuXinlong; RV64IZCMP-NEXT: cm.pop {ra, s0-s11}, 160 21836269ed24SWuXinlong; RV64IZCMP-NEXT: mret 21846269ed24SWuXinlong; 21856269ed24SWuXinlong; RV32IZCMP-SR-LABEL: callee_with_irq: 21866269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: 21876269ed24SWuXinlong; RV32IZCMP-SR-NEXT: cm.push {ra, s0-s11}, -112 21886269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, sp, -48 21896269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t0, 92(sp) # 4-byte Folded Spill 21906269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t1, 88(sp) # 4-byte Folded Spill 21916269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t2, 84(sp) # 4-byte Folded Spill 21926269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 80(sp) # 4-byte Folded Spill 21936269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a1, 76(sp) # 4-byte Folded Spill 21946269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a2, 72(sp) # 4-byte Folded Spill 21956269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a3, 68(sp) # 4-byte Folded Spill 21966269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a4, 64(sp) # 4-byte Folded Spill 21976269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a5, 60(sp) # 4-byte Folded Spill 21986269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a6, 56(sp) # 4-byte Folded Spill 21996269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a7, 52(sp) # 4-byte Folded Spill 22006269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t3, 48(sp) # 4-byte Folded Spill 22016269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t4, 44(sp) # 4-byte Folded Spill 22026269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t5, 40(sp) # 4-byte Folded Spill 22036269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t6, 36(sp) # 4-byte Folded Spill 220414c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lui t0, %hi(var_test_irq) 220514c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a0, %lo(var_test_irq)(t0) 22066269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 32(sp) # 4-byte Folded Spill 220714c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+4)(t0) 22086269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 28(sp) # 4-byte Folded Spill 220914c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+8)(t0) 22106269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 24(sp) # 4-byte Folded Spill 221114c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+12)(t0) 22126269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 20(sp) # 4-byte Folded Spill 221314c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: addi a5, t0, %lo(var_test_irq) 22146269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 16(a5) 22156269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 16(sp) # 4-byte Folded Spill 22166269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 20(a5) 22176269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 12(sp) # 4-byte Folded Spill 22186269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t4, 24(a5) 22196269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t5, 28(a5) 22206269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t6, 32(a5) 22216269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s2, 36(a5) 22226269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s3, 40(a5) 22236269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s4, 44(a5) 22246269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s5, 48(a5) 22256269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s6, 52(a5) 22266269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s7, 56(a5) 22276269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s8, 60(a5) 22286269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s9, 64(a5) 22296269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s10, 68(a5) 22306269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s11, 72(a5) 22316269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw ra, 76(a5) 22326269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s1, 80(a5) 22336269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t3, 84(a5) 22346269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t2, 88(a5) 22356269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t1, 92(a5) 223614c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a7, 112(a5) 223714c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw s0, 116(a5) 223814c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a3, 120(a5) 22396269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 124(a5) 224014c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a6, 96(a5) 224114c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a4, 100(a5) 224214c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a2, 104(a5) 224314c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a1, 108(a5) 22446269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 124(a5) 224514c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a3, 120(a5) 224614c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw s0, 116(a5) 224714c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a7, 112(a5) 224814c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a1, 108(a5) 224914c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a2, 104(a5) 225014c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a4, 100(a5) 225114c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a6, 96(a5) 22526269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t1, 92(a5) 22536269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t2, 88(a5) 22546269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t3, 84(a5) 22556269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s1, 80(a5) 22566269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw ra, 76(a5) 22576269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s11, 72(a5) 22586269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s10, 68(a5) 22596269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s9, 64(a5) 22606269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s8, 60(a5) 22616269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s7, 56(a5) 22626269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s6, 52(a5) 22636269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s5, 48(a5) 22646269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s4, 44(a5) 22656269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s3, 40(a5) 22666269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s2, 36(a5) 22676269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t6, 32(a5) 22686269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t5, 28(a5) 22696269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t4, 24(a5) 22706269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 12(sp) # 4-byte Folded Reload 22716269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 20(a5) 22726269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 16(sp) # 4-byte Folded Reload 22736269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 16(a5) 22746269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 20(sp) # 4-byte Folded Reload 227514c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+12)(t0) 22766269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 24(sp) # 4-byte Folded Reload 227714c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+8)(t0) 22786269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 28(sp) # 4-byte Folded Reload 227914c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+4)(t0) 22806269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 32(sp) # 4-byte Folded Reload 228114c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a0, %lo(var_test_irq)(t0) 22826269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t0, 92(sp) # 4-byte Folded Reload 22836269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t1, 88(sp) # 4-byte Folded Reload 22846269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t2, 84(sp) # 4-byte Folded Reload 22856269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 80(sp) # 4-byte Folded Reload 22866269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a1, 76(sp) # 4-byte Folded Reload 22876269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a2, 72(sp) # 4-byte Folded Reload 22886269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a3, 68(sp) # 4-byte Folded Reload 22896269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a4, 64(sp) # 4-byte Folded Reload 22906269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a5, 60(sp) # 4-byte Folded Reload 22916269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a6, 56(sp) # 4-byte Folded Reload 22926269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a7, 52(sp) # 4-byte Folded Reload 22936269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t3, 48(sp) # 4-byte Folded Reload 22946269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t4, 44(sp) # 4-byte Folded Reload 22956269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t5, 40(sp) # 4-byte Folded Reload 22966269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t6, 36(sp) # 4-byte Folded Reload 22976269ed24SWuXinlong; RV32IZCMP-SR-NEXT: addi sp, sp, 48 22986269ed24SWuXinlong; RV32IZCMP-SR-NEXT: cm.pop {ra, s0-s11}, 112 22996269ed24SWuXinlong; RV32IZCMP-SR-NEXT: mret 23006269ed24SWuXinlong; 23016269ed24SWuXinlong; RV64IZCMP-SR-LABEL: callee_with_irq: 23026269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: 23036269ed24SWuXinlong; RV64IZCMP-SR-NEXT: cm.push {ra, s0-s11}, -160 23046269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, sp, -128 23056269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t0, 168(sp) # 8-byte Folded Spill 23066269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t1, 160(sp) # 8-byte Folded Spill 23076269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t2, 152(sp) # 8-byte Folded Spill 23086269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 144(sp) # 8-byte Folded Spill 23096269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a1, 136(sp) # 8-byte Folded Spill 23106269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a2, 128(sp) # 8-byte Folded Spill 23116269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a3, 120(sp) # 8-byte Folded Spill 23126269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a4, 112(sp) # 8-byte Folded Spill 23136269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a5, 104(sp) # 8-byte Folded Spill 23146269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a6, 96(sp) # 8-byte Folded Spill 23156269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a7, 88(sp) # 8-byte Folded Spill 23166269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t3, 80(sp) # 8-byte Folded Spill 23176269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t4, 72(sp) # 8-byte Folded Spill 23186269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t5, 64(sp) # 8-byte Folded Spill 23196269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd t6, 56(sp) # 8-byte Folded Spill 232014c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lui t0, %hi(var_test_irq) 232114c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a0, %lo(var_test_irq)(t0) 23226269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 48(sp) # 8-byte Folded Spill 232314c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+4)(t0) 23246269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 40(sp) # 8-byte Folded Spill 232514c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+8)(t0) 23266269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 32(sp) # 8-byte Folded Spill 232714c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+12)(t0) 23286269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 24(sp) # 8-byte Folded Spill 232914c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: addi a5, t0, %lo(var_test_irq) 23306269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw a0, 16(a5) 23316269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 16(sp) # 8-byte Folded Spill 23326269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw a0, 20(a5) 23336269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 8(sp) # 8-byte Folded Spill 23346269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t4, 24(a5) 23356269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t5, 28(a5) 23366269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t6, 32(a5) 23376269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s2, 36(a5) 23386269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s3, 40(a5) 23396269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s4, 44(a5) 23406269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s5, 48(a5) 23416269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s6, 52(a5) 23426269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s7, 56(a5) 23436269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s8, 60(a5) 23446269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s9, 64(a5) 23456269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s10, 68(a5) 23466269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s11, 72(a5) 23476269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw ra, 76(a5) 23486269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s1, 80(a5) 23496269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t3, 84(a5) 23506269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t2, 88(a5) 23516269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t1, 92(a5) 235214c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a7, 112(a5) 235314c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw s0, 116(a5) 235414c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a3, 120(a5) 23556269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw a0, 124(a5) 235614c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a6, 96(a5) 235714c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a4, 100(a5) 235814c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a2, 104(a5) 235914c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a1, 108(a5) 23606269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw a0, 124(a5) 236114c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a3, 120(a5) 236214c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw s0, 116(a5) 236314c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a7, 112(a5) 236414c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a1, 108(a5) 236514c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a2, 104(a5) 236614c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a4, 100(a5) 236714c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a6, 96(a5) 23686269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t1, 92(a5) 23696269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t2, 88(a5) 23706269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t3, 84(a5) 23716269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s1, 80(a5) 23726269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw ra, 76(a5) 23736269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s11, 72(a5) 23746269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s10, 68(a5) 23756269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s9, 64(a5) 23766269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s8, 60(a5) 23776269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s7, 56(a5) 23786269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s6, 52(a5) 23796269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s5, 48(a5) 23806269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s4, 44(a5) 23816269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s3, 40(a5) 23826269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s2, 36(a5) 23836269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t6, 32(a5) 23846269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t5, 28(a5) 23856269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t4, 24(a5) 23866269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 8(sp) # 8-byte Folded Reload 23876269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw a0, 20(a5) 23886269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 16(sp) # 8-byte Folded Reload 23896269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw a0, 16(a5) 23906269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 24(sp) # 8-byte Folded Reload 239114c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+12)(t0) 23926269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 32(sp) # 8-byte Folded Reload 239314c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+8)(t0) 23946269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 40(sp) # 8-byte Folded Reload 239514c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+4)(t0) 23966269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 48(sp) # 8-byte Folded Reload 239714c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a0, %lo(var_test_irq)(t0) 23986269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t0, 168(sp) # 8-byte Folded Reload 23996269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t1, 160(sp) # 8-byte Folded Reload 24006269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t2, 152(sp) # 8-byte Folded Reload 24016269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 144(sp) # 8-byte Folded Reload 24026269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a1, 136(sp) # 8-byte Folded Reload 24036269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a2, 128(sp) # 8-byte Folded Reload 24046269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a3, 120(sp) # 8-byte Folded Reload 24056269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a4, 112(sp) # 8-byte Folded Reload 24066269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a5, 104(sp) # 8-byte Folded Reload 24076269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a6, 96(sp) # 8-byte Folded Reload 24086269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a7, 88(sp) # 8-byte Folded Reload 24096269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t3, 80(sp) # 8-byte Folded Reload 24106269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t4, 72(sp) # 8-byte Folded Reload 24116269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t5, 64(sp) # 8-byte Folded Reload 24126269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld t6, 56(sp) # 8-byte Folded Reload 24136269ed24SWuXinlong; RV64IZCMP-SR-NEXT: addi sp, sp, 128 24146269ed24SWuXinlong; RV64IZCMP-SR-NEXT: cm.pop {ra, s0-s11}, 160 24156269ed24SWuXinlong; RV64IZCMP-SR-NEXT: mret 24166269ed24SWuXinlong; 24176269ed24SWuXinlong; RV32I-LABEL: callee_with_irq: 24186269ed24SWuXinlong; RV32I: # %bb.0: 24196269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -144 24206269ed24SWuXinlong; RV32I-NEXT: sw ra, 140(sp) # 4-byte Folded Spill 24216269ed24SWuXinlong; RV32I-NEXT: sw t0, 136(sp) # 4-byte Folded Spill 24226269ed24SWuXinlong; RV32I-NEXT: sw t1, 132(sp) # 4-byte Folded Spill 24236269ed24SWuXinlong; RV32I-NEXT: sw t2, 128(sp) # 4-byte Folded Spill 24246269ed24SWuXinlong; RV32I-NEXT: sw s0, 124(sp) # 4-byte Folded Spill 24256269ed24SWuXinlong; RV32I-NEXT: sw s1, 120(sp) # 4-byte Folded Spill 24266269ed24SWuXinlong; RV32I-NEXT: sw a0, 116(sp) # 4-byte Folded Spill 24276269ed24SWuXinlong; RV32I-NEXT: sw a1, 112(sp) # 4-byte Folded Spill 24286269ed24SWuXinlong; RV32I-NEXT: sw a2, 108(sp) # 4-byte Folded Spill 24296269ed24SWuXinlong; RV32I-NEXT: sw a3, 104(sp) # 4-byte Folded Spill 24306269ed24SWuXinlong; RV32I-NEXT: sw a4, 100(sp) # 4-byte Folded Spill 24316269ed24SWuXinlong; RV32I-NEXT: sw a5, 96(sp) # 4-byte Folded Spill 24326269ed24SWuXinlong; RV32I-NEXT: sw a6, 92(sp) # 4-byte Folded Spill 24336269ed24SWuXinlong; RV32I-NEXT: sw a7, 88(sp) # 4-byte Folded Spill 24346269ed24SWuXinlong; RV32I-NEXT: sw s2, 84(sp) # 4-byte Folded Spill 24356269ed24SWuXinlong; RV32I-NEXT: sw s3, 80(sp) # 4-byte Folded Spill 24366269ed24SWuXinlong; RV32I-NEXT: sw s4, 76(sp) # 4-byte Folded Spill 24376269ed24SWuXinlong; RV32I-NEXT: sw s5, 72(sp) # 4-byte Folded Spill 24386269ed24SWuXinlong; RV32I-NEXT: sw s6, 68(sp) # 4-byte Folded Spill 24396269ed24SWuXinlong; RV32I-NEXT: sw s7, 64(sp) # 4-byte Folded Spill 24406269ed24SWuXinlong; RV32I-NEXT: sw s8, 60(sp) # 4-byte Folded Spill 24416269ed24SWuXinlong; RV32I-NEXT: sw s9, 56(sp) # 4-byte Folded Spill 24426269ed24SWuXinlong; RV32I-NEXT: sw s10, 52(sp) # 4-byte Folded Spill 24436269ed24SWuXinlong; RV32I-NEXT: sw s11, 48(sp) # 4-byte Folded Spill 24446269ed24SWuXinlong; RV32I-NEXT: sw t3, 44(sp) # 4-byte Folded Spill 24456269ed24SWuXinlong; RV32I-NEXT: sw t4, 40(sp) # 4-byte Folded Spill 24466269ed24SWuXinlong; RV32I-NEXT: sw t5, 36(sp) # 4-byte Folded Spill 24476269ed24SWuXinlong; RV32I-NEXT: sw t6, 32(sp) # 4-byte Folded Spill 244814c4f28eSAlex Bradbury; RV32I-NEXT: lui a7, %hi(var_test_irq) 244914c4f28eSAlex Bradbury; RV32I-NEXT: lw a0, %lo(var_test_irq)(a7) 24506269ed24SWuXinlong; RV32I-NEXT: sw a0, 28(sp) # 4-byte Folded Spill 245114c4f28eSAlex Bradbury; RV32I-NEXT: lw a0, %lo(var_test_irq+4)(a7) 24526269ed24SWuXinlong; RV32I-NEXT: sw a0, 24(sp) # 4-byte Folded Spill 245314c4f28eSAlex Bradbury; RV32I-NEXT: lw a0, %lo(var_test_irq+8)(a7) 24546269ed24SWuXinlong; RV32I-NEXT: sw a0, 20(sp) # 4-byte Folded Spill 245514c4f28eSAlex Bradbury; RV32I-NEXT: lw a0, %lo(var_test_irq+12)(a7) 24566269ed24SWuXinlong; RV32I-NEXT: sw a0, 16(sp) # 4-byte Folded Spill 245714c4f28eSAlex Bradbury; RV32I-NEXT: addi a5, a7, %lo(var_test_irq) 24586269ed24SWuXinlong; RV32I-NEXT: lw a0, 16(a5) 24596269ed24SWuXinlong; RV32I-NEXT: sw a0, 12(sp) # 4-byte Folded Spill 24606269ed24SWuXinlong; RV32I-NEXT: lw a0, 20(a5) 24616269ed24SWuXinlong; RV32I-NEXT: sw a0, 8(sp) # 4-byte Folded Spill 24626269ed24SWuXinlong; RV32I-NEXT: lw t0, 24(a5) 24636269ed24SWuXinlong; RV32I-NEXT: lw t1, 28(a5) 24646269ed24SWuXinlong; RV32I-NEXT: lw t2, 32(a5) 24656269ed24SWuXinlong; RV32I-NEXT: lw t3, 36(a5) 24666269ed24SWuXinlong; RV32I-NEXT: lw t4, 40(a5) 24676269ed24SWuXinlong; RV32I-NEXT: lw t5, 44(a5) 24686269ed24SWuXinlong; RV32I-NEXT: lw t6, 48(a5) 24696269ed24SWuXinlong; RV32I-NEXT: lw s0, 52(a5) 24706269ed24SWuXinlong; RV32I-NEXT: lw s1, 56(a5) 24716269ed24SWuXinlong; RV32I-NEXT: lw s2, 60(a5) 24726269ed24SWuXinlong; RV32I-NEXT: lw s3, 64(a5) 24736269ed24SWuXinlong; RV32I-NEXT: lw s4, 68(a5) 24746269ed24SWuXinlong; RV32I-NEXT: lw s5, 72(a5) 24756269ed24SWuXinlong; RV32I-NEXT: lw s6, 76(a5) 24766269ed24SWuXinlong; RV32I-NEXT: lw s7, 80(a5) 24776269ed24SWuXinlong; RV32I-NEXT: lw s8, 84(a5) 24786269ed24SWuXinlong; RV32I-NEXT: lw s9, 88(a5) 24796269ed24SWuXinlong; RV32I-NEXT: lw s10, 92(a5) 248014c4f28eSAlex Bradbury; RV32I-NEXT: lw s11, 112(a5) 248114c4f28eSAlex Bradbury; RV32I-NEXT: lw ra, 116(a5) 248214c4f28eSAlex Bradbury; RV32I-NEXT: lw a3, 120(a5) 24836269ed24SWuXinlong; RV32I-NEXT: lw a0, 124(a5) 248414c4f28eSAlex Bradbury; RV32I-NEXT: lw a6, 96(a5) 248514c4f28eSAlex Bradbury; RV32I-NEXT: lw a4, 100(a5) 248614c4f28eSAlex Bradbury; RV32I-NEXT: lw a2, 104(a5) 248714c4f28eSAlex Bradbury; RV32I-NEXT: lw a1, 108(a5) 24886269ed24SWuXinlong; RV32I-NEXT: sw a0, 124(a5) 248914c4f28eSAlex Bradbury; RV32I-NEXT: sw a3, 120(a5) 249014c4f28eSAlex Bradbury; RV32I-NEXT: sw ra, 116(a5) 249114c4f28eSAlex Bradbury; RV32I-NEXT: sw s11, 112(a5) 249214c4f28eSAlex Bradbury; RV32I-NEXT: sw a1, 108(a5) 249314c4f28eSAlex Bradbury; RV32I-NEXT: sw a2, 104(a5) 249414c4f28eSAlex Bradbury; RV32I-NEXT: sw a4, 100(a5) 249514c4f28eSAlex Bradbury; RV32I-NEXT: sw a6, 96(a5) 24966269ed24SWuXinlong; RV32I-NEXT: sw s10, 92(a5) 24976269ed24SWuXinlong; RV32I-NEXT: sw s9, 88(a5) 24986269ed24SWuXinlong; RV32I-NEXT: sw s8, 84(a5) 24996269ed24SWuXinlong; RV32I-NEXT: sw s7, 80(a5) 25006269ed24SWuXinlong; RV32I-NEXT: sw s6, 76(a5) 25016269ed24SWuXinlong; RV32I-NEXT: sw s5, 72(a5) 25026269ed24SWuXinlong; RV32I-NEXT: sw s4, 68(a5) 25036269ed24SWuXinlong; RV32I-NEXT: sw s3, 64(a5) 25046269ed24SWuXinlong; RV32I-NEXT: sw s2, 60(a5) 25056269ed24SWuXinlong; RV32I-NEXT: sw s1, 56(a5) 25066269ed24SWuXinlong; RV32I-NEXT: sw s0, 52(a5) 25076269ed24SWuXinlong; RV32I-NEXT: sw t6, 48(a5) 25086269ed24SWuXinlong; RV32I-NEXT: sw t5, 44(a5) 25096269ed24SWuXinlong; RV32I-NEXT: sw t4, 40(a5) 25106269ed24SWuXinlong; RV32I-NEXT: sw t3, 36(a5) 25116269ed24SWuXinlong; RV32I-NEXT: sw t2, 32(a5) 25126269ed24SWuXinlong; RV32I-NEXT: sw t1, 28(a5) 25136269ed24SWuXinlong; RV32I-NEXT: sw t0, 24(a5) 25146269ed24SWuXinlong; RV32I-NEXT: lw a0, 8(sp) # 4-byte Folded Reload 25156269ed24SWuXinlong; RV32I-NEXT: sw a0, 20(a5) 25166269ed24SWuXinlong; RV32I-NEXT: lw a0, 12(sp) # 4-byte Folded Reload 25176269ed24SWuXinlong; RV32I-NEXT: sw a0, 16(a5) 25186269ed24SWuXinlong; RV32I-NEXT: lw a0, 16(sp) # 4-byte Folded Reload 251914c4f28eSAlex Bradbury; RV32I-NEXT: sw a0, %lo(var_test_irq+12)(a7) 25206269ed24SWuXinlong; RV32I-NEXT: lw a0, 20(sp) # 4-byte Folded Reload 252114c4f28eSAlex Bradbury; RV32I-NEXT: sw a0, %lo(var_test_irq+8)(a7) 25226269ed24SWuXinlong; RV32I-NEXT: lw a0, 24(sp) # 4-byte Folded Reload 252314c4f28eSAlex Bradbury; RV32I-NEXT: sw a0, %lo(var_test_irq+4)(a7) 25246269ed24SWuXinlong; RV32I-NEXT: lw a0, 28(sp) # 4-byte Folded Reload 252514c4f28eSAlex Bradbury; RV32I-NEXT: sw a0, %lo(var_test_irq)(a7) 25266269ed24SWuXinlong; RV32I-NEXT: lw ra, 140(sp) # 4-byte Folded Reload 25276269ed24SWuXinlong; RV32I-NEXT: lw t0, 136(sp) # 4-byte Folded Reload 25286269ed24SWuXinlong; RV32I-NEXT: lw t1, 132(sp) # 4-byte Folded Reload 25296269ed24SWuXinlong; RV32I-NEXT: lw t2, 128(sp) # 4-byte Folded Reload 25306269ed24SWuXinlong; RV32I-NEXT: lw s0, 124(sp) # 4-byte Folded Reload 25316269ed24SWuXinlong; RV32I-NEXT: lw s1, 120(sp) # 4-byte Folded Reload 25326269ed24SWuXinlong; RV32I-NEXT: lw a0, 116(sp) # 4-byte Folded Reload 25336269ed24SWuXinlong; RV32I-NEXT: lw a1, 112(sp) # 4-byte Folded Reload 25346269ed24SWuXinlong; RV32I-NEXT: lw a2, 108(sp) # 4-byte Folded Reload 25356269ed24SWuXinlong; RV32I-NEXT: lw a3, 104(sp) # 4-byte Folded Reload 25366269ed24SWuXinlong; RV32I-NEXT: lw a4, 100(sp) # 4-byte Folded Reload 25376269ed24SWuXinlong; RV32I-NEXT: lw a5, 96(sp) # 4-byte Folded Reload 25386269ed24SWuXinlong; RV32I-NEXT: lw a6, 92(sp) # 4-byte Folded Reload 25396269ed24SWuXinlong; RV32I-NEXT: lw a7, 88(sp) # 4-byte Folded Reload 25406269ed24SWuXinlong; RV32I-NEXT: lw s2, 84(sp) # 4-byte Folded Reload 25416269ed24SWuXinlong; RV32I-NEXT: lw s3, 80(sp) # 4-byte Folded Reload 25426269ed24SWuXinlong; RV32I-NEXT: lw s4, 76(sp) # 4-byte Folded Reload 25436269ed24SWuXinlong; RV32I-NEXT: lw s5, 72(sp) # 4-byte Folded Reload 25446269ed24SWuXinlong; RV32I-NEXT: lw s6, 68(sp) # 4-byte Folded Reload 25456269ed24SWuXinlong; RV32I-NEXT: lw s7, 64(sp) # 4-byte Folded Reload 25466269ed24SWuXinlong; RV32I-NEXT: lw s8, 60(sp) # 4-byte Folded Reload 25476269ed24SWuXinlong; RV32I-NEXT: lw s9, 56(sp) # 4-byte Folded Reload 25486269ed24SWuXinlong; RV32I-NEXT: lw s10, 52(sp) # 4-byte Folded Reload 25496269ed24SWuXinlong; RV32I-NEXT: lw s11, 48(sp) # 4-byte Folded Reload 25506269ed24SWuXinlong; RV32I-NEXT: lw t3, 44(sp) # 4-byte Folded Reload 25516269ed24SWuXinlong; RV32I-NEXT: lw t4, 40(sp) # 4-byte Folded Reload 25526269ed24SWuXinlong; RV32I-NEXT: lw t5, 36(sp) # 4-byte Folded Reload 25536269ed24SWuXinlong; RV32I-NEXT: lw t6, 32(sp) # 4-byte Folded Reload 25546269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 144 25556269ed24SWuXinlong; RV32I-NEXT: mret 25566269ed24SWuXinlong; 25576269ed24SWuXinlong; RV64I-LABEL: callee_with_irq: 25586269ed24SWuXinlong; RV64I: # %bb.0: 25596269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -272 25606269ed24SWuXinlong; RV64I-NEXT: sd ra, 264(sp) # 8-byte Folded Spill 25616269ed24SWuXinlong; RV64I-NEXT: sd t0, 256(sp) # 8-byte Folded Spill 25626269ed24SWuXinlong; RV64I-NEXT: sd t1, 248(sp) # 8-byte Folded Spill 25636269ed24SWuXinlong; RV64I-NEXT: sd t2, 240(sp) # 8-byte Folded Spill 25646269ed24SWuXinlong; RV64I-NEXT: sd s0, 232(sp) # 8-byte Folded Spill 25656269ed24SWuXinlong; RV64I-NEXT: sd s1, 224(sp) # 8-byte Folded Spill 25666269ed24SWuXinlong; RV64I-NEXT: sd a0, 216(sp) # 8-byte Folded Spill 25676269ed24SWuXinlong; RV64I-NEXT: sd a1, 208(sp) # 8-byte Folded Spill 25686269ed24SWuXinlong; RV64I-NEXT: sd a2, 200(sp) # 8-byte Folded Spill 25696269ed24SWuXinlong; RV64I-NEXT: sd a3, 192(sp) # 8-byte Folded Spill 25706269ed24SWuXinlong; RV64I-NEXT: sd a4, 184(sp) # 8-byte Folded Spill 25716269ed24SWuXinlong; RV64I-NEXT: sd a5, 176(sp) # 8-byte Folded Spill 25726269ed24SWuXinlong; RV64I-NEXT: sd a6, 168(sp) # 8-byte Folded Spill 25736269ed24SWuXinlong; RV64I-NEXT: sd a7, 160(sp) # 8-byte Folded Spill 25746269ed24SWuXinlong; RV64I-NEXT: sd s2, 152(sp) # 8-byte Folded Spill 25756269ed24SWuXinlong; RV64I-NEXT: sd s3, 144(sp) # 8-byte Folded Spill 25766269ed24SWuXinlong; RV64I-NEXT: sd s4, 136(sp) # 8-byte Folded Spill 25776269ed24SWuXinlong; RV64I-NEXT: sd s5, 128(sp) # 8-byte Folded Spill 25786269ed24SWuXinlong; RV64I-NEXT: sd s6, 120(sp) # 8-byte Folded Spill 25796269ed24SWuXinlong; RV64I-NEXT: sd s7, 112(sp) # 8-byte Folded Spill 25806269ed24SWuXinlong; RV64I-NEXT: sd s8, 104(sp) # 8-byte Folded Spill 25816269ed24SWuXinlong; RV64I-NEXT: sd s9, 96(sp) # 8-byte Folded Spill 25826269ed24SWuXinlong; RV64I-NEXT: sd s10, 88(sp) # 8-byte Folded Spill 25836269ed24SWuXinlong; RV64I-NEXT: sd s11, 80(sp) # 8-byte Folded Spill 25846269ed24SWuXinlong; RV64I-NEXT: sd t3, 72(sp) # 8-byte Folded Spill 25856269ed24SWuXinlong; RV64I-NEXT: sd t4, 64(sp) # 8-byte Folded Spill 25866269ed24SWuXinlong; RV64I-NEXT: sd t5, 56(sp) # 8-byte Folded Spill 25876269ed24SWuXinlong; RV64I-NEXT: sd t6, 48(sp) # 8-byte Folded Spill 258814c4f28eSAlex Bradbury; RV64I-NEXT: lui a7, %hi(var_test_irq) 258914c4f28eSAlex Bradbury; RV64I-NEXT: lw a0, %lo(var_test_irq)(a7) 25906269ed24SWuXinlong; RV64I-NEXT: sd a0, 40(sp) # 8-byte Folded Spill 259114c4f28eSAlex Bradbury; RV64I-NEXT: lw a0, %lo(var_test_irq+4)(a7) 25926269ed24SWuXinlong; RV64I-NEXT: sd a0, 32(sp) # 8-byte Folded Spill 259314c4f28eSAlex Bradbury; RV64I-NEXT: lw a0, %lo(var_test_irq+8)(a7) 25946269ed24SWuXinlong; RV64I-NEXT: sd a0, 24(sp) # 8-byte Folded Spill 259514c4f28eSAlex Bradbury; RV64I-NEXT: lw a0, %lo(var_test_irq+12)(a7) 25966269ed24SWuXinlong; RV64I-NEXT: sd a0, 16(sp) # 8-byte Folded Spill 259714c4f28eSAlex Bradbury; RV64I-NEXT: addi a5, a7, %lo(var_test_irq) 25986269ed24SWuXinlong; RV64I-NEXT: lw a0, 16(a5) 25996269ed24SWuXinlong; RV64I-NEXT: sd a0, 8(sp) # 8-byte Folded Spill 26006269ed24SWuXinlong; RV64I-NEXT: lw a0, 20(a5) 26016269ed24SWuXinlong; RV64I-NEXT: sd a0, 0(sp) # 8-byte Folded Spill 26026269ed24SWuXinlong; RV64I-NEXT: lw t0, 24(a5) 26036269ed24SWuXinlong; RV64I-NEXT: lw t1, 28(a5) 26046269ed24SWuXinlong; RV64I-NEXT: lw t2, 32(a5) 26056269ed24SWuXinlong; RV64I-NEXT: lw t3, 36(a5) 26066269ed24SWuXinlong; RV64I-NEXT: lw t4, 40(a5) 26076269ed24SWuXinlong; RV64I-NEXT: lw t5, 44(a5) 26086269ed24SWuXinlong; RV64I-NEXT: lw t6, 48(a5) 26096269ed24SWuXinlong; RV64I-NEXT: lw s0, 52(a5) 26106269ed24SWuXinlong; RV64I-NEXT: lw s1, 56(a5) 26116269ed24SWuXinlong; RV64I-NEXT: lw s2, 60(a5) 26126269ed24SWuXinlong; RV64I-NEXT: lw s3, 64(a5) 26136269ed24SWuXinlong; RV64I-NEXT: lw s4, 68(a5) 26146269ed24SWuXinlong; RV64I-NEXT: lw s5, 72(a5) 26156269ed24SWuXinlong; RV64I-NEXT: lw s6, 76(a5) 26166269ed24SWuXinlong; RV64I-NEXT: lw s7, 80(a5) 26176269ed24SWuXinlong; RV64I-NEXT: lw s8, 84(a5) 26186269ed24SWuXinlong; RV64I-NEXT: lw s9, 88(a5) 26196269ed24SWuXinlong; RV64I-NEXT: lw s10, 92(a5) 262014c4f28eSAlex Bradbury; RV64I-NEXT: lw s11, 112(a5) 262114c4f28eSAlex Bradbury; RV64I-NEXT: lw ra, 116(a5) 262214c4f28eSAlex Bradbury; RV64I-NEXT: lw a3, 120(a5) 26236269ed24SWuXinlong; RV64I-NEXT: lw a0, 124(a5) 262414c4f28eSAlex Bradbury; RV64I-NEXT: lw a6, 96(a5) 262514c4f28eSAlex Bradbury; RV64I-NEXT: lw a4, 100(a5) 262614c4f28eSAlex Bradbury; RV64I-NEXT: lw a2, 104(a5) 262714c4f28eSAlex Bradbury; RV64I-NEXT: lw a1, 108(a5) 26286269ed24SWuXinlong; RV64I-NEXT: sw a0, 124(a5) 262914c4f28eSAlex Bradbury; RV64I-NEXT: sw a3, 120(a5) 263014c4f28eSAlex Bradbury; RV64I-NEXT: sw ra, 116(a5) 263114c4f28eSAlex Bradbury; RV64I-NEXT: sw s11, 112(a5) 263214c4f28eSAlex Bradbury; RV64I-NEXT: sw a1, 108(a5) 263314c4f28eSAlex Bradbury; RV64I-NEXT: sw a2, 104(a5) 263414c4f28eSAlex Bradbury; RV64I-NEXT: sw a4, 100(a5) 263514c4f28eSAlex Bradbury; RV64I-NEXT: sw a6, 96(a5) 26366269ed24SWuXinlong; RV64I-NEXT: sw s10, 92(a5) 26376269ed24SWuXinlong; RV64I-NEXT: sw s9, 88(a5) 26386269ed24SWuXinlong; RV64I-NEXT: sw s8, 84(a5) 26396269ed24SWuXinlong; RV64I-NEXT: sw s7, 80(a5) 26406269ed24SWuXinlong; RV64I-NEXT: sw s6, 76(a5) 26416269ed24SWuXinlong; RV64I-NEXT: sw s5, 72(a5) 26426269ed24SWuXinlong; RV64I-NEXT: sw s4, 68(a5) 26436269ed24SWuXinlong; RV64I-NEXT: sw s3, 64(a5) 26446269ed24SWuXinlong; RV64I-NEXT: sw s2, 60(a5) 26456269ed24SWuXinlong; RV64I-NEXT: sw s1, 56(a5) 26466269ed24SWuXinlong; RV64I-NEXT: sw s0, 52(a5) 26476269ed24SWuXinlong; RV64I-NEXT: sw t6, 48(a5) 26486269ed24SWuXinlong; RV64I-NEXT: sw t5, 44(a5) 26496269ed24SWuXinlong; RV64I-NEXT: sw t4, 40(a5) 26506269ed24SWuXinlong; RV64I-NEXT: sw t3, 36(a5) 26516269ed24SWuXinlong; RV64I-NEXT: sw t2, 32(a5) 26526269ed24SWuXinlong; RV64I-NEXT: sw t1, 28(a5) 26536269ed24SWuXinlong; RV64I-NEXT: sw t0, 24(a5) 26546269ed24SWuXinlong; RV64I-NEXT: ld a0, 0(sp) # 8-byte Folded Reload 26556269ed24SWuXinlong; RV64I-NEXT: sw a0, 20(a5) 26566269ed24SWuXinlong; RV64I-NEXT: ld a0, 8(sp) # 8-byte Folded Reload 26576269ed24SWuXinlong; RV64I-NEXT: sw a0, 16(a5) 26586269ed24SWuXinlong; RV64I-NEXT: ld a0, 16(sp) # 8-byte Folded Reload 265914c4f28eSAlex Bradbury; RV64I-NEXT: sw a0, %lo(var_test_irq+12)(a7) 26606269ed24SWuXinlong; RV64I-NEXT: ld a0, 24(sp) # 8-byte Folded Reload 266114c4f28eSAlex Bradbury; RV64I-NEXT: sw a0, %lo(var_test_irq+8)(a7) 26626269ed24SWuXinlong; RV64I-NEXT: ld a0, 32(sp) # 8-byte Folded Reload 266314c4f28eSAlex Bradbury; RV64I-NEXT: sw a0, %lo(var_test_irq+4)(a7) 26646269ed24SWuXinlong; RV64I-NEXT: ld a0, 40(sp) # 8-byte Folded Reload 266514c4f28eSAlex Bradbury; RV64I-NEXT: sw a0, %lo(var_test_irq)(a7) 26666269ed24SWuXinlong; RV64I-NEXT: ld ra, 264(sp) # 8-byte Folded Reload 26676269ed24SWuXinlong; RV64I-NEXT: ld t0, 256(sp) # 8-byte Folded Reload 26686269ed24SWuXinlong; RV64I-NEXT: ld t1, 248(sp) # 8-byte Folded Reload 26696269ed24SWuXinlong; RV64I-NEXT: ld t2, 240(sp) # 8-byte Folded Reload 26706269ed24SWuXinlong; RV64I-NEXT: ld s0, 232(sp) # 8-byte Folded Reload 26716269ed24SWuXinlong; RV64I-NEXT: ld s1, 224(sp) # 8-byte Folded Reload 26726269ed24SWuXinlong; RV64I-NEXT: ld a0, 216(sp) # 8-byte Folded Reload 26736269ed24SWuXinlong; RV64I-NEXT: ld a1, 208(sp) # 8-byte Folded Reload 26746269ed24SWuXinlong; RV64I-NEXT: ld a2, 200(sp) # 8-byte Folded Reload 26756269ed24SWuXinlong; RV64I-NEXT: ld a3, 192(sp) # 8-byte Folded Reload 26766269ed24SWuXinlong; RV64I-NEXT: ld a4, 184(sp) # 8-byte Folded Reload 26776269ed24SWuXinlong; RV64I-NEXT: ld a5, 176(sp) # 8-byte Folded Reload 26786269ed24SWuXinlong; RV64I-NEXT: ld a6, 168(sp) # 8-byte Folded Reload 26796269ed24SWuXinlong; RV64I-NEXT: ld a7, 160(sp) # 8-byte Folded Reload 26806269ed24SWuXinlong; RV64I-NEXT: ld s2, 152(sp) # 8-byte Folded Reload 26816269ed24SWuXinlong; RV64I-NEXT: ld s3, 144(sp) # 8-byte Folded Reload 26826269ed24SWuXinlong; RV64I-NEXT: ld s4, 136(sp) # 8-byte Folded Reload 26836269ed24SWuXinlong; RV64I-NEXT: ld s5, 128(sp) # 8-byte Folded Reload 26846269ed24SWuXinlong; RV64I-NEXT: ld s6, 120(sp) # 8-byte Folded Reload 26856269ed24SWuXinlong; RV64I-NEXT: ld s7, 112(sp) # 8-byte Folded Reload 26866269ed24SWuXinlong; RV64I-NEXT: ld s8, 104(sp) # 8-byte Folded Reload 26876269ed24SWuXinlong; RV64I-NEXT: ld s9, 96(sp) # 8-byte Folded Reload 26886269ed24SWuXinlong; RV64I-NEXT: ld s10, 88(sp) # 8-byte Folded Reload 26896269ed24SWuXinlong; RV64I-NEXT: ld s11, 80(sp) # 8-byte Folded Reload 26906269ed24SWuXinlong; RV64I-NEXT: ld t3, 72(sp) # 8-byte Folded Reload 26916269ed24SWuXinlong; RV64I-NEXT: ld t4, 64(sp) # 8-byte Folded Reload 26926269ed24SWuXinlong; RV64I-NEXT: ld t5, 56(sp) # 8-byte Folded Reload 26936269ed24SWuXinlong; RV64I-NEXT: ld t6, 48(sp) # 8-byte Folded Reload 26946269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 272 26956269ed24SWuXinlong; RV64I-NEXT: mret 2696ff9af4c4SNikita Popov %val = load [32 x i32], ptr @var_test_irq 2697ff9af4c4SNikita Popov store volatile [32 x i32] %val, ptr @var_test_irq 26986269ed24SWuXinlong ret void 26996269ed24SWuXinlong} 27006269ed24SWuXinlong 27016269ed24SWuXinlongdefine void @callee_no_irq() nounwind{ 27026269ed24SWuXinlong; RV32IZCMP-LABEL: callee_no_irq: 27036269ed24SWuXinlong; RV32IZCMP: # %bb.0: 27046269ed24SWuXinlong; RV32IZCMP-NEXT: cm.push {ra, s0-s11}, -96 270514c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lui t0, %hi(var_test_irq) 270614c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a0, %lo(var_test_irq)(t0) 27076269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 28(sp) # 4-byte Folded Spill 270814c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a0, %lo(var_test_irq+4)(t0) 27096269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 24(sp) # 4-byte Folded Spill 271014c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a0, %lo(var_test_irq+8)(t0) 27116269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 20(sp) # 4-byte Folded Spill 271214c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a0, %lo(var_test_irq+12)(t0) 27136269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill 271414c4f28eSAlex Bradbury; RV32IZCMP-NEXT: addi a5, t0, %lo(var_test_irq) 27156269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 16(a5) 27166269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 12(sp) # 4-byte Folded Spill 27176269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 20(a5) 27186269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 8(sp) # 4-byte Folded Spill 27196269ed24SWuXinlong; RV32IZCMP-NEXT: lw t4, 24(a5) 27206269ed24SWuXinlong; RV32IZCMP-NEXT: lw t5, 28(a5) 27216269ed24SWuXinlong; RV32IZCMP-NEXT: lw t6, 32(a5) 27226269ed24SWuXinlong; RV32IZCMP-NEXT: lw s2, 36(a5) 27236269ed24SWuXinlong; RV32IZCMP-NEXT: lw s3, 40(a5) 27246269ed24SWuXinlong; RV32IZCMP-NEXT: lw s4, 44(a5) 27256269ed24SWuXinlong; RV32IZCMP-NEXT: lw s5, 48(a5) 27266269ed24SWuXinlong; RV32IZCMP-NEXT: lw s6, 52(a5) 27276269ed24SWuXinlong; RV32IZCMP-NEXT: lw s7, 56(a5) 27286269ed24SWuXinlong; RV32IZCMP-NEXT: lw s8, 60(a5) 27296269ed24SWuXinlong; RV32IZCMP-NEXT: lw s9, 64(a5) 27306269ed24SWuXinlong; RV32IZCMP-NEXT: lw s10, 68(a5) 27316269ed24SWuXinlong; RV32IZCMP-NEXT: lw s11, 72(a5) 27326269ed24SWuXinlong; RV32IZCMP-NEXT: lw ra, 76(a5) 27336269ed24SWuXinlong; RV32IZCMP-NEXT: lw s1, 80(a5) 27346269ed24SWuXinlong; RV32IZCMP-NEXT: lw t3, 84(a5) 27356269ed24SWuXinlong; RV32IZCMP-NEXT: lw t2, 88(a5) 27366269ed24SWuXinlong; RV32IZCMP-NEXT: lw t1, 92(a5) 273714c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a7, 112(a5) 273814c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw s0, 116(a5) 273914c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a3, 120(a5) 27406269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 124(a5) 274114c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a6, 96(a5) 274214c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a4, 100(a5) 274314c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a2, 104(a5) 274414c4f28eSAlex Bradbury; RV32IZCMP-NEXT: lw a1, 108(a5) 27456269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 124(a5) 274614c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a3, 120(a5) 274714c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw s0, 116(a5) 274814c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a7, 112(a5) 274914c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a1, 108(a5) 275014c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a2, 104(a5) 275114c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a4, 100(a5) 275214c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a6, 96(a5) 27536269ed24SWuXinlong; RV32IZCMP-NEXT: sw t1, 92(a5) 27546269ed24SWuXinlong; RV32IZCMP-NEXT: sw t2, 88(a5) 27556269ed24SWuXinlong; RV32IZCMP-NEXT: sw t3, 84(a5) 27566269ed24SWuXinlong; RV32IZCMP-NEXT: sw s1, 80(a5) 27576269ed24SWuXinlong; RV32IZCMP-NEXT: sw ra, 76(a5) 27586269ed24SWuXinlong; RV32IZCMP-NEXT: sw s11, 72(a5) 27596269ed24SWuXinlong; RV32IZCMP-NEXT: sw s10, 68(a5) 27606269ed24SWuXinlong; RV32IZCMP-NEXT: sw s9, 64(a5) 27616269ed24SWuXinlong; RV32IZCMP-NEXT: sw s8, 60(a5) 27626269ed24SWuXinlong; RV32IZCMP-NEXT: sw s7, 56(a5) 27636269ed24SWuXinlong; RV32IZCMP-NEXT: sw s6, 52(a5) 27646269ed24SWuXinlong; RV32IZCMP-NEXT: sw s5, 48(a5) 27656269ed24SWuXinlong; RV32IZCMP-NEXT: sw s4, 44(a5) 27666269ed24SWuXinlong; RV32IZCMP-NEXT: sw s3, 40(a5) 27676269ed24SWuXinlong; RV32IZCMP-NEXT: sw s2, 36(a5) 27686269ed24SWuXinlong; RV32IZCMP-NEXT: sw t6, 32(a5) 27696269ed24SWuXinlong; RV32IZCMP-NEXT: sw t5, 28(a5) 27706269ed24SWuXinlong; RV32IZCMP-NEXT: sw t4, 24(a5) 27716269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 8(sp) # 4-byte Folded Reload 27726269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 20(a5) 27736269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload 27746269ed24SWuXinlong; RV32IZCMP-NEXT: sw a0, 16(a5) 27756269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload 277614c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a0, %lo(var_test_irq+12)(t0) 27776269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload 277814c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a0, %lo(var_test_irq+8)(t0) 27796269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload 278014c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a0, %lo(var_test_irq+4)(t0) 27816269ed24SWuXinlong; RV32IZCMP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload 278214c4f28eSAlex Bradbury; RV32IZCMP-NEXT: sw a0, %lo(var_test_irq)(t0) 2783c0221e00SWuXinlong; RV32IZCMP-NEXT: cm.popret {ra, s0-s11}, 96 27846269ed24SWuXinlong; 27856269ed24SWuXinlong; RV64IZCMP-LABEL: callee_no_irq: 27866269ed24SWuXinlong; RV64IZCMP: # %bb.0: 27876269ed24SWuXinlong; RV64IZCMP-NEXT: cm.push {ra, s0-s11}, -160 278814c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lui t0, %hi(var_test_irq) 278914c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a0, %lo(var_test_irq)(t0) 27906269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 40(sp) # 8-byte Folded Spill 279114c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a0, %lo(var_test_irq+4)(t0) 27926269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 32(sp) # 8-byte Folded Spill 279314c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a0, %lo(var_test_irq+8)(t0) 27946269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 24(sp) # 8-byte Folded Spill 279514c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a0, %lo(var_test_irq+12)(t0) 27966269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 16(sp) # 8-byte Folded Spill 279714c4f28eSAlex Bradbury; RV64IZCMP-NEXT: addi a5, t0, %lo(var_test_irq) 27986269ed24SWuXinlong; RV64IZCMP-NEXT: lw a0, 16(a5) 27996269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 8(sp) # 8-byte Folded Spill 28006269ed24SWuXinlong; RV64IZCMP-NEXT: lw a0, 20(a5) 28016269ed24SWuXinlong; RV64IZCMP-NEXT: sd a0, 0(sp) # 8-byte Folded Spill 28026269ed24SWuXinlong; RV64IZCMP-NEXT: lw t4, 24(a5) 28036269ed24SWuXinlong; RV64IZCMP-NEXT: lw t5, 28(a5) 28046269ed24SWuXinlong; RV64IZCMP-NEXT: lw t6, 32(a5) 28056269ed24SWuXinlong; RV64IZCMP-NEXT: lw s2, 36(a5) 28066269ed24SWuXinlong; RV64IZCMP-NEXT: lw s3, 40(a5) 28076269ed24SWuXinlong; RV64IZCMP-NEXT: lw s4, 44(a5) 28086269ed24SWuXinlong; RV64IZCMP-NEXT: lw s5, 48(a5) 28096269ed24SWuXinlong; RV64IZCMP-NEXT: lw s6, 52(a5) 28106269ed24SWuXinlong; RV64IZCMP-NEXT: lw s7, 56(a5) 28116269ed24SWuXinlong; RV64IZCMP-NEXT: lw s8, 60(a5) 28126269ed24SWuXinlong; RV64IZCMP-NEXT: lw s9, 64(a5) 28136269ed24SWuXinlong; RV64IZCMP-NEXT: lw s10, 68(a5) 28146269ed24SWuXinlong; RV64IZCMP-NEXT: lw s11, 72(a5) 28156269ed24SWuXinlong; RV64IZCMP-NEXT: lw ra, 76(a5) 28166269ed24SWuXinlong; RV64IZCMP-NEXT: lw s1, 80(a5) 28176269ed24SWuXinlong; RV64IZCMP-NEXT: lw t3, 84(a5) 28186269ed24SWuXinlong; RV64IZCMP-NEXT: lw t2, 88(a5) 28196269ed24SWuXinlong; RV64IZCMP-NEXT: lw t1, 92(a5) 282014c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a7, 112(a5) 282114c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw s0, 116(a5) 282214c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a3, 120(a5) 28236269ed24SWuXinlong; RV64IZCMP-NEXT: lw a0, 124(a5) 282414c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a6, 96(a5) 282514c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a4, 100(a5) 282614c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a2, 104(a5) 282714c4f28eSAlex Bradbury; RV64IZCMP-NEXT: lw a1, 108(a5) 28286269ed24SWuXinlong; RV64IZCMP-NEXT: sw a0, 124(a5) 282914c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a3, 120(a5) 283014c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw s0, 116(a5) 283114c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a7, 112(a5) 283214c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a1, 108(a5) 283314c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a2, 104(a5) 283414c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a4, 100(a5) 283514c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a6, 96(a5) 28366269ed24SWuXinlong; RV64IZCMP-NEXT: sw t1, 92(a5) 28376269ed24SWuXinlong; RV64IZCMP-NEXT: sw t2, 88(a5) 28386269ed24SWuXinlong; RV64IZCMP-NEXT: sw t3, 84(a5) 28396269ed24SWuXinlong; RV64IZCMP-NEXT: sw s1, 80(a5) 28406269ed24SWuXinlong; RV64IZCMP-NEXT: sw ra, 76(a5) 28416269ed24SWuXinlong; RV64IZCMP-NEXT: sw s11, 72(a5) 28426269ed24SWuXinlong; RV64IZCMP-NEXT: sw s10, 68(a5) 28436269ed24SWuXinlong; RV64IZCMP-NEXT: sw s9, 64(a5) 28446269ed24SWuXinlong; RV64IZCMP-NEXT: sw s8, 60(a5) 28456269ed24SWuXinlong; RV64IZCMP-NEXT: sw s7, 56(a5) 28466269ed24SWuXinlong; RV64IZCMP-NEXT: sw s6, 52(a5) 28476269ed24SWuXinlong; RV64IZCMP-NEXT: sw s5, 48(a5) 28486269ed24SWuXinlong; RV64IZCMP-NEXT: sw s4, 44(a5) 28496269ed24SWuXinlong; RV64IZCMP-NEXT: sw s3, 40(a5) 28506269ed24SWuXinlong; RV64IZCMP-NEXT: sw s2, 36(a5) 28516269ed24SWuXinlong; RV64IZCMP-NEXT: sw t6, 32(a5) 28526269ed24SWuXinlong; RV64IZCMP-NEXT: sw t5, 28(a5) 28536269ed24SWuXinlong; RV64IZCMP-NEXT: sw t4, 24(a5) 28546269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 0(sp) # 8-byte Folded Reload 28556269ed24SWuXinlong; RV64IZCMP-NEXT: sw a0, 20(a5) 28566269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 8(sp) # 8-byte Folded Reload 28576269ed24SWuXinlong; RV64IZCMP-NEXT: sw a0, 16(a5) 28586269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 16(sp) # 8-byte Folded Reload 285914c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a0, %lo(var_test_irq+12)(t0) 28606269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 24(sp) # 8-byte Folded Reload 286114c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a0, %lo(var_test_irq+8)(t0) 28626269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 32(sp) # 8-byte Folded Reload 286314c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a0, %lo(var_test_irq+4)(t0) 28646269ed24SWuXinlong; RV64IZCMP-NEXT: ld a0, 40(sp) # 8-byte Folded Reload 286514c4f28eSAlex Bradbury; RV64IZCMP-NEXT: sw a0, %lo(var_test_irq)(t0) 2866c0221e00SWuXinlong; RV64IZCMP-NEXT: cm.popret {ra, s0-s11}, 160 28676269ed24SWuXinlong; 28686269ed24SWuXinlong; RV32IZCMP-SR-LABEL: callee_no_irq: 28696269ed24SWuXinlong; RV32IZCMP-SR: # %bb.0: 2870ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.push {ra, s0-s11}, -96 287114c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lui t0, %hi(var_test_irq) 287214c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a0, %lo(var_test_irq)(t0) 28736269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 28(sp) # 4-byte Folded Spill 287414c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+4)(t0) 28756269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 24(sp) # 4-byte Folded Spill 287614c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+8)(t0) 28776269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 20(sp) # 4-byte Folded Spill 287814c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+12)(t0) 28796269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 16(sp) # 4-byte Folded Spill 288014c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: addi a5, t0, %lo(var_test_irq) 28816269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 16(a5) 28826269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 12(sp) # 4-byte Folded Spill 28836269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 20(a5) 28846269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 8(sp) # 4-byte Folded Spill 28856269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t4, 24(a5) 28866269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t5, 28(a5) 28876269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t6, 32(a5) 28886269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s2, 36(a5) 28896269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s3, 40(a5) 28906269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s4, 44(a5) 28916269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s5, 48(a5) 28926269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s6, 52(a5) 28936269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s7, 56(a5) 28946269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s8, 60(a5) 28956269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s9, 64(a5) 28966269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s10, 68(a5) 28976269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s11, 72(a5) 28986269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw ra, 76(a5) 28996269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw s1, 80(a5) 29006269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t3, 84(a5) 29016269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t2, 88(a5) 29026269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw t1, 92(a5) 290314c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a7, 112(a5) 290414c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw s0, 116(a5) 290514c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a3, 120(a5) 29066269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 124(a5) 290714c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a6, 96(a5) 290814c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a4, 100(a5) 290914c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a2, 104(a5) 291014c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: lw a1, 108(a5) 29116269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 124(a5) 291214c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a3, 120(a5) 291314c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw s0, 116(a5) 291414c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a7, 112(a5) 291514c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a1, 108(a5) 291614c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a2, 104(a5) 291714c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a4, 100(a5) 291814c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a6, 96(a5) 29196269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t1, 92(a5) 29206269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t2, 88(a5) 29216269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t3, 84(a5) 29226269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s1, 80(a5) 29236269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw ra, 76(a5) 29246269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s11, 72(a5) 29256269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s10, 68(a5) 29266269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s9, 64(a5) 29276269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s8, 60(a5) 29286269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s7, 56(a5) 29296269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s6, 52(a5) 29306269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s5, 48(a5) 29316269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s4, 44(a5) 29326269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s3, 40(a5) 29336269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw s2, 36(a5) 29346269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t6, 32(a5) 29356269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t5, 28(a5) 29366269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw t4, 24(a5) 29376269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 8(sp) # 4-byte Folded Reload 29386269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 20(a5) 29396269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 12(sp) # 4-byte Folded Reload 29406269ed24SWuXinlong; RV32IZCMP-SR-NEXT: sw a0, 16(a5) 29416269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 16(sp) # 4-byte Folded Reload 294214c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+12)(t0) 29436269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 20(sp) # 4-byte Folded Reload 294414c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+8)(t0) 29456269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 24(sp) # 4-byte Folded Reload 294614c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+4)(t0) 29476269ed24SWuXinlong; RV32IZCMP-SR-NEXT: lw a0, 28(sp) # 4-byte Folded Reload 294814c4f28eSAlex Bradbury; RV32IZCMP-SR-NEXT: sw a0, %lo(var_test_irq)(t0) 2949ab94fbbaSYeting Kuo; RV32IZCMP-SR-NEXT: cm.popret {ra, s0-s11}, 96 29506269ed24SWuXinlong; 29516269ed24SWuXinlong; RV64IZCMP-SR-LABEL: callee_no_irq: 29526269ed24SWuXinlong; RV64IZCMP-SR: # %bb.0: 2953ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.push {ra, s0-s11}, -160 295414c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lui t0, %hi(var_test_irq) 295514c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a0, %lo(var_test_irq)(t0) 29566269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 40(sp) # 8-byte Folded Spill 295714c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+4)(t0) 29586269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 32(sp) # 8-byte Folded Spill 295914c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+8)(t0) 29606269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 24(sp) # 8-byte Folded Spill 296114c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a0, %lo(var_test_irq+12)(t0) 29626269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 16(sp) # 8-byte Folded Spill 296314c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: addi a5, t0, %lo(var_test_irq) 29646269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw a0, 16(a5) 29656269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 8(sp) # 8-byte Folded Spill 29666269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw a0, 20(a5) 29676269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sd a0, 0(sp) # 8-byte Folded Spill 29686269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t4, 24(a5) 29696269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t5, 28(a5) 29706269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t6, 32(a5) 29716269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s2, 36(a5) 29726269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s3, 40(a5) 29736269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s4, 44(a5) 29746269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s5, 48(a5) 29756269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s6, 52(a5) 29766269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s7, 56(a5) 29776269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s8, 60(a5) 29786269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s9, 64(a5) 29796269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s10, 68(a5) 29806269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s11, 72(a5) 29816269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw ra, 76(a5) 29826269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw s1, 80(a5) 29836269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t3, 84(a5) 29846269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t2, 88(a5) 29856269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw t1, 92(a5) 298614c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a7, 112(a5) 298714c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw s0, 116(a5) 298814c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a3, 120(a5) 29896269ed24SWuXinlong; RV64IZCMP-SR-NEXT: lw a0, 124(a5) 299014c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a6, 96(a5) 299114c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a4, 100(a5) 299214c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a2, 104(a5) 299314c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: lw a1, 108(a5) 29946269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw a0, 124(a5) 299514c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a3, 120(a5) 299614c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw s0, 116(a5) 299714c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a7, 112(a5) 299814c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a1, 108(a5) 299914c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a2, 104(a5) 300014c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a4, 100(a5) 300114c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a6, 96(a5) 30026269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t1, 92(a5) 30036269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t2, 88(a5) 30046269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t3, 84(a5) 30056269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s1, 80(a5) 30066269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw ra, 76(a5) 30076269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s11, 72(a5) 30086269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s10, 68(a5) 30096269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s9, 64(a5) 30106269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s8, 60(a5) 30116269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s7, 56(a5) 30126269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s6, 52(a5) 30136269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s5, 48(a5) 30146269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s4, 44(a5) 30156269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s3, 40(a5) 30166269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw s2, 36(a5) 30176269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t6, 32(a5) 30186269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t5, 28(a5) 30196269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw t4, 24(a5) 30206269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 0(sp) # 8-byte Folded Reload 30216269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw a0, 20(a5) 30226269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 8(sp) # 8-byte Folded Reload 30236269ed24SWuXinlong; RV64IZCMP-SR-NEXT: sw a0, 16(a5) 30246269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 16(sp) # 8-byte Folded Reload 302514c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+12)(t0) 30266269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 24(sp) # 8-byte Folded Reload 302714c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+8)(t0) 30286269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 32(sp) # 8-byte Folded Reload 302914c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a0, %lo(var_test_irq+4)(t0) 30306269ed24SWuXinlong; RV64IZCMP-SR-NEXT: ld a0, 40(sp) # 8-byte Folded Reload 303114c4f28eSAlex Bradbury; RV64IZCMP-SR-NEXT: sw a0, %lo(var_test_irq)(t0) 3032ab94fbbaSYeting Kuo; RV64IZCMP-SR-NEXT: cm.popret {ra, s0-s11}, 160 30336269ed24SWuXinlong; 30346269ed24SWuXinlong; RV32I-LABEL: callee_no_irq: 30356269ed24SWuXinlong; RV32I: # %bb.0: 30366269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, -80 30376269ed24SWuXinlong; RV32I-NEXT: sw ra, 76(sp) # 4-byte Folded Spill 30386269ed24SWuXinlong; RV32I-NEXT: sw s0, 72(sp) # 4-byte Folded Spill 30396269ed24SWuXinlong; RV32I-NEXT: sw s1, 68(sp) # 4-byte Folded Spill 30406269ed24SWuXinlong; RV32I-NEXT: sw s2, 64(sp) # 4-byte Folded Spill 30416269ed24SWuXinlong; RV32I-NEXT: sw s3, 60(sp) # 4-byte Folded Spill 30426269ed24SWuXinlong; RV32I-NEXT: sw s4, 56(sp) # 4-byte Folded Spill 30436269ed24SWuXinlong; RV32I-NEXT: sw s5, 52(sp) # 4-byte Folded Spill 30446269ed24SWuXinlong; RV32I-NEXT: sw s6, 48(sp) # 4-byte Folded Spill 30456269ed24SWuXinlong; RV32I-NEXT: sw s7, 44(sp) # 4-byte Folded Spill 30466269ed24SWuXinlong; RV32I-NEXT: sw s8, 40(sp) # 4-byte Folded Spill 30476269ed24SWuXinlong; RV32I-NEXT: sw s9, 36(sp) # 4-byte Folded Spill 30486269ed24SWuXinlong; RV32I-NEXT: sw s10, 32(sp) # 4-byte Folded Spill 30496269ed24SWuXinlong; RV32I-NEXT: sw s11, 28(sp) # 4-byte Folded Spill 305014c4f28eSAlex Bradbury; RV32I-NEXT: lui a7, %hi(var_test_irq) 305114c4f28eSAlex Bradbury; RV32I-NEXT: lw a0, %lo(var_test_irq)(a7) 30526269ed24SWuXinlong; RV32I-NEXT: sw a0, 24(sp) # 4-byte Folded Spill 305314c4f28eSAlex Bradbury; RV32I-NEXT: lw a0, %lo(var_test_irq+4)(a7) 30546269ed24SWuXinlong; RV32I-NEXT: sw a0, 20(sp) # 4-byte Folded Spill 305514c4f28eSAlex Bradbury; RV32I-NEXT: lw a0, %lo(var_test_irq+8)(a7) 30566269ed24SWuXinlong; RV32I-NEXT: sw a0, 16(sp) # 4-byte Folded Spill 305714c4f28eSAlex Bradbury; RV32I-NEXT: lw a0, %lo(var_test_irq+12)(a7) 30586269ed24SWuXinlong; RV32I-NEXT: sw a0, 12(sp) # 4-byte Folded Spill 305914c4f28eSAlex Bradbury; RV32I-NEXT: addi a5, a7, %lo(var_test_irq) 30606269ed24SWuXinlong; RV32I-NEXT: lw a0, 16(a5) 30616269ed24SWuXinlong; RV32I-NEXT: sw a0, 8(sp) # 4-byte Folded Spill 30626269ed24SWuXinlong; RV32I-NEXT: lw a0, 20(a5) 30636269ed24SWuXinlong; RV32I-NEXT: sw a0, 4(sp) # 4-byte Folded Spill 30646269ed24SWuXinlong; RV32I-NEXT: lw t0, 24(a5) 30656269ed24SWuXinlong; RV32I-NEXT: lw t1, 28(a5) 30666269ed24SWuXinlong; RV32I-NEXT: lw t2, 32(a5) 30676269ed24SWuXinlong; RV32I-NEXT: lw t3, 36(a5) 30686269ed24SWuXinlong; RV32I-NEXT: lw t4, 40(a5) 30696269ed24SWuXinlong; RV32I-NEXT: lw t5, 44(a5) 30706269ed24SWuXinlong; RV32I-NEXT: lw t6, 48(a5) 30716269ed24SWuXinlong; RV32I-NEXT: lw s0, 52(a5) 30726269ed24SWuXinlong; RV32I-NEXT: lw s1, 56(a5) 30736269ed24SWuXinlong; RV32I-NEXT: lw s2, 60(a5) 30746269ed24SWuXinlong; RV32I-NEXT: lw s3, 64(a5) 30756269ed24SWuXinlong; RV32I-NEXT: lw s4, 68(a5) 30766269ed24SWuXinlong; RV32I-NEXT: lw s5, 72(a5) 30776269ed24SWuXinlong; RV32I-NEXT: lw s6, 76(a5) 30786269ed24SWuXinlong; RV32I-NEXT: lw s7, 80(a5) 30796269ed24SWuXinlong; RV32I-NEXT: lw s8, 84(a5) 30806269ed24SWuXinlong; RV32I-NEXT: lw s9, 88(a5) 30816269ed24SWuXinlong; RV32I-NEXT: lw s10, 92(a5) 308214c4f28eSAlex Bradbury; RV32I-NEXT: lw s11, 112(a5) 308314c4f28eSAlex Bradbury; RV32I-NEXT: lw ra, 116(a5) 308414c4f28eSAlex Bradbury; RV32I-NEXT: lw a3, 120(a5) 30856269ed24SWuXinlong; RV32I-NEXT: lw a0, 124(a5) 308614c4f28eSAlex Bradbury; RV32I-NEXT: lw a6, 96(a5) 308714c4f28eSAlex Bradbury; RV32I-NEXT: lw a4, 100(a5) 308814c4f28eSAlex Bradbury; RV32I-NEXT: lw a2, 104(a5) 308914c4f28eSAlex Bradbury; RV32I-NEXT: lw a1, 108(a5) 30906269ed24SWuXinlong; RV32I-NEXT: sw a0, 124(a5) 309114c4f28eSAlex Bradbury; RV32I-NEXT: sw a3, 120(a5) 309214c4f28eSAlex Bradbury; RV32I-NEXT: sw ra, 116(a5) 309314c4f28eSAlex Bradbury; RV32I-NEXT: sw s11, 112(a5) 309414c4f28eSAlex Bradbury; RV32I-NEXT: sw a1, 108(a5) 309514c4f28eSAlex Bradbury; RV32I-NEXT: sw a2, 104(a5) 309614c4f28eSAlex Bradbury; RV32I-NEXT: sw a4, 100(a5) 309714c4f28eSAlex Bradbury; RV32I-NEXT: sw a6, 96(a5) 30986269ed24SWuXinlong; RV32I-NEXT: sw s10, 92(a5) 30996269ed24SWuXinlong; RV32I-NEXT: sw s9, 88(a5) 31006269ed24SWuXinlong; RV32I-NEXT: sw s8, 84(a5) 31016269ed24SWuXinlong; RV32I-NEXT: sw s7, 80(a5) 31026269ed24SWuXinlong; RV32I-NEXT: sw s6, 76(a5) 31036269ed24SWuXinlong; RV32I-NEXT: sw s5, 72(a5) 31046269ed24SWuXinlong; RV32I-NEXT: sw s4, 68(a5) 31056269ed24SWuXinlong; RV32I-NEXT: sw s3, 64(a5) 31066269ed24SWuXinlong; RV32I-NEXT: sw s2, 60(a5) 31076269ed24SWuXinlong; RV32I-NEXT: sw s1, 56(a5) 31086269ed24SWuXinlong; RV32I-NEXT: sw s0, 52(a5) 31096269ed24SWuXinlong; RV32I-NEXT: sw t6, 48(a5) 31106269ed24SWuXinlong; RV32I-NEXT: sw t5, 44(a5) 31116269ed24SWuXinlong; RV32I-NEXT: sw t4, 40(a5) 31126269ed24SWuXinlong; RV32I-NEXT: sw t3, 36(a5) 31136269ed24SWuXinlong; RV32I-NEXT: sw t2, 32(a5) 31146269ed24SWuXinlong; RV32I-NEXT: sw t1, 28(a5) 31156269ed24SWuXinlong; RV32I-NEXT: sw t0, 24(a5) 31166269ed24SWuXinlong; RV32I-NEXT: lw a0, 4(sp) # 4-byte Folded Reload 31176269ed24SWuXinlong; RV32I-NEXT: sw a0, 20(a5) 31186269ed24SWuXinlong; RV32I-NEXT: lw a0, 8(sp) # 4-byte Folded Reload 31196269ed24SWuXinlong; RV32I-NEXT: sw a0, 16(a5) 31206269ed24SWuXinlong; RV32I-NEXT: lw a0, 12(sp) # 4-byte Folded Reload 312114c4f28eSAlex Bradbury; RV32I-NEXT: sw a0, %lo(var_test_irq+12)(a7) 31226269ed24SWuXinlong; RV32I-NEXT: lw a0, 16(sp) # 4-byte Folded Reload 312314c4f28eSAlex Bradbury; RV32I-NEXT: sw a0, %lo(var_test_irq+8)(a7) 31246269ed24SWuXinlong; RV32I-NEXT: lw a0, 20(sp) # 4-byte Folded Reload 312514c4f28eSAlex Bradbury; RV32I-NEXT: sw a0, %lo(var_test_irq+4)(a7) 31266269ed24SWuXinlong; RV32I-NEXT: lw a0, 24(sp) # 4-byte Folded Reload 312714c4f28eSAlex Bradbury; RV32I-NEXT: sw a0, %lo(var_test_irq)(a7) 31286269ed24SWuXinlong; RV32I-NEXT: lw ra, 76(sp) # 4-byte Folded Reload 31296269ed24SWuXinlong; RV32I-NEXT: lw s0, 72(sp) # 4-byte Folded Reload 31306269ed24SWuXinlong; RV32I-NEXT: lw s1, 68(sp) # 4-byte Folded Reload 31316269ed24SWuXinlong; RV32I-NEXT: lw s2, 64(sp) # 4-byte Folded Reload 31326269ed24SWuXinlong; RV32I-NEXT: lw s3, 60(sp) # 4-byte Folded Reload 31336269ed24SWuXinlong; RV32I-NEXT: lw s4, 56(sp) # 4-byte Folded Reload 31346269ed24SWuXinlong; RV32I-NEXT: lw s5, 52(sp) # 4-byte Folded Reload 31356269ed24SWuXinlong; RV32I-NEXT: lw s6, 48(sp) # 4-byte Folded Reload 31366269ed24SWuXinlong; RV32I-NEXT: lw s7, 44(sp) # 4-byte Folded Reload 31376269ed24SWuXinlong; RV32I-NEXT: lw s8, 40(sp) # 4-byte Folded Reload 31386269ed24SWuXinlong; RV32I-NEXT: lw s9, 36(sp) # 4-byte Folded Reload 31396269ed24SWuXinlong; RV32I-NEXT: lw s10, 32(sp) # 4-byte Folded Reload 31406269ed24SWuXinlong; RV32I-NEXT: lw s11, 28(sp) # 4-byte Folded Reload 31416269ed24SWuXinlong; RV32I-NEXT: addi sp, sp, 80 31426269ed24SWuXinlong; RV32I-NEXT: ret 31436269ed24SWuXinlong; 31446269ed24SWuXinlong; RV64I-LABEL: callee_no_irq: 31456269ed24SWuXinlong; RV64I: # %bb.0: 31466269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, -160 31476269ed24SWuXinlong; RV64I-NEXT: sd ra, 152(sp) # 8-byte Folded Spill 31486269ed24SWuXinlong; RV64I-NEXT: sd s0, 144(sp) # 8-byte Folded Spill 31496269ed24SWuXinlong; RV64I-NEXT: sd s1, 136(sp) # 8-byte Folded Spill 31506269ed24SWuXinlong; RV64I-NEXT: sd s2, 128(sp) # 8-byte Folded Spill 31516269ed24SWuXinlong; RV64I-NEXT: sd s3, 120(sp) # 8-byte Folded Spill 31526269ed24SWuXinlong; RV64I-NEXT: sd s4, 112(sp) # 8-byte Folded Spill 31536269ed24SWuXinlong; RV64I-NEXT: sd s5, 104(sp) # 8-byte Folded Spill 31546269ed24SWuXinlong; RV64I-NEXT: sd s6, 96(sp) # 8-byte Folded Spill 31556269ed24SWuXinlong; RV64I-NEXT: sd s7, 88(sp) # 8-byte Folded Spill 31566269ed24SWuXinlong; RV64I-NEXT: sd s8, 80(sp) # 8-byte Folded Spill 31576269ed24SWuXinlong; RV64I-NEXT: sd s9, 72(sp) # 8-byte Folded Spill 31586269ed24SWuXinlong; RV64I-NEXT: sd s10, 64(sp) # 8-byte Folded Spill 31596269ed24SWuXinlong; RV64I-NEXT: sd s11, 56(sp) # 8-byte Folded Spill 316014c4f28eSAlex Bradbury; RV64I-NEXT: lui a7, %hi(var_test_irq) 316114c4f28eSAlex Bradbury; RV64I-NEXT: lw a0, %lo(var_test_irq)(a7) 31626269ed24SWuXinlong; RV64I-NEXT: sd a0, 48(sp) # 8-byte Folded Spill 316314c4f28eSAlex Bradbury; RV64I-NEXT: lw a0, %lo(var_test_irq+4)(a7) 31646269ed24SWuXinlong; RV64I-NEXT: sd a0, 40(sp) # 8-byte Folded Spill 316514c4f28eSAlex Bradbury; RV64I-NEXT: lw a0, %lo(var_test_irq+8)(a7) 31666269ed24SWuXinlong; RV64I-NEXT: sd a0, 32(sp) # 8-byte Folded Spill 316714c4f28eSAlex Bradbury; RV64I-NEXT: lw a0, %lo(var_test_irq+12)(a7) 31686269ed24SWuXinlong; RV64I-NEXT: sd a0, 24(sp) # 8-byte Folded Spill 316914c4f28eSAlex Bradbury; RV64I-NEXT: addi a5, a7, %lo(var_test_irq) 31706269ed24SWuXinlong; RV64I-NEXT: lw a0, 16(a5) 31716269ed24SWuXinlong; RV64I-NEXT: sd a0, 16(sp) # 8-byte Folded Spill 31726269ed24SWuXinlong; RV64I-NEXT: lw a0, 20(a5) 31736269ed24SWuXinlong; RV64I-NEXT: sd a0, 8(sp) # 8-byte Folded Spill 31746269ed24SWuXinlong; RV64I-NEXT: lw t0, 24(a5) 31756269ed24SWuXinlong; RV64I-NEXT: lw t1, 28(a5) 31766269ed24SWuXinlong; RV64I-NEXT: lw t2, 32(a5) 31776269ed24SWuXinlong; RV64I-NEXT: lw t3, 36(a5) 31786269ed24SWuXinlong; RV64I-NEXT: lw t4, 40(a5) 31796269ed24SWuXinlong; RV64I-NEXT: lw t5, 44(a5) 31806269ed24SWuXinlong; RV64I-NEXT: lw t6, 48(a5) 31816269ed24SWuXinlong; RV64I-NEXT: lw s0, 52(a5) 31826269ed24SWuXinlong; RV64I-NEXT: lw s1, 56(a5) 31836269ed24SWuXinlong; RV64I-NEXT: lw s2, 60(a5) 31846269ed24SWuXinlong; RV64I-NEXT: lw s3, 64(a5) 31856269ed24SWuXinlong; RV64I-NEXT: lw s4, 68(a5) 31866269ed24SWuXinlong; RV64I-NEXT: lw s5, 72(a5) 31876269ed24SWuXinlong; RV64I-NEXT: lw s6, 76(a5) 31886269ed24SWuXinlong; RV64I-NEXT: lw s7, 80(a5) 31896269ed24SWuXinlong; RV64I-NEXT: lw s8, 84(a5) 31906269ed24SWuXinlong; RV64I-NEXT: lw s9, 88(a5) 31916269ed24SWuXinlong; RV64I-NEXT: lw s10, 92(a5) 319214c4f28eSAlex Bradbury; RV64I-NEXT: lw s11, 112(a5) 319314c4f28eSAlex Bradbury; RV64I-NEXT: lw ra, 116(a5) 319414c4f28eSAlex Bradbury; RV64I-NEXT: lw a3, 120(a5) 31956269ed24SWuXinlong; RV64I-NEXT: lw a0, 124(a5) 319614c4f28eSAlex Bradbury; RV64I-NEXT: lw a6, 96(a5) 319714c4f28eSAlex Bradbury; RV64I-NEXT: lw a4, 100(a5) 319814c4f28eSAlex Bradbury; RV64I-NEXT: lw a2, 104(a5) 319914c4f28eSAlex Bradbury; RV64I-NEXT: lw a1, 108(a5) 32006269ed24SWuXinlong; RV64I-NEXT: sw a0, 124(a5) 320114c4f28eSAlex Bradbury; RV64I-NEXT: sw a3, 120(a5) 320214c4f28eSAlex Bradbury; RV64I-NEXT: sw ra, 116(a5) 320314c4f28eSAlex Bradbury; RV64I-NEXT: sw s11, 112(a5) 320414c4f28eSAlex Bradbury; RV64I-NEXT: sw a1, 108(a5) 320514c4f28eSAlex Bradbury; RV64I-NEXT: sw a2, 104(a5) 320614c4f28eSAlex Bradbury; RV64I-NEXT: sw a4, 100(a5) 320714c4f28eSAlex Bradbury; RV64I-NEXT: sw a6, 96(a5) 32086269ed24SWuXinlong; RV64I-NEXT: sw s10, 92(a5) 32096269ed24SWuXinlong; RV64I-NEXT: sw s9, 88(a5) 32106269ed24SWuXinlong; RV64I-NEXT: sw s8, 84(a5) 32116269ed24SWuXinlong; RV64I-NEXT: sw s7, 80(a5) 32126269ed24SWuXinlong; RV64I-NEXT: sw s6, 76(a5) 32136269ed24SWuXinlong; RV64I-NEXT: sw s5, 72(a5) 32146269ed24SWuXinlong; RV64I-NEXT: sw s4, 68(a5) 32156269ed24SWuXinlong; RV64I-NEXT: sw s3, 64(a5) 32166269ed24SWuXinlong; RV64I-NEXT: sw s2, 60(a5) 32176269ed24SWuXinlong; RV64I-NEXT: sw s1, 56(a5) 32186269ed24SWuXinlong; RV64I-NEXT: sw s0, 52(a5) 32196269ed24SWuXinlong; RV64I-NEXT: sw t6, 48(a5) 32206269ed24SWuXinlong; RV64I-NEXT: sw t5, 44(a5) 32216269ed24SWuXinlong; RV64I-NEXT: sw t4, 40(a5) 32226269ed24SWuXinlong; RV64I-NEXT: sw t3, 36(a5) 32236269ed24SWuXinlong; RV64I-NEXT: sw t2, 32(a5) 32246269ed24SWuXinlong; RV64I-NEXT: sw t1, 28(a5) 32256269ed24SWuXinlong; RV64I-NEXT: sw t0, 24(a5) 32266269ed24SWuXinlong; RV64I-NEXT: ld a0, 8(sp) # 8-byte Folded Reload 32276269ed24SWuXinlong; RV64I-NEXT: sw a0, 20(a5) 32286269ed24SWuXinlong; RV64I-NEXT: ld a0, 16(sp) # 8-byte Folded Reload 32296269ed24SWuXinlong; RV64I-NEXT: sw a0, 16(a5) 32306269ed24SWuXinlong; RV64I-NEXT: ld a0, 24(sp) # 8-byte Folded Reload 323114c4f28eSAlex Bradbury; RV64I-NEXT: sw a0, %lo(var_test_irq+12)(a7) 32326269ed24SWuXinlong; RV64I-NEXT: ld a0, 32(sp) # 8-byte Folded Reload 323314c4f28eSAlex Bradbury; RV64I-NEXT: sw a0, %lo(var_test_irq+8)(a7) 32346269ed24SWuXinlong; RV64I-NEXT: ld a0, 40(sp) # 8-byte Folded Reload 323514c4f28eSAlex Bradbury; RV64I-NEXT: sw a0, %lo(var_test_irq+4)(a7) 32366269ed24SWuXinlong; RV64I-NEXT: ld a0, 48(sp) # 8-byte Folded Reload 323714c4f28eSAlex Bradbury; RV64I-NEXT: sw a0, %lo(var_test_irq)(a7) 32386269ed24SWuXinlong; RV64I-NEXT: ld ra, 152(sp) # 8-byte Folded Reload 32396269ed24SWuXinlong; RV64I-NEXT: ld s0, 144(sp) # 8-byte Folded Reload 32406269ed24SWuXinlong; RV64I-NEXT: ld s1, 136(sp) # 8-byte Folded Reload 32416269ed24SWuXinlong; RV64I-NEXT: ld s2, 128(sp) # 8-byte Folded Reload 32426269ed24SWuXinlong; RV64I-NEXT: ld s3, 120(sp) # 8-byte Folded Reload 32436269ed24SWuXinlong; RV64I-NEXT: ld s4, 112(sp) # 8-byte Folded Reload 32446269ed24SWuXinlong; RV64I-NEXT: ld s5, 104(sp) # 8-byte Folded Reload 32456269ed24SWuXinlong; RV64I-NEXT: ld s6, 96(sp) # 8-byte Folded Reload 32466269ed24SWuXinlong; RV64I-NEXT: ld s7, 88(sp) # 8-byte Folded Reload 32476269ed24SWuXinlong; RV64I-NEXT: ld s8, 80(sp) # 8-byte Folded Reload 32486269ed24SWuXinlong; RV64I-NEXT: ld s9, 72(sp) # 8-byte Folded Reload 32496269ed24SWuXinlong; RV64I-NEXT: ld s10, 64(sp) # 8-byte Folded Reload 32506269ed24SWuXinlong; RV64I-NEXT: ld s11, 56(sp) # 8-byte Folded Reload 32516269ed24SWuXinlong; RV64I-NEXT: addi sp, sp, 160 32526269ed24SWuXinlong; RV64I-NEXT: ret 3253ff9af4c4SNikita Popov %val = load [32 x i32], ptr @var_test_irq 3254ff9af4c4SNikita Popov store volatile [32 x i32] %val, ptr @var_test_irq 32556269ed24SWuXinlong ret void 32566269ed24SWuXinlong} 32577c70e50bSYeting Kuo 32587c70e50bSYeting Kuodeclare void @bar(ptr, ptr) 32597c70e50bSYeting Kuodeclare ptr @llvm.frameaddress.p0(i32 immarg) 32607c70e50bSYeting Kuo 32617c70e50bSYeting Kuodefine i32 @use_fp(i32 %x) { 32627c70e50bSYeting Kuo; RV32IZCMP-LABEL: use_fp: 32637c70e50bSYeting Kuo; RV32IZCMP: # %bb.0: # %entry 32647c70e50bSYeting Kuo; RV32IZCMP-NEXT: cm.push {ra, s0-s1}, -32 32657c70e50bSYeting Kuo; RV32IZCMP-NEXT: .cfi_def_cfa_offset 32 32667c70e50bSYeting Kuo; RV32IZCMP-NEXT: .cfi_offset ra, -12 32677c70e50bSYeting Kuo; RV32IZCMP-NEXT: .cfi_offset s0, -8 32687c70e50bSYeting Kuo; RV32IZCMP-NEXT: .cfi_offset s1, -4 32697c70e50bSYeting Kuo; RV32IZCMP-NEXT: addi s0, sp, 32 32707c70e50bSYeting Kuo; RV32IZCMP-NEXT: .cfi_def_cfa s0, 0 32717c70e50bSYeting Kuo; RV32IZCMP-NEXT: mv s1, a0 32727c70e50bSYeting Kuo; RV32IZCMP-NEXT: addi a1, s0, -20 32737c70e50bSYeting Kuo; RV32IZCMP-NEXT: mv a0, s0 3274eabaee0cSFangrui Song; RV32IZCMP-NEXT: call bar 32757c70e50bSYeting Kuo; RV32IZCMP-NEXT: mv a0, s1 3276*97982a8cSdlav-sc; RV32IZCMP-NEXT: .cfi_def_cfa sp, 32 32777c70e50bSYeting Kuo; RV32IZCMP-NEXT: cm.popret {ra, s0-s1}, 32 32787c70e50bSYeting Kuo; 32797c70e50bSYeting Kuo; RV64IZCMP-LABEL: use_fp: 32807c70e50bSYeting Kuo; RV64IZCMP: # %bb.0: # %entry 32817c70e50bSYeting Kuo; RV64IZCMP-NEXT: cm.push {ra, s0-s1}, -48 32827c70e50bSYeting Kuo; RV64IZCMP-NEXT: .cfi_def_cfa_offset 48 32837c70e50bSYeting Kuo; RV64IZCMP-NEXT: .cfi_offset ra, -24 32847c70e50bSYeting Kuo; RV64IZCMP-NEXT: .cfi_offset s0, -16 32857c70e50bSYeting Kuo; RV64IZCMP-NEXT: .cfi_offset s1, -8 32867c70e50bSYeting Kuo; RV64IZCMP-NEXT: addi s0, sp, 48 32877c70e50bSYeting Kuo; RV64IZCMP-NEXT: .cfi_def_cfa s0, 0 32887c70e50bSYeting Kuo; RV64IZCMP-NEXT: mv s1, a0 32897c70e50bSYeting Kuo; RV64IZCMP-NEXT: addi a1, s0, -36 32907c70e50bSYeting Kuo; RV64IZCMP-NEXT: mv a0, s0 3291eabaee0cSFangrui Song; RV64IZCMP-NEXT: call bar 32927c70e50bSYeting Kuo; RV64IZCMP-NEXT: mv a0, s1 3293*97982a8cSdlav-sc; RV64IZCMP-NEXT: .cfi_def_cfa sp, 48 32947c70e50bSYeting Kuo; RV64IZCMP-NEXT: cm.popret {ra, s0-s1}, 48 32957c70e50bSYeting Kuo; 32967c70e50bSYeting Kuo; RV32IZCMP-SR-LABEL: use_fp: 32977c70e50bSYeting Kuo; RV32IZCMP-SR: # %bb.0: # %entry 32987c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: cm.push {ra, s0-s1}, -32 32997c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 32 33007c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_offset ra, -12 33017c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_offset s0, -8 33027c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_offset s1, -4 33037c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: addi s0, sp, 32 33047c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 33057c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: mv s1, a0 33067c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: addi a1, s0, -20 33077c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: mv a0, s0 3308eabaee0cSFangrui Song; RV32IZCMP-SR-NEXT: call bar 33097c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: mv a0, s1 3310*97982a8cSdlav-sc; RV32IZCMP-SR-NEXT: .cfi_def_cfa sp, 32 33117c70e50bSYeting Kuo; RV32IZCMP-SR-NEXT: cm.popret {ra, s0-s1}, 32 33127c70e50bSYeting Kuo; 33137c70e50bSYeting Kuo; RV64IZCMP-SR-LABEL: use_fp: 33147c70e50bSYeting Kuo; RV64IZCMP-SR: # %bb.0: # %entry 33157c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: cm.push {ra, s0-s1}, -48 33167c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 48 33177c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_offset ra, -24 33187c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_offset s0, -16 33197c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_offset s1, -8 33207c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: addi s0, sp, 48 33217c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: .cfi_def_cfa s0, 0 33227c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: mv s1, a0 33237c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: addi a1, s0, -36 33247c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: mv a0, s0 3325eabaee0cSFangrui Song; RV64IZCMP-SR-NEXT: call bar 33267c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: mv a0, s1 3327*97982a8cSdlav-sc; RV64IZCMP-SR-NEXT: .cfi_def_cfa sp, 48 33287c70e50bSYeting Kuo; RV64IZCMP-SR-NEXT: cm.popret {ra, s0-s1}, 48 33297c70e50bSYeting Kuo; 33307c70e50bSYeting Kuo; RV32I-LABEL: use_fp: 33317c70e50bSYeting Kuo; RV32I: # %bb.0: # %entry 33327c70e50bSYeting Kuo; RV32I-NEXT: addi sp, sp, -16 33337c70e50bSYeting Kuo; RV32I-NEXT: .cfi_def_cfa_offset 16 33347c70e50bSYeting Kuo; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill 33357c70e50bSYeting Kuo; RV32I-NEXT: sw s0, 8(sp) # 4-byte Folded Spill 33367c70e50bSYeting Kuo; RV32I-NEXT: sw s1, 4(sp) # 4-byte Folded Spill 33377c70e50bSYeting Kuo; RV32I-NEXT: .cfi_offset ra, -4 33387c70e50bSYeting Kuo; RV32I-NEXT: .cfi_offset s0, -8 33397c70e50bSYeting Kuo; RV32I-NEXT: .cfi_offset s1, -12 33407c70e50bSYeting Kuo; RV32I-NEXT: addi s0, sp, 16 33417c70e50bSYeting Kuo; RV32I-NEXT: .cfi_def_cfa s0, 0 33427c70e50bSYeting Kuo; RV32I-NEXT: mv s1, a0 33437c70e50bSYeting Kuo; RV32I-NEXT: addi a1, s0, -16 33447c70e50bSYeting Kuo; RV32I-NEXT: mv a0, s0 3345eabaee0cSFangrui Song; RV32I-NEXT: call bar 33467c70e50bSYeting Kuo; RV32I-NEXT: mv a0, s1 3347*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa sp, 16 33487c70e50bSYeting Kuo; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload 33497c70e50bSYeting Kuo; RV32I-NEXT: lw s0, 8(sp) # 4-byte Folded Reload 33507c70e50bSYeting Kuo; RV32I-NEXT: lw s1, 4(sp) # 4-byte Folded Reload 3351*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore ra 3352*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s0 3353*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s1 33547c70e50bSYeting Kuo; RV32I-NEXT: addi sp, sp, 16 3355*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa_offset 0 33567c70e50bSYeting Kuo; RV32I-NEXT: ret 33577c70e50bSYeting Kuo; 33587c70e50bSYeting Kuo; RV64I-LABEL: use_fp: 33597c70e50bSYeting Kuo; RV64I: # %bb.0: # %entry 33607c70e50bSYeting Kuo; RV64I-NEXT: addi sp, sp, -32 33617c70e50bSYeting Kuo; RV64I-NEXT: .cfi_def_cfa_offset 32 33627c70e50bSYeting Kuo; RV64I-NEXT: sd ra, 24(sp) # 8-byte Folded Spill 33637c70e50bSYeting Kuo; RV64I-NEXT: sd s0, 16(sp) # 8-byte Folded Spill 33647c70e50bSYeting Kuo; RV64I-NEXT: sd s1, 8(sp) # 8-byte Folded Spill 33657c70e50bSYeting Kuo; RV64I-NEXT: .cfi_offset ra, -8 33667c70e50bSYeting Kuo; RV64I-NEXT: .cfi_offset s0, -16 33677c70e50bSYeting Kuo; RV64I-NEXT: .cfi_offset s1, -24 33687c70e50bSYeting Kuo; RV64I-NEXT: addi s0, sp, 32 33697c70e50bSYeting Kuo; RV64I-NEXT: .cfi_def_cfa s0, 0 33707c70e50bSYeting Kuo; RV64I-NEXT: mv s1, a0 33717c70e50bSYeting Kuo; RV64I-NEXT: addi a1, s0, -28 33727c70e50bSYeting Kuo; RV64I-NEXT: mv a0, s0 3373eabaee0cSFangrui Song; RV64I-NEXT: call bar 33747c70e50bSYeting Kuo; RV64I-NEXT: mv a0, s1 3375*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa sp, 32 33767c70e50bSYeting Kuo; RV64I-NEXT: ld ra, 24(sp) # 8-byte Folded Reload 33777c70e50bSYeting Kuo; RV64I-NEXT: ld s0, 16(sp) # 8-byte Folded Reload 33787c70e50bSYeting Kuo; RV64I-NEXT: ld s1, 8(sp) # 8-byte Folded Reload 3379*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore ra 3380*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s0 3381*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s1 33827c70e50bSYeting Kuo; RV64I-NEXT: addi sp, sp, 32 3383*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa_offset 0 33847c70e50bSYeting Kuo; RV64I-NEXT: ret 33857c70e50bSYeting Kuoentry: 33867c70e50bSYeting Kuo %var = alloca i32, align 4 33877c70e50bSYeting Kuo %0 = tail call ptr @llvm.frameaddress.p0(i32 0) 33887c70e50bSYeting Kuo call void @bar(ptr %0, ptr %var) 33897c70e50bSYeting Kuo ret i32 %x 33907c70e50bSYeting Kuo} 3391db88f301SCraig Topper 3392db88f301SCraig Topperdefine void @spill_x10() { 3393db88f301SCraig Topper; RV32IZCMP-LABEL: spill_x10: 3394db88f301SCraig Topper; RV32IZCMP: # %bb.0: # %entry 3395db88f301SCraig Topper; RV32IZCMP-NEXT: cm.push {ra, s0-s11}, -64 3396db88f301SCraig Topper; RV32IZCMP-NEXT: .cfi_def_cfa_offset 64 3397db88f301SCraig Topper; RV32IZCMP-NEXT: .cfi_offset s10, -8 3398736ffdc3SCraig Topper; RV32IZCMP-NEXT: .cfi_offset s11, -4 3399db88f301SCraig Topper; RV32IZCMP-NEXT: #APP 3400db88f301SCraig Topper; RV32IZCMP-NEXT: li s10, 0 3401db88f301SCraig Topper; RV32IZCMP-NEXT: #NO_APP 3402db88f301SCraig Topper; RV32IZCMP-NEXT: cm.popret {ra, s0-s11}, 64 3403db88f301SCraig Topper; 3404db88f301SCraig Topper; RV64IZCMP-LABEL: spill_x10: 3405db88f301SCraig Topper; RV64IZCMP: # %bb.0: # %entry 3406db88f301SCraig Topper; RV64IZCMP-NEXT: cm.push {ra, s0-s11}, -112 3407db88f301SCraig Topper; RV64IZCMP-NEXT: .cfi_def_cfa_offset 112 3408db88f301SCraig Topper; RV64IZCMP-NEXT: .cfi_offset s10, -16 3409736ffdc3SCraig Topper; RV64IZCMP-NEXT: .cfi_offset s11, -8 3410db88f301SCraig Topper; RV64IZCMP-NEXT: #APP 3411db88f301SCraig Topper; RV64IZCMP-NEXT: li s10, 0 3412db88f301SCraig Topper; RV64IZCMP-NEXT: #NO_APP 3413db88f301SCraig Topper; RV64IZCMP-NEXT: cm.popret {ra, s0-s11}, 112 3414db88f301SCraig Topper; 3415db88f301SCraig Topper; RV32IZCMP-SR-LABEL: spill_x10: 3416db88f301SCraig Topper; RV32IZCMP-SR: # %bb.0: # %entry 3417db88f301SCraig Topper; RV32IZCMP-SR-NEXT: cm.push {ra, s0-s11}, -64 3418db88f301SCraig Topper; RV32IZCMP-SR-NEXT: .cfi_def_cfa_offset 64 3419db88f301SCraig Topper; RV32IZCMP-SR-NEXT: .cfi_offset s10, -8 3420736ffdc3SCraig Topper; RV32IZCMP-SR-NEXT: .cfi_offset s11, -4 3421db88f301SCraig Topper; RV32IZCMP-SR-NEXT: #APP 3422db88f301SCraig Topper; RV32IZCMP-SR-NEXT: li s10, 0 3423db88f301SCraig Topper; RV32IZCMP-SR-NEXT: #NO_APP 3424db88f301SCraig Topper; RV32IZCMP-SR-NEXT: cm.popret {ra, s0-s11}, 64 3425db88f301SCraig Topper; 3426db88f301SCraig Topper; RV64IZCMP-SR-LABEL: spill_x10: 3427db88f301SCraig Topper; RV64IZCMP-SR: # %bb.0: # %entry 3428db88f301SCraig Topper; RV64IZCMP-SR-NEXT: cm.push {ra, s0-s11}, -112 3429db88f301SCraig Topper; RV64IZCMP-SR-NEXT: .cfi_def_cfa_offset 112 3430db88f301SCraig Topper; RV64IZCMP-SR-NEXT: .cfi_offset s10, -16 3431736ffdc3SCraig Topper; RV64IZCMP-SR-NEXT: .cfi_offset s11, -8 3432db88f301SCraig Topper; RV64IZCMP-SR-NEXT: #APP 3433db88f301SCraig Topper; RV64IZCMP-SR-NEXT: li s10, 0 3434db88f301SCraig Topper; RV64IZCMP-SR-NEXT: #NO_APP 3435db88f301SCraig Topper; RV64IZCMP-SR-NEXT: cm.popret {ra, s0-s11}, 112 3436db88f301SCraig Topper; 3437db88f301SCraig Topper; RV32I-LABEL: spill_x10: 3438db88f301SCraig Topper; RV32I: # %bb.0: # %entry 3439db88f301SCraig Topper; RV32I-NEXT: addi sp, sp, -16 3440db88f301SCraig Topper; RV32I-NEXT: .cfi_def_cfa_offset 16 3441db88f301SCraig Topper; RV32I-NEXT: sw s10, 12(sp) # 4-byte Folded Spill 3442db88f301SCraig Topper; RV32I-NEXT: .cfi_offset s10, -4 3443db88f301SCraig Topper; RV32I-NEXT: #APP 3444db88f301SCraig Topper; RV32I-NEXT: li s10, 0 3445db88f301SCraig Topper; RV32I-NEXT: #NO_APP 3446db88f301SCraig Topper; RV32I-NEXT: lw s10, 12(sp) # 4-byte Folded Reload 3447*97982a8cSdlav-sc; RV32I-NEXT: .cfi_restore s10 3448db88f301SCraig Topper; RV32I-NEXT: addi sp, sp, 16 3449*97982a8cSdlav-sc; RV32I-NEXT: .cfi_def_cfa_offset 0 3450db88f301SCraig Topper; RV32I-NEXT: ret 3451db88f301SCraig Topper; 3452db88f301SCraig Topper; RV64I-LABEL: spill_x10: 3453db88f301SCraig Topper; RV64I: # %bb.0: # %entry 3454db88f301SCraig Topper; RV64I-NEXT: addi sp, sp, -16 3455db88f301SCraig Topper; RV64I-NEXT: .cfi_def_cfa_offset 16 3456db88f301SCraig Topper; RV64I-NEXT: sd s10, 8(sp) # 8-byte Folded Spill 3457db88f301SCraig Topper; RV64I-NEXT: .cfi_offset s10, -8 3458db88f301SCraig Topper; RV64I-NEXT: #APP 3459db88f301SCraig Topper; RV64I-NEXT: li s10, 0 3460db88f301SCraig Topper; RV64I-NEXT: #NO_APP 3461db88f301SCraig Topper; RV64I-NEXT: ld s10, 8(sp) # 8-byte Folded Reload 3462*97982a8cSdlav-sc; RV64I-NEXT: .cfi_restore s10 3463db88f301SCraig Topper; RV64I-NEXT: addi sp, sp, 16 3464*97982a8cSdlav-sc; RV64I-NEXT: .cfi_def_cfa_offset 0 3465db88f301SCraig Topper; RV64I-NEXT: ret 3466db88f301SCraig Topperentry: 3467db88f301SCraig Topper tail call void asm sideeffect "li s10, 0", "~{s10}"() 3468db88f301SCraig Topper ret void 3469db88f301SCraig Topper} 3470