1*0a6a1f1dSLionel Sambuc; Check that stubs generation for mips16 hard-float mode does not depend
2*0a6a1f1dSLionel Sambuc; on the function 'use-soft-float' attribute's value.
3*0a6a1f1dSLionel Sambuc; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel \
4*0a6a1f1dSLionel Sambuc; RUN:     -mcpu=mips16 -relocation-model=pic < %s | FileCheck %s
5*0a6a1f1dSLionel Sambuc
6*0a6a1f1dSLionel Sambucdefine void @bar_sf() #1 {
7*0a6a1f1dSLionel Sambuc; CHECK: bar_sf:
8*0a6a1f1dSLionel Sambucentry:
9*0a6a1f1dSLionel Sambuc  %call1 = call float @foo(float 1.000000e+00)
10*0a6a1f1dSLionel Sambuc; CHECK: lw $3, %call16(foo)($2)
11*0a6a1f1dSLionel Sambuc; CHECK-NOT: lw $5, %got(__mips16_call_stub_sf_1)($3)
12*0a6a1f1dSLionel Sambuc  ret void
13*0a6a1f1dSLionel Sambuc}
14*0a6a1f1dSLionel Sambuc
15*0a6a1f1dSLionel Sambucdefine void @bar_hf() #0 {
16*0a6a1f1dSLionel Sambuc; CHECK: bar_hf:
17*0a6a1f1dSLionel Sambucentry:
18*0a6a1f1dSLionel Sambuc  %call1 = call float @foo(float 1.000000e+00)
19*0a6a1f1dSLionel Sambuc; CHECK: lw $2, %call16(foo)($3)
20*0a6a1f1dSLionel Sambuc; CHECK: lw $5, %got(__mips16_call_stub_sf_1)($3)
21*0a6a1f1dSLionel Sambuc  ret void
22*0a6a1f1dSLionel Sambuc}
23*0a6a1f1dSLionel Sambuc
24*0a6a1f1dSLionel Sambucdeclare float @foo(float) #2
25*0a6a1f1dSLionel Sambuc
26*0a6a1f1dSLionel Sambucattributes #0 = {
27*0a6a1f1dSLionel Sambuc  nounwind
28*0a6a1f1dSLionel Sambuc  "less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
29*0a6a1f1dSLionel Sambuc  "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
30*0a6a1f1dSLionel Sambuc  "no-nans-fp-math"="false" "stack-protector-buffer-size"="8"
31*0a6a1f1dSLionel Sambuc  "unsafe-fp-math"="false" "use-soft-float"="false"
32*0a6a1f1dSLionel Sambuc}
33*0a6a1f1dSLionel Sambucattributes #1 = {
34*0a6a1f1dSLionel Sambuc  nounwind
35*0a6a1f1dSLionel Sambuc  "less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
36*0a6a1f1dSLionel Sambuc  "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
37*0a6a1f1dSLionel Sambuc  "no-nans-fp-math"="false" "stack-protector-buffer-size"="8"
38*0a6a1f1dSLionel Sambuc  "unsafe-fp-math"="false" "use-soft-float"="true"
39*0a6a1f1dSLionel Sambuc}
40*0a6a1f1dSLionel Sambucattributes #2 = {
41*0a6a1f1dSLionel Sambuc  "less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
42*0a6a1f1dSLionel Sambuc  "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
43*0a6a1f1dSLionel Sambuc  "no-nans-fp-math"="false" "stack-protector-buffer-size"="8"
44*0a6a1f1dSLionel Sambuc  "unsafe-fp-math"="false" "use-soft-float"="true"
45*0a6a1f1dSLionel Sambuc}
46