1
;RUN: llc -march=sparc < %s | FileCheck %s -check-prefix=V8
2
;RUN: llc -march=sparc -mattr=v9 < %s | FileCheck %s -check-prefix=V9
3
;RUN: llc -march=sparc -regalloc=basic < %s | FileCheck %s -check-prefix=V8
4
;RUN: llc -march=sparc -regalloc=basic -mattr=v9 < %s | FileCheck %s -check-prefix=V9
6
define i8* @frameaddr() nounwind readnone {
9
;V8: or %g0, %fp, {{.+}}
12
;V9: or %g0, %fp, {{.+}}
13
%0 = tail call i8* @llvm.frameaddress(i32 0)
17
define i8* @frameaddr2() nounwind readnone {
21
;V8: ld [%fp+56], {{.+}}
22
;V8: ld [{{.+}}+56], {{.+}}
23
;V8: ld [{{.+}}+56], {{.+}}
27
;V9: ld [%fp+56], {{.+}}
28
;V9: ld [{{.+}}+56], {{.+}}
29
;V9: ld [{{.+}}+56], {{.+}}
30
%0 = tail call i8* @llvm.frameaddress(i32 3)
34
declare i8* @llvm.frameaddress(i32) nounwind readnone
38
define i8* @retaddr() nounwind readnone {
41
;V8: or %g0, %i7, {{.+}}
44
;V9: or %g0, %i7, {{.+}}
45
%0 = tail call i8* @llvm.returnaddress(i32 0)
49
define i8* @retaddr2() nounwind readnone {
53
;V8: ld [%fp+56], {{.+}}
54
;V8: ld [{{.+}}+56], {{.+}}
55
;V8: ld [{{.+}}+60], {{.+}}
59
;V9: ld [%fp+56], {{.+}}
60
;V9: ld [{{.+}}+56], {{.+}}
61
;V9: ld [{{.+}}+60], {{.+}}
62
%0 = tail call i8* @llvm.returnaddress(i32 3)
66
declare i8* @llvm.returnaddress(i32) nounwind readnone