blob: 280c56e4db6a4cfdf023f23789ab6a9b3dfa67e9 [file] [log] [blame]
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=mips -relocation-model=static -mattr=+noabicalls \
; RUN: < %s | FileCheck %s
declare i32 @llvm.read_register.i32(metadata)
define i32 @get_gp() {
; CHECK-LABEL: get_gp:
; CHECK: # %bb.0:
; CHECK-NEXT: jr $ra
; CHECK-NEXT: move $2, $gp
%1 = call i32 @llvm.read_register.i32(metadata !0)
ret i32 %1
}
define i32 @get_sp() {
; CHECK-LABEL: get_sp:
; CHECK: # %bb.0:
; CHECK-NEXT: jr $ra
; CHECK-NEXT: move $2, $sp
%1 = call i32 @llvm.read_register.i32(metadata !1)
ret i32 %1
}
!llvm.named.register.$28 = !{!0}
!llvm.named.register.sp = !{!1}
!0 = !{!"$28"}
!1 = !{!"sp"}