[llvm] c374789 - [RISCV][test] Update branch-relaxation.ll with update_llc_test_checks.py [NFC]
ZHU Zijia via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 25 01:55:20 PDT 2022
Author: ZHU Zijia
Date: 2022-08-25T16:54:48+08:00
New Revision: c374789fba484af62a327a9337c7c9107461ee51
URL: https://github.com/llvm/llvm-project/commit/c374789fba484af62a327a9337c7c9107461ee51
DIFF: https://github.com/llvm/llvm-project/commit/c374789fba484af62a327a9337c7c9107461ee51.diff
LOG: [RISCV][test] Update branch-relaxation.ll with update_llc_test_checks.py [NFC]
Update `llvm/test/CodeGen/RISCV/branch-relaxation.ll` with
`update_llc_test_checks.py`, according to
https://reviews.llvm.org/D130560#3746417:
>>! In D130560#3746417, @luismarques wrote:
>>>! In D130560#3746379, @luismarques wrote:
>> The tests don't seem to have been properly updated with
>> `update_llc_test_checks.py`.
>> `llvm/test/CodeGen/RISCV/branch-relaxation.ll` contains RV64 RUN
>> lines but the corresponding CHECK lines are missing in
>> some functions.
>
> Looking more closely at this, I guess you tried to only include the
> `CHECK-RV64` and `CHECK-RV32` checks when relevant. That's a good
> instinct but I guess it goes a bit against how we normally use
> `update_llc_test_checks.py`. My understanding of the trade-off of
> using that tool is that the test updates are much easier, even if
> sometimes the CHECKs aren't as tight as something more tailormade.
Added:
Modified:
llvm/test/CodeGen/RISCV/branch-relaxation.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/RISCV/branch-relaxation.ll b/llvm/test/CodeGen/RISCV/branch-relaxation.ll
index 8842b4191cc9c..d685d16cb57cc 100644
--- a/llvm/test/CodeGen/RISCV/branch-relaxation.ll
+++ b/llvm/test/CodeGen/RISCV/branch-relaxation.ll
@@ -78,6 +78,10 @@ tail:
ret i32 1
}
+; For functions whose names contain 32, only the CHECK-RV32 lines are
+; meaningful, and for functions whose names contain 64, only the CHECK-RV64
+; lines are meaningful.
+
define void @relax_jal_spill_32() {
; CHECK-RV32-LABEL: relax_jal_spill_32:
; CHECK-RV32: # %bb.0:
@@ -304,6 +308,234 @@ define void @relax_jal_spill_32() {
; CHECK-RV32-NEXT: lw s11, 12(sp) # 4-byte Folded Reload
; CHECK-RV32-NEXT: addi sp, sp, 64
; CHECK-RV32-NEXT: ret
+;
+; CHECK-RV64-LABEL: relax_jal_spill_32:
+; CHECK-RV64: # %bb.0:
+; CHECK-RV64-NEXT: addi sp, sp, -128
+; CHECK-RV64-NEXT: .cfi_def_cfa_offset 128
+; CHECK-RV64-NEXT: sd ra, 120(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s0, 112(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s1, 104(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s2, 96(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s3, 88(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s4, 80(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s5, 72(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s6, 64(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s7, 56(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s8, 48(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s9, 40(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s10, 32(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s11, 24(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: .cfi_offset ra, -8
+; CHECK-RV64-NEXT: .cfi_offset s0, -16
+; CHECK-RV64-NEXT: .cfi_offset s1, -24
+; CHECK-RV64-NEXT: .cfi_offset s2, -32
+; CHECK-RV64-NEXT: .cfi_offset s3, -40
+; CHECK-RV64-NEXT: .cfi_offset s4, -48
+; CHECK-RV64-NEXT: .cfi_offset s5, -56
+; CHECK-RV64-NEXT: .cfi_offset s6, -64
+; CHECK-RV64-NEXT: .cfi_offset s7, -72
+; CHECK-RV64-NEXT: .cfi_offset s8, -80
+; CHECK-RV64-NEXT: .cfi_offset s9, -88
+; CHECK-RV64-NEXT: .cfi_offset s10, -96
+; CHECK-RV64-NEXT: .cfi_offset s11, -104
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li ra, 1
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: sd ra, 16(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t0, 5
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: sd t0, 8(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t1, 6
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t2, 7
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s0, 8
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s1, 9
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a0, 10
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a1, 11
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a2, 12
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a3, 13
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a4, 14
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a5, 15
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a6, 16
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a7, 17
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s2, 18
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s3, 19
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s4, 20
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s5, 21
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s6, 22
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s7, 23
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s8, 24
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s9, 25
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s10, 26
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s11, 27
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t3, 28
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t4, 29
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t5, 30
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: sext.w t0, t5
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t6, 31
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: sext.w ra, t6
+; CHECK-RV64-NEXT: beq t0, ra, .LBB2_1
+; CHECK-RV64-NEXT: # %bb.3:
+; CHECK-RV64-NEXT: jump .LBB2_2, t0
+; CHECK-RV64-NEXT: .LBB2_1: # %branch_1
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: .zero 1048576
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: .LBB2_2: # %branch_2
+; CHECK-RV64-NEXT: ld ra, 16(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use ra
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: ld t0, 8(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t0
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t1
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t2
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s0
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s1
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a0
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a1
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a2
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a3
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a4
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a5
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a6
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a7
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s2
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s3
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s4
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s5
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s6
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s7
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s8
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s9
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s10
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s11
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t3
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t4
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t5
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t6
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: ld ra, 120(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s0, 112(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s1, 104(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s2, 96(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s3, 88(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s4, 80(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s5, 72(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s6, 64(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s7, 56(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s8, 48(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s9, 40(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s10, 32(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s11, 24(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: addi sp, sp, 128
+; CHECK-RV64-NEXT: ret
%ra = call i32 asm sideeffect "addi ra, x0, 1", "={ra}"()
%t0 = call i32 asm sideeffect "addi t0, x0, 5", "={t0}"()
@@ -612,74 +844,326 @@ define void @relax_jal_spill_32_adjust_spill_slot() {
; CHECK-RV32-NEXT: lw s11, 1980(sp) # 4-byte Folded Reload
; CHECK-RV32-NEXT: addi sp, sp, 2032
; CHECK-RV32-NEXT: ret
-
- ; If the stack is large and the offset of BranchRelaxationScratchFrameIndex
- ; is out the range of 12-bit signed integer, check whether the spill slot is
- ; adjusted to close to the stack base register.
- %stack_obj = alloca i32, align 4096
-
- %ra = call i32 asm sideeffect "addi ra, x0, 1", "={ra}"()
- %t0 = call i32 asm sideeffect "addi t0, x0, 5", "={t0}"()
- %t1 = call i32 asm sideeffect "addi t1, x0, 6", "={t1}"()
- %t2 = call i32 asm sideeffect "addi t2, x0, 7", "={t2}"()
- %s0 = call i32 asm sideeffect "addi s0, x0, 8", "={s0}"()
- %s1 = call i32 asm sideeffect "addi s1, x0, 9", "={s1}"()
- %a0 = call i32 asm sideeffect "addi a0, x0, 10", "={a0}"()
- %a1 = call i32 asm sideeffect "addi a1, x0, 11", "={a1}"()
- %a2 = call i32 asm sideeffect "addi a2, x0, 12", "={a2}"()
- %a3 = call i32 asm sideeffect "addi a3, x0, 13", "={a3}"()
- %a4 = call i32 asm sideeffect "addi a4, x0, 14", "={a4}"()
- %a5 = call i32 asm sideeffect "addi a5, x0, 15", "={a5}"()
- %a6 = call i32 asm sideeffect "addi a6, x0, 16", "={a6}"()
- %a7 = call i32 asm sideeffect "addi a7, x0, 17", "={a7}"()
- %s2 = call i32 asm sideeffect "addi s2, x0, 18", "={s2}"()
- %s3 = call i32 asm sideeffect "addi s3, x0, 19", "={s3}"()
- %s4 = call i32 asm sideeffect "addi s4, x0, 20", "={s4}"()
- %s5 = call i32 asm sideeffect "addi s5, x0, 21", "={s5}"()
- %s6 = call i32 asm sideeffect "addi s6, x0, 22", "={s6}"()
- %s7 = call i32 asm sideeffect "addi s7, x0, 23", "={s7}"()
- %s8 = call i32 asm sideeffect "addi s8, x0, 24", "={s8}"()
- %s9 = call i32 asm sideeffect "addi s9, x0, 25", "={s9}"()
- %s10 = call i32 asm sideeffect "addi s10, x0, 26", "={s10}"()
- %s11 = call i32 asm sideeffect "addi s11, x0, 27", "={s11}"()
- %t3 = call i32 asm sideeffect "addi t3, x0, 28", "={t3}"()
- %t4 = call i32 asm sideeffect "addi t4, x0, 29", "={t4}"()
- %t5 = call i32 asm sideeffect "addi t5, x0, 30", "={t5}"()
- %t6 = call i32 asm sideeffect "addi t6, x0, 31", "={t6}"()
-
- %cmp = icmp eq i32 %t5, %t6
- br i1 %cmp, label %branch_1, label %branch_2
-
-branch_1:
- call void asm sideeffect ".space 1048576", ""()
- br label %branch_2
-
-branch_2:
- call void asm sideeffect "# reg use $0", "{ra}"(i32 %ra)
- call void asm sideeffect "# reg use $0", "{t0}"(i32 %t0)
- call void asm sideeffect "# reg use $0", "{t1}"(i32 %t1)
- call void asm sideeffect "# reg use $0", "{t2}"(i32 %t2)
- call void asm sideeffect "# reg use $0", "{s0}"(i32 %s0)
- call void asm sideeffect "# reg use $0", "{s1}"(i32 %s1)
- call void asm sideeffect "# reg use $0", "{a0}"(i32 %a0)
- call void asm sideeffect "# reg use $0", "{a1}"(i32 %a1)
- call void asm sideeffect "# reg use $0", "{a2}"(i32 %a2)
- call void asm sideeffect "# reg use $0", "{a3}"(i32 %a3)
- call void asm sideeffect "# reg use $0", "{a4}"(i32 %a4)
- call void asm sideeffect "# reg use $0", "{a5}"(i32 %a5)
- call void asm sideeffect "# reg use $0", "{a6}"(i32 %a6)
- call void asm sideeffect "# reg use $0", "{a7}"(i32 %a7)
- call void asm sideeffect "# reg use $0", "{s2}"(i32 %s2)
- call void asm sideeffect "# reg use $0", "{s3}"(i32 %s3)
- call void asm sideeffect "# reg use $0", "{s4}"(i32 %s4)
- call void asm sideeffect "# reg use $0", "{s5}"(i32 %s5)
- call void asm sideeffect "# reg use $0", "{s6}"(i32 %s6)
- call void asm sideeffect "# reg use $0", "{s7}"(i32 %s7)
- call void asm sideeffect "# reg use $0", "{s8}"(i32 %s8)
- call void asm sideeffect "# reg use $0", "{s9}"(i32 %s9)
- call void asm sideeffect "# reg use $0", "{s10}"(i32 %s10)
- call void asm sideeffect "# reg use $0", "{s11}"(i32 %s11)
- call void asm sideeffect "# reg use $0", "{t3}"(i32 %t3)
+;
+; CHECK-RV64-LABEL: relax_jal_spill_32_adjust_spill_slot:
+; CHECK-RV64: # %bb.0:
+; CHECK-RV64-NEXT: addi sp, sp, -2032
+; CHECK-RV64-NEXT: .cfi_def_cfa_offset 2032
+; CHECK-RV64-NEXT: sd ra, 2024(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s0, 2016(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s1, 2008(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s2, 2000(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s3, 1992(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s4, 1984(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s5, 1976(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s6, 1968(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s7, 1960(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s8, 1952(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s9, 1944(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s10, 1936(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: sd s11, 1928(sp) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: .cfi_offset ra, -8
+; CHECK-RV64-NEXT: .cfi_offset s0, -16
+; CHECK-RV64-NEXT: .cfi_offset s1, -24
+; CHECK-RV64-NEXT: .cfi_offset s2, -32
+; CHECK-RV64-NEXT: .cfi_offset s3, -40
+; CHECK-RV64-NEXT: .cfi_offset s4, -48
+; CHECK-RV64-NEXT: .cfi_offset s5, -56
+; CHECK-RV64-NEXT: .cfi_offset s6, -64
+; CHECK-RV64-NEXT: .cfi_offset s7, -72
+; CHECK-RV64-NEXT: .cfi_offset s8, -80
+; CHECK-RV64-NEXT: .cfi_offset s9, -88
+; CHECK-RV64-NEXT: .cfi_offset s10, -96
+; CHECK-RV64-NEXT: .cfi_offset s11, -104
+; CHECK-RV64-NEXT: addi s0, sp, 2032
+; CHECK-RV64-NEXT: .cfi_def_cfa s0, 0
+; CHECK-RV64-NEXT: lui a0, 2
+; CHECK-RV64-NEXT: addiw a0, a0, -2032
+; CHECK-RV64-NEXT: sub sp, sp, a0
+; CHECK-RV64-NEXT: srli a0, sp, 12
+; CHECK-RV64-NEXT: slli sp, a0, 12
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li ra, 1
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: lui a0, 1
+; CHECK-RV64-NEXT: addiw a0, a0, -8
+; CHECK-RV64-NEXT: add a0, sp, a0
+; CHECK-RV64-NEXT: sd ra, 0(a0) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t0, 5
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: lui a0, 1
+; CHECK-RV64-NEXT: addiw a0, a0, -16
+; CHECK-RV64-NEXT: add a0, sp, a0
+; CHECK-RV64-NEXT: sd t0, 0(a0) # 8-byte Folded Spill
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t1, 6
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t2, 7
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s0, 8
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s1, 9
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a0, 10
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a1, 11
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a2, 12
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a3, 13
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a4, 14
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a5, 15
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a6, 16
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li a7, 17
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s2, 18
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s3, 19
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s4, 20
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s5, 21
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s6, 22
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s7, 23
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s8, 24
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s9, 25
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s10, 26
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li s11, 27
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t3, 28
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t4, 29
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t5, 30
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: sext.w t0, t5
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: li t6, 31
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: sext.w ra, t6
+; CHECK-RV64-NEXT: beq t0, ra, .LBB3_1
+; CHECK-RV64-NEXT: # %bb.3:
+; CHECK-RV64-NEXT: jump .LBB3_2, t0
+; CHECK-RV64-NEXT: .LBB3_1: # %branch_1
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: .zero 1048576
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: .LBB3_2: # %branch_2
+; CHECK-RV64-NEXT: lui t0, 1
+; CHECK-RV64-NEXT: addiw t0, t0, -8
+; CHECK-RV64-NEXT: add t0, sp, t0
+; CHECK-RV64-NEXT: ld ra, 0(t0) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use ra
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: lui t0, 1
+; CHECK-RV64-NEXT: addiw t0, t0, -16
+; CHECK-RV64-NEXT: add t0, sp, t0
+; CHECK-RV64-NEXT: ld t0, 0(t0) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t0
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t1
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t2
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s0
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s1
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a0
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a1
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a2
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a3
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a4
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a5
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a6
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use a7
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s2
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s3
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s4
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s5
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s6
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s7
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s8
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s9
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s10
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use s11
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t3
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t4
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t5
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: #APP
+; CHECK-RV64-NEXT: # reg use t6
+; CHECK-RV64-NEXT: #NO_APP
+; CHECK-RV64-NEXT: lui a0, 2
+; CHECK-RV64-NEXT: sub sp, s0, a0
+; CHECK-RV64-NEXT: lui a0, 2
+; CHECK-RV64-NEXT: addiw a0, a0, -2032
+; CHECK-RV64-NEXT: add sp, sp, a0
+; CHECK-RV64-NEXT: ld ra, 2024(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s0, 2016(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s1, 2008(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s2, 2000(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s3, 1992(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s4, 1984(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s5, 1976(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s6, 1968(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s7, 1960(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s8, 1952(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s9, 1944(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s10, 1936(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: ld s11, 1928(sp) # 8-byte Folded Reload
+; CHECK-RV64-NEXT: addi sp, sp, 2032
+; CHECK-RV64-NEXT: ret
+
+ ; If the stack is large and the offset of BranchRelaxationScratchFrameIndex
+ ; is out the range of 12-bit signed integer, check whether the spill slot is
+ ; adjusted to close to the stack base register.
+ %stack_obj = alloca i32, align 4096
+
+ %ra = call i32 asm sideeffect "addi ra, x0, 1", "={ra}"()
+ %t0 = call i32 asm sideeffect "addi t0, x0, 5", "={t0}"()
+ %t1 = call i32 asm sideeffect "addi t1, x0, 6", "={t1}"()
+ %t2 = call i32 asm sideeffect "addi t2, x0, 7", "={t2}"()
+ %s0 = call i32 asm sideeffect "addi s0, x0, 8", "={s0}"()
+ %s1 = call i32 asm sideeffect "addi s1, x0, 9", "={s1}"()
+ %a0 = call i32 asm sideeffect "addi a0, x0, 10", "={a0}"()
+ %a1 = call i32 asm sideeffect "addi a1, x0, 11", "={a1}"()
+ %a2 = call i32 asm sideeffect "addi a2, x0, 12", "={a2}"()
+ %a3 = call i32 asm sideeffect "addi a3, x0, 13", "={a3}"()
+ %a4 = call i32 asm sideeffect "addi a4, x0, 14", "={a4}"()
+ %a5 = call i32 asm sideeffect "addi a5, x0, 15", "={a5}"()
+ %a6 = call i32 asm sideeffect "addi a6, x0, 16", "={a6}"()
+ %a7 = call i32 asm sideeffect "addi a7, x0, 17", "={a7}"()
+ %s2 = call i32 asm sideeffect "addi s2, x0, 18", "={s2}"()
+ %s3 = call i32 asm sideeffect "addi s3, x0, 19", "={s3}"()
+ %s4 = call i32 asm sideeffect "addi s4, x0, 20", "={s4}"()
+ %s5 = call i32 asm sideeffect "addi s5, x0, 21", "={s5}"()
+ %s6 = call i32 asm sideeffect "addi s6, x0, 22", "={s6}"()
+ %s7 = call i32 asm sideeffect "addi s7, x0, 23", "={s7}"()
+ %s8 = call i32 asm sideeffect "addi s8, x0, 24", "={s8}"()
+ %s9 = call i32 asm sideeffect "addi s9, x0, 25", "={s9}"()
+ %s10 = call i32 asm sideeffect "addi s10, x0, 26", "={s10}"()
+ %s11 = call i32 asm sideeffect "addi s11, x0, 27", "={s11}"()
+ %t3 = call i32 asm sideeffect "addi t3, x0, 28", "={t3}"()
+ %t4 = call i32 asm sideeffect "addi t4, x0, 29", "={t4}"()
+ %t5 = call i32 asm sideeffect "addi t5, x0, 30", "={t5}"()
+ %t6 = call i32 asm sideeffect "addi t6, x0, 31", "={t6}"()
+
+ %cmp = icmp eq i32 %t5, %t6
+ br i1 %cmp, label %branch_1, label %branch_2
+
+branch_1:
+ call void asm sideeffect ".space 1048576", ""()
+ br label %branch_2
+
+branch_2:
+ call void asm sideeffect "# reg use $0", "{ra}"(i32 %ra)
+ call void asm sideeffect "# reg use $0", "{t0}"(i32 %t0)
+ call void asm sideeffect "# reg use $0", "{t1}"(i32 %t1)
+ call void asm sideeffect "# reg use $0", "{t2}"(i32 %t2)
+ call void asm sideeffect "# reg use $0", "{s0}"(i32 %s0)
+ call void asm sideeffect "# reg use $0", "{s1}"(i32 %s1)
+ call void asm sideeffect "# reg use $0", "{a0}"(i32 %a0)
+ call void asm sideeffect "# reg use $0", "{a1}"(i32 %a1)
+ call void asm sideeffect "# reg use $0", "{a2}"(i32 %a2)
+ call void asm sideeffect "# reg use $0", "{a3}"(i32 %a3)
+ call void asm sideeffect "# reg use $0", "{a4}"(i32 %a4)
+ call void asm sideeffect "# reg use $0", "{a5}"(i32 %a5)
+ call void asm sideeffect "# reg use $0", "{a6}"(i32 %a6)
+ call void asm sideeffect "# reg use $0", "{a7}"(i32 %a7)
+ call void asm sideeffect "# reg use $0", "{s2}"(i32 %s2)
+ call void asm sideeffect "# reg use $0", "{s3}"(i32 %s3)
+ call void asm sideeffect "# reg use $0", "{s4}"(i32 %s4)
+ call void asm sideeffect "# reg use $0", "{s5}"(i32 %s5)
+ call void asm sideeffect "# reg use $0", "{s6}"(i32 %s6)
+ call void asm sideeffect "# reg use $0", "{s7}"(i32 %s7)
+ call void asm sideeffect "# reg use $0", "{s8}"(i32 %s8)
+ call void asm sideeffect "# reg use $0", "{s9}"(i32 %s9)
+ call void asm sideeffect "# reg use $0", "{s10}"(i32 %s10)
+ call void asm sideeffect "# reg use $0", "{s11}"(i32 %s11)
+ call void asm sideeffect "# reg use $0", "{t3}"(i32 %t3)
call void asm sideeffect "# reg use $0", "{t4}"(i32 %t4)
call void asm sideeffect "# reg use $0", "{t5}"(i32 %t5)
call void asm sideeffect "# reg use $0", "{t6}"(i32 %t6)
@@ -688,6 +1172,336 @@ branch_2:
}
define void @relax_jal_spill_64() {
+; CHECK-RV32-LABEL: relax_jal_spill_64:
+; CHECK-RV32: # %bb.0:
+; CHECK-RV32-NEXT: addi sp, sp, -272
+; CHECK-RV32-NEXT: .cfi_def_cfa_offset 272
+; CHECK-RV32-NEXT: sw ra, 268(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s0, 264(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s1, 260(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s2, 256(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s3, 252(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s4, 248(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s5, 244(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s6, 240(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s7, 236(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s8, 232(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s9, 228(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s10, 224(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s11, 220(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: .cfi_offset ra, -4
+; CHECK-RV32-NEXT: .cfi_offset s0, -8
+; CHECK-RV32-NEXT: .cfi_offset s1, -12
+; CHECK-RV32-NEXT: .cfi_offset s2, -16
+; CHECK-RV32-NEXT: .cfi_offset s3, -20
+; CHECK-RV32-NEXT: .cfi_offset s4, -24
+; CHECK-RV32-NEXT: .cfi_offset s5, -28
+; CHECK-RV32-NEXT: .cfi_offset s6, -32
+; CHECK-RV32-NEXT: .cfi_offset s7, -36
+; CHECK-RV32-NEXT: .cfi_offset s8, -40
+; CHECK-RV32-NEXT: .cfi_offset s9, -44
+; CHECK-RV32-NEXT: .cfi_offset s10, -48
+; CHECK-RV32-NEXT: .cfi_offset s11, -52
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li ra, 1
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t0, 5
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw t0, 212(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw t1, 216(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t1, 6
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw t1, 204(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw t2, 208(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t2, 7
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw t2, 196(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw t3, 200(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s0, 8
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s0, 188(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s1, 192(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s1, 9
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s1, 180(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s2, 184(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a0, 10
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw a1, 176(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a1, 11
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw a1, 168(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw a2, 172(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a2, 12
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw a2, 160(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw a3, 164(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a3, 13
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw a3, 152(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw a4, 156(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a4, 14
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw a4, 144(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw a5, 148(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a5, 15
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw a5, 136(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw a6, 140(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a6, 16
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw a6, 128(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw a7, 132(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a7, 17
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw a7, 120(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw t0, 124(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s2, 18
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s2, 112(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s3, 116(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s3, 19
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s3, 104(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s4, 108(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s4, 20
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s4, 96(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s5, 100(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s5, 21
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s5, 88(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s6, 92(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s6, 22
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s6, 80(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s7, 84(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s7, 23
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s7, 72(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s8, 76(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s8, 24
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s8, 64(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s9, 68(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s9, 25
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s9, 56(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s10, 60(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s10, 26
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s10, 48(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s11, 52(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s11, 27
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw s11, 44(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t3, 28
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw t3, 36(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw t4, 40(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t4, 29
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: sw t4, 28(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw t5, 32(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t5, 30
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: mv a1, t6
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t6, 31
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: mv a2, t6
+; CHECK-RV32-NEXT: mv t6, a1
+; CHECK-RV32-NEXT: sw s0, 20(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: xor a1, a1, s0
+; CHECK-RV32-NEXT: sw t5, 24(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw a2, 16(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: xor a2, t5, a2
+; CHECK-RV32-NEXT: or a1, a2, a1
+; CHECK-RV32-NEXT: beqz a1, .LBB4_1
+; CHECK-RV32-NEXT: # %bb.3:
+; CHECK-RV32-NEXT: jump .LBB4_2, a1
+; CHECK-RV32-NEXT: .LBB4_1: # %branch_1
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: .zero 1048576
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: .LBB4_2: # %branch_2
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use ra
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw t0, 212(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw t1, 216(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t0
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw t1, 204(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw t2, 208(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t1
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw t2, 196(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw t3, 200(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t2
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s0, 188(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s1, 192(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s0
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s1, 180(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s2, 184(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s1
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw a1, 176(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a0
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw a1, 168(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw a2, 172(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a1
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw a2, 160(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw a3, 164(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a2
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw a3, 152(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw a4, 156(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a3
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw a4, 144(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw a5, 148(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a4
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw a5, 136(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw a6, 140(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a5
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw a6, 128(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw a7, 132(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a6
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw a7, 120(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw t0, 124(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a7
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s2, 112(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s3, 116(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s2
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s3, 104(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s4, 108(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s3
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s4, 96(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s5, 100(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s4
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s5, 88(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s6, 92(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s5
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s6, 80(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s7, 84(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s6
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s7, 72(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s8, 76(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s7
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s8, 64(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s9, 68(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s8
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s9, 56(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s10, 60(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s9
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s10, 48(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s11, 52(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s10
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw s11, 44(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s11
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw t3, 36(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw t4, 40(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t3
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw t4, 28(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw t5, 32(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t4
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw t5, 24(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t5
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw t6, 16(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s0, 20(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t6
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lw ra, 268(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s0, 264(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s1, 260(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s2, 256(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s3, 252(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s4, 248(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s5, 244(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s6, 240(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s7, 236(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s8, 232(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s9, 228(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s10, 224(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s11, 220(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: addi sp, sp, 272
+; CHECK-RV32-NEXT: ret
+;
; CHECK-RV64-LABEL: relax_jal_spill_64:
; CHECK-RV64: # %bb.0:
; CHECK-RV64-NEXT: addi sp, sp, -112
@@ -984,6 +1798,654 @@ branch_2:
}
define void @relax_jal_spill_64_adjust_spill_slot() {
+; CHECK-RV32-LABEL: relax_jal_spill_64_adjust_spill_slot:
+; CHECK-RV32: # %bb.0:
+; CHECK-RV32-NEXT: addi sp, sp, -2032
+; CHECK-RV32-NEXT: .cfi_def_cfa_offset 2032
+; CHECK-RV32-NEXT: sw ra, 2028(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s0, 2024(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s1, 2020(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s2, 2016(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s3, 2012(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s4, 2008(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s5, 2004(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s6, 2000(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s7, 1996(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s8, 1992(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s9, 1988(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s10, 1984(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: sw s11, 1980(sp) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: .cfi_offset ra, -4
+; CHECK-RV32-NEXT: .cfi_offset s0, -8
+; CHECK-RV32-NEXT: .cfi_offset s1, -12
+; CHECK-RV32-NEXT: .cfi_offset s2, -16
+; CHECK-RV32-NEXT: .cfi_offset s3, -20
+; CHECK-RV32-NEXT: .cfi_offset s4, -24
+; CHECK-RV32-NEXT: .cfi_offset s5, -28
+; CHECK-RV32-NEXT: .cfi_offset s6, -32
+; CHECK-RV32-NEXT: .cfi_offset s7, -36
+; CHECK-RV32-NEXT: .cfi_offset s8, -40
+; CHECK-RV32-NEXT: .cfi_offset s9, -44
+; CHECK-RV32-NEXT: .cfi_offset s10, -48
+; CHECK-RV32-NEXT: .cfi_offset s11, -52
+; CHECK-RV32-NEXT: addi s0, sp, 2032
+; CHECK-RV32-NEXT: .cfi_def_cfa s0, 0
+; CHECK-RV32-NEXT: lui a0, 2
+; CHECK-RV32-NEXT: addi a0, a0, -2032
+; CHECK-RV32-NEXT: sub sp, sp, a0
+; CHECK-RV32-NEXT: srli a0, sp, 12
+; CHECK-RV32-NEXT: slli sp, a0, 12
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li ra, 1
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t0, 5
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -8
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: sw t0, 0(a0) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -4
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: sw t1, 0(a0) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t1, 6
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -16
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: sw t1, 0(a0) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -12
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: sw t2, 0(a0) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t2, 7
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -24
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: sw t2, 0(a0) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -20
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: sw t3, 0(a0) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s0, 8
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -32
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: sw s0, 0(a0) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -28
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: sw s1, 0(a0) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s1, 9
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -40
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: sw s1, 0(a0) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -36
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: sw s2, 0(a0) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a0, 10
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a2, 1
+; CHECK-RV32-NEXT: addi a2, a2, -44
+; CHECK-RV32-NEXT: add a2, sp, a2
+; CHECK-RV32-NEXT: sw a1, 0(a2) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a1, 11
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a3, 1
+; CHECK-RV32-NEXT: addi a3, a3, -52
+; CHECK-RV32-NEXT: add a3, sp, a3
+; CHECK-RV32-NEXT: sw a1, 0(a3) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -48
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a2, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a2, 12
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -60
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a2, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -56
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a3, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a3, 13
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -68
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a3, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -64
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a4, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a4, 14
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -76
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a4, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -72
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a5, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a5, 15
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -84
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a5, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -80
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a6, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a6, 16
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -92
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a6, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -88
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a7, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li a7, 17
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -100
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw a7, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -96
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw t0, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s2, 18
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -108
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s2, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -104
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s3, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s3, 19
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -116
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s3, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -112
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s4, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s4, 20
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -124
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s4, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -120
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s5, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s5, 21
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -132
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s5, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -128
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s6, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s6, 22
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -140
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s6, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -136
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s7, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s7, 23
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -148
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s7, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -144
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s8, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s8, 24
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -156
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s8, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -152
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s9, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s9, 25
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -164
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s9, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -160
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s10, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s10, 26
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -172
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s10, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -168
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s11, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li s11, 27
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -176
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw s11, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t3, 28
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -184
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw t3, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -180
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw t4, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t4, 29
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -192
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw t4, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -188
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: sw t5, 0(a1) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t5, 30
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: mv a1, t6
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: li t6, 31
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: mv a2, t6
+; CHECK-RV32-NEXT: mv t6, a1
+; CHECK-RV32-NEXT: lui a3, 1
+; CHECK-RV32-NEXT: addi a3, a3, -204
+; CHECK-RV32-NEXT: add a3, sp, a3
+; CHECK-RV32-NEXT: sw s0, 0(a3) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: xor a1, a1, s0
+; CHECK-RV32-NEXT: lui a3, 1
+; CHECK-RV32-NEXT: addi a3, a3, -196
+; CHECK-RV32-NEXT: add a3, sp, a3
+; CHECK-RV32-NEXT: sw t5, 0(a3) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: lui a3, 1
+; CHECK-RV32-NEXT: addi a3, a3, -200
+; CHECK-RV32-NEXT: add a3, sp, a3
+; CHECK-RV32-NEXT: sw a2, 0(a3) # 4-byte Folded Spill
+; CHECK-RV32-NEXT: xor a2, t5, a2
+; CHECK-RV32-NEXT: or a1, a2, a1
+; CHECK-RV32-NEXT: beqz a1, .LBB5_1
+; CHECK-RV32-NEXT: # %bb.3:
+; CHECK-RV32-NEXT: jump .LBB5_2, a1
+; CHECK-RV32-NEXT: .LBB5_1: # %branch_1
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: .zero 1048576
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: .LBB5_2: # %branch_2
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use ra
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -8
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: lw t0, 0(a1) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -4
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: lw t1, 0(a1) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t0
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -16
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: lw t1, 0(a1) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -12
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: lw t2, 0(a1) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t1
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -24
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: lw t2, 0(a1) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -20
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: lw t3, 0(a1) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t2
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -32
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: lw s0, 0(a1) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -28
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: lw s1, 0(a1) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s0
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -40
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: lw s1, 0(a1) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -36
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: lw s2, 0(a1) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s1
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a1, 1
+; CHECK-RV32-NEXT: addi a1, a1, -44
+; CHECK-RV32-NEXT: add a1, sp, a1
+; CHECK-RV32-NEXT: lw a1, 0(a1) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a0
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -52
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a1, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -48
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a2, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a1
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -60
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a2, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -56
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a3, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a2
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -68
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a3, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -64
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a4, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a3
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -76
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a4, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -72
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a5, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a4
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -84
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a5, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -80
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a6, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a5
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -92
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a6, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -88
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a7, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a6
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -100
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw a7, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -96
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw t0, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use a7
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -108
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s2, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -104
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s3, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s2
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -116
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s3, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -112
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s4, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s3
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -124
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s4, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -120
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s5, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s4
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -132
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s5, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -128
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s6, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s5
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -140
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s6, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -136
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s7, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s6
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -148
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s7, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -144
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s8, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s7
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -156
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s8, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -152
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s9, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s8
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -164
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s9, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -160
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s10, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s9
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -172
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s10, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -168
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s11, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s10
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -176
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s11, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use s11
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -184
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw t3, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -180
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw t4, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t3
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -192
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw t4, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -188
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw t5, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t4
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -196
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw t5, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t5
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -204
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw s0, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lui a0, 1
+; CHECK-RV32-NEXT: addi a0, a0, -200
+; CHECK-RV32-NEXT: add a0, sp, a0
+; CHECK-RV32-NEXT: lw t6, 0(a0) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: #APP
+; CHECK-RV32-NEXT: # reg use t6
+; CHECK-RV32-NEXT: #NO_APP
+; CHECK-RV32-NEXT: lui a0, 2
+; CHECK-RV32-NEXT: sub sp, s0, a0
+; CHECK-RV32-NEXT: lui a0, 2
+; CHECK-RV32-NEXT: addi a0, a0, -2032
+; CHECK-RV32-NEXT: add sp, sp, a0
+; CHECK-RV32-NEXT: lw ra, 2028(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s0, 2024(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s1, 2020(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s2, 2016(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s3, 2012(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s4, 2008(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s5, 2004(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s6, 2000(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s7, 1996(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s8, 1992(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s9, 1988(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s10, 1984(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: lw s11, 1980(sp) # 4-byte Folded Reload
+; CHECK-RV32-NEXT: addi sp, sp, 2032
+; CHECK-RV32-NEXT: ret
+;
; CHECK-RV64-LABEL: relax_jal_spill_64_adjust_spill_slot:
; CHECK-RV64: # %bb.0:
; CHECK-RV64-NEXT: addi sp, sp, -2032
More information about the llvm-commits
mailing list