summaryrefslogtreecommitdiff
path: root/test/CodeGen/Mips/mips16-hf-attr.ll
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2013-12-25 17:00:27 +0000
committerSimon Atanasyan <simon@atanasyan.com>2013-12-25 17:00:27 +0000
commitf84792ad48384d0bc27de3a863a3bc07bb540575 (patch)
treea9a3ed9ec508691cf461b27754acbbd1cea2da72 /test/CodeGen/Mips/mips16-hf-attr.ll
parentb09f5054454d99002a69aa57b7c19094aadde9ad (diff)
[Mips] Does not take in account 'use-soft-float' attribute's value when
consider to generate stubs for mips16 hard-float mode. The patch reviewed by Reed Kotler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips/mips16-hf-attr.ll')
-rw-r--r--test/CodeGen/Mips/mips16-hf-attr.ll45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/mips16-hf-attr.ll b/test/CodeGen/Mips/mips16-hf-attr.ll
new file mode 100644
index 00000000000..d9ad6295bef
--- /dev/null
+++ b/test/CodeGen/Mips/mips16-hf-attr.ll
@@ -0,0 +1,45 @@
+; 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 \
+; RUN: -mcpu=mips16 -relocation-model=pic < %s | FileCheck %s
+
+define void @bar_sf() #0 {
+; CHECK: bar_sf:
+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
+}
+
+define void @bar_hf() #1 {
+; CHECK: bar_hf:
+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
+}
+
+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"
+}