1 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC
3 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -relocation-model=static < %s | FileCheck %s -check-prefix=STATIC
6 @xi = common global i32 0, align 4
7 @x = common global float 0.000000e+00, align 4
8 @xd = common global double 0.000000e+00, align 8
10 ; Function Attrs: nounwind
11 define void @it() #0 {
13 %call = call i32 @i(i32 1)
14 store i32 %call, i32* @xi, align 4
18 ; PIC: save $16, $17, $ra, [[FS:[0-9]+]]
19 ; STATIC: save $16, $ra, [[FS:[0-9]+]]
20 ; PIC: restore $16, $17, $ra, [[FS]]
21 ; STATIC: restore $16, $ra, [[FS]]
26 declare i32 @i(i32) #1
28 ; Function Attrs: nounwind
29 define void @ft() #0 {
31 %call = call float @f()
32 store float %call, float* @x, align 4
35 ; PIC: save $16, $17, $ra, $18, [[FS:[0-9]+]]
36 ; PIC: restore $16, $17, $ra, $18, [[FS]]
42 ; Function Attrs: nounwind
43 define void @dt() #0 {
45 %call = call double @d()
46 store double %call, double* @xd, align 8
49 ; PIC: save $16, $17, $ra, $18, [[FS:[0-9]+]]
50 ; PIC: restore $16, $17, $ra, $18, [[FS]]
54 declare double @d() #1
56 ; Function Attrs: nounwind
57 define void @fft() #0 {
59 %0 = load float, float* @x, align 4
60 %call = call float @ff(float %0)
61 store float %call, float* @x, align 4
64 ; PIC: save $16, $17, $ra, $18, [[FS:[0-9]+]]
65 ; PIC: restore $16, $17, $ra, $18, [[FS]]
69 declare float @ff(float) #1
71 ; Function Attrs: nounwind
72 define void @vft() #0 {
74 %0 = load float, float* @x, align 4
75 call void @vf(float %0)
79 ; PIC: save $16, $ra, [[FS:[0-9]+]]
80 ; STATIC: save $16, $ra, [[FS:[0-9]+]]
81 ; PIC: restore $16, $ra, [[FS]]
82 ; STATIC: restore $16, $ra, [[FS]]
87 declare void @vf(float) #1
89 attributes #0 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
90 attributes #1 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }