2013-12-25 17:00:27 +00:00
|
|
|
; Check that stubs generation for mips16 hard-float mode does not depend
|
|
|
|
; on the function 'use-soft-float' attribute's value.
|
|
|
|
; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel \
|
2015-10-15 14:34:23 +00:00
|
|
|
; RUN: -mattr=mips16 -relocation-model=pic < %s | FileCheck %s
|
2013-12-25 17:00:27 +00:00
|
|
|
|
2014-09-29 21:57:54 +00:00
|
|
|
define void @bar_hf() #0 {
|
|
|
|
; CHECK: bar_hf:
|
2013-12-25 17:00:27 +00:00
|
|
|
entry:
|
|
|
|
%call1 = call float @foo(float 1.000000e+00)
|
|
|
|
; CHECK: lw $2, %call16(foo)($3)
|
|
|
|
; CHECK: lw $5, %got(__mips16_call_stub_sf_1)($3)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-09-29 21:57:54 +00:00
|
|
|
define void @bar_sf() #1 {
|
|
|
|
; CHECK: bar_sf:
|
2013-12-25 17:00:27 +00:00
|
|
|
entry:
|
|
|
|
%call1 = call float @foo(float 1.000000e+00)
|
2014-09-29 21:57:54 +00:00
|
|
|
; CHECK: lw $3, %call16(foo)($2)
|
|
|
|
; CHECK-NOT: lw $5, %got(__mips16_call_stub_sf_1)($3)
|
2013-12-25 17:00:27 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare float @foo(float) #2
|
|
|
|
|
|
|
|
attributes #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"
|
|
|
|
}
|
|
|
|
attributes #1 = {
|
|
|
|
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"="true"
|
|
|
|
}
|
|
|
|
attributes #2 = {
|
|
|
|
"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"="true"
|
|
|
|
}
|