1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s --mtriple=loongarch64 | FileCheck %s
4 define i64 @get_stack() nounwind {
5 ; CHECK-LABEL: get_stack:
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: move $a0, $sp
10 %sp = call i64 @llvm.read_register.i64(metadata !0)
14 define void @set_stack(i64 %val) nounwind {
15 ; CHECK-LABEL: set_stack:
16 ; CHECK: # %bb.0: # %entry
17 ; CHECK-NEXT: move $sp, $a0
20 call void @llvm.write_register.i64(metadata !0, i64 %val)
24 declare i64 @llvm.read_register.i64(metadata) nounwind
25 declare void @llvm.write_register.i64(metadata, i64) nounwind