blob: bcae1e92f7cccaec7c4f3c09a080bcbe30f05211 [file] [log] [blame]
Simon Atanasyanfde102c2013-12-25 17:00:27 +00001; Check that stubs generation for mips16 hard-float mode does not depend
2; on the function 'use-soft-float' attribute's value.
3; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel \
Daniel Sanders8008de52015-10-15 14:34:23 +00004; RUN: -mattr=mips16 -relocation-model=pic < %s | FileCheck %s
Simon Atanasyanfde102c2013-12-25 17:00:27 +00005
Eric Christopher6a0551e2014-09-29 21:57:54 +00006define void @bar_hf() #0 {
7; CHECK: bar_hf:
Simon Atanasyanfde102c2013-12-25 17:00:27 +00008entry:
9 %call1 = call float @foo(float 1.000000e+00)
10; CHECK: lw $2, %call16(foo)($3)
11; CHECK: lw $5, %got(__mips16_call_stub_sf_1)($3)
12 ret void
13}
14
Eric Christopher6a0551e2014-09-29 21:57:54 +000015define void @bar_sf() #1 {
16; CHECK: bar_sf:
Simon Atanasyanfde102c2013-12-25 17:00:27 +000017entry:
18 %call1 = call float @foo(float 1.000000e+00)
Eric Christopher6a0551e2014-09-29 21:57:54 +000019; CHECK: lw $3, %call16(foo)($2)
20; CHECK-NOT: lw $5, %got(__mips16_call_stub_sf_1)($3)
Simon Atanasyanfde102c2013-12-25 17:00:27 +000021 ret void
22}
23
24declare float @foo(float) #2
25
26attributes #0 = {
27 nounwind
28 "less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
29 "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
30 "no-nans-fp-math"="false" "stack-protector-buffer-size"="8"
31 "unsafe-fp-math"="false" "use-soft-float"="false"
32}
33attributes #1 = {
34 nounwind
35 "less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
36 "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
37 "no-nans-fp-math"="false" "stack-protector-buffer-size"="8"
38 "unsafe-fp-math"="false" "use-soft-float"="true"
39}
40attributes #2 = {
41 "less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
42 "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
43 "no-nans-fp-math"="false" "stack-protector-buffer-size"="8"
44 "unsafe-fp-math"="false" "use-soft-float"="true"
45}