1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch32 -mattr=+d < %s | FileCheck --check-prefix=LA32 %s
3 ; RUN: llc --mtriple=loongarch64 -mattr=+d < %s | FileCheck --check-prefix=LA64 %s
7 ; LA32: # %bb.0: # %entry
8 ; LA32-NEXT: addi.w $sp, $sp, -16
9 ; LA32-NEXT: .cfi_def_cfa_offset 16
10 ; LA32-NEXT: st.w $ra, $sp, 12 # 4-byte Folded Spill
11 ; LA32-NEXT: .cfi_offset 1, -4
12 ; LA32-NEXT: addi.w $a0, $sp, 16
13 ; LA32-NEXT: bl %plt(foo)
14 ; LA32-NEXT: ld.w $ra, $sp, 12 # 4-byte Folded Reload
15 ; LA32-NEXT: addi.w $sp, $sp, 16
19 ; LA64: # %bb.0: # %entry
20 ; LA64-NEXT: addi.d $sp, $sp, -16
21 ; LA64-NEXT: .cfi_def_cfa_offset 16
22 ; LA64-NEXT: st.d $ra, $sp, 8 # 8-byte Folded Spill
23 ; LA64-NEXT: .cfi_offset 1, -8
24 ; LA64-NEXT: addi.d $a0, $sp, 16
25 ; LA64-NEXT: bl %plt(foo)
26 ; LA64-NEXT: ld.d $ra, $sp, 8 # 8-byte Folded Reload
27 ; LA64-NEXT: addi.d $sp, $sp, 16
30 %0 = call ptr @llvm.eh.dwarf.cfa(i32 0)
31 call void @foo(ptr %0)
35 declare void @foo(ptr)
37 declare ptr @llvm.eh.dwarf.cfa(i32) nounwind