blob: 0f0b3edade0a2975ce8b5cf204553cf927292a6f [file] [log] [blame]
Reed Kotler0ff40012013-12-10 14:29:38 +00001; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -relocation-model=pic < %s | FileCheck %s -check-prefix=NEG
2
3; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -relocation-model=static < %s | FileCheck %s -check-prefix=NEG
4
5; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -relocation-model=pic < %s | FileCheck %s
6
7; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -relocation-model=static < %s | FileCheck %s
8
9@xi = common global i32 0, align 4
10@x = common global float 0.000000e+00, align 4
11@xd = common global double 0.000000e+00, align 8
12
13; Function Attrs: nounwind
14define void @it() #0 {
15entry:
16 %call = call i32 @i(i32 1)
17 store i32 %call, i32* @xi, align 4
18 ret void
19; CHECK: .ent it
20; NEG: .ent it
21; CHECK: save $ra, $16, $17, [[FS:[0-9]+]]
22; NEG-NOT: save $ra, $16, $17, [[FS:[0-9]+]], $18
23; CHECK: restore $ra, $16, $17, [[FS]]
24; NEG-NOT: restore $ra, $16, $17, [[FS:[0-9]+]], $18
25; CHECK: .end it
26; NEG: .end it
27}
28
29declare i32 @i(i32) #1
30
31; Function Attrs: nounwind
32define void @ft() #0 {
33entry:
34 %call = call float @f()
35 store float %call, float* @x, align 4
36 ret void
37; CHECK: .ent ft
38; CHECK: save $ra, $16, $17, [[FS:[0-9]+]], $18
39; CHECK: restore $ra, $16, $17, [[FS]], $18
40; CHECK: .end ft
41}
42
43declare float @f() #1
44
45; Function Attrs: nounwind
46define void @dt() #0 {
47entry:
48 %call = call double @d()
49 store double %call, double* @xd, align 8
50 ret void
51; CHECK: .ent dt
52; CHECK: save $ra, $16, $17, [[FS:[0-9]+]], $18
53; CHECK: restore $ra, $16, $17, [[FS]], $18
54; CHECK: .end dt
55}
56
57declare double @d() #1
58
59; Function Attrs: nounwind
60define void @fft() #0 {
61entry:
62 %0 = load float* @x, align 4
63 %call = call float @ff(float %0)
64 store float %call, float* @x, align 4
65 ret void
66; CHECK: .ent fft
67; CHECK: save $ra, $16, $17, [[FS:[0-9]+]], $18
68; CHECK: restore $ra, $16, $17, [[FS]], $18
69; CHECK: .end fft
70}
71
72declare float @ff(float) #1
73
74; Function Attrs: nounwind
75define void @vft() #0 {
76entry:
77 %0 = load float* @x, align 4
78 call void @vf(float %0)
79 ret void
80; CHECK: .ent vft
81; NEG: .ent vft
82; CHECK: save $ra, $16, $17, [[FS:[0-9]+]]
83; NEG-NOT: save $ra, $16, $17, [[FS:[0-9]+]], $18
84; CHECK: restore $ra, $16, $17, [[FS]]
85; NEG-NOT: restore $ra, $16, $17, [[FS:[0-9]+]], $18
86; CHECK: .end vft
87; NEG: .end vft
88}
89
90declare void @vf(float) #1
91
92attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
93attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
94
95