; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=csky -verify-machineinstrs -csky-no-aliases < %s \
; RUN: | FileCheck -check-prefix=CSKYI %s
; RUN: llc -mtriple=csky -mattr=+fpuv2_sf -mattr=+hard-float -float-abi=hard -verify-machineinstrs -csky-no-aliases < %s \
; RUN: | FileCheck -check-prefix=CSKYIF %s
; RUN: llc -mtriple=csky -mattr=+fpuv2_sf -mattr=+fpuv2_df -mattr=+hard-float -float-abi=hard -verify-machineinstrs -csky-no-aliases < %s \
; RUN: | FileCheck -check-prefix=CSKYID %s
define void @testcase() nounwind {
; CSKYI-LABEL: testcase:
; CSKYI: # %bb.0:
; CSKYI-NEXT: subi16 sp, sp, 8
; CSKYI-NEXT: st16.w l3, (sp, 4) # 4-byte Folded Spill
; CSKYI-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
; CSKYI-NEXT: subi16 sp, sp, 4
; CSKYI-NEXT: #APP
; CSKYI-NEXT: #NO_APP
; CSKYI-NEXT: addi16 sp, sp, 4
; CSKYI-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
; CSKYI-NEXT: ld16.w l3, (sp, 4) # 4-byte Folded Reload
; CSKYI-NEXT: addi16 sp, sp, 8
; CSKYI-NEXT: rts16
;
; CSKYIF-LABEL: testcase:
; CSKYIF: # %bb.0:
; CSKYIF-NEXT: subi16 sp, sp, 16
; CSKYIF-NEXT: fsts vr9, (sp, 12) # 4-byte Folded Spill
; CSKYIF-NEXT: fsts vr8, (sp, 8) # 4-byte Folded Spill
; CSKYIF-NEXT: st16.w l3, (sp, 4) # 4-byte Folded Spill
; CSKYIF-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
; CSKYIF-NEXT: subi16 sp, sp, 4
; CSKYIF-NEXT: #APP
; CSKYIF-NEXT: #NO_APP
; CSKYIF-NEXT: addi16 sp, sp, 4
; CSKYIF-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
; CSKYIF-NEXT: ld16.w l3, (sp, 4) # 4-byte Folded Reload
; CSKYIF-NEXT: flds vr8, (sp, 8) # 4-byte Folded Reload
; CSKYIF-NEXT: flds vr9, (sp, 12) # 4-byte Folded Reload
; CSKYIF-NEXT: addi16 sp, sp, 16
; CSKYIF-NEXT: rts16
;
; CSKYID-LABEL: testcase:
; CSKYID: # %bb.0:
; CSKYID-NEXT: subi16 sp, sp, 24
; CSKYID-NEXT: fstd vr9, (sp, 16) # 8-byte Folded Spill
; CSKYID-NEXT: fstd vr8, (sp, 8) # 8-byte Folded Spill
; CSKYID-NEXT: st16.w l3, (sp, 4) # 4-byte Folded Spill
; CSKYID-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
; CSKYID-NEXT: subi16 sp, sp, 4
; CSKYID-NEXT: #APP
; CSKYID-NEXT: #NO_APP
; CSKYID-NEXT: addi16 sp, sp, 4
; CSKYID-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
; CSKYID-NEXT: ld16.w l3, (sp, 4) # 4-byte Folded Reload
; CSKYID-NEXT: fldd vr8, (sp, 8) # 8-byte Folded Reload
; CSKYID-NEXT: fldd vr9, (sp, 16) # 8-byte Folded Reload
; CSKYID-NEXT: addi16 sp, sp, 24
; CSKYID-NEXT: rts16
tail call void asm sideeffect "", "~{fr8},~{fr9},~{r4},~{r7}"()
ret void
}