summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips
diff options
context:
space:
mode:
authorZoran Jovanovic <zoran.jovanovic@imgtec.com>2015-10-02 13:06:02 +0000
committerZoran Jovanovic <zoran.jovanovic@imgtec.com>2015-10-02 13:06:02 +0000
commit9ffdfa598628a6cc8f42a973f3db2094324b8b13 (patch)
treeba5d167075a82c939b4ca1c378174f99137166ec /llvm/test/CodeGen/Mips
parent98efd89e7e52b2f081286477bbd8e7e400d63f37 (diff)
downloadbcm5719-llvm-9ffdfa598628a6cc8f42a973f3db2094324b8b13.tar.gz
bcm5719-llvm-9ffdfa598628a6cc8f42a973f3db2094324b8b13.zip
[mips][microMIPS] Fix an issue with selecting sqrt instruction in LLVM backend
Differential Revision: http://reviews.llvm.org/D13235 llvm-svn: 249123
Diffstat (limited to 'llvm/test/CodeGen/Mips')
-rw-r--r--llvm/test/CodeGen/Mips/llvm-ir/sqrt.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/llvm-ir/sqrt.ll b/llvm/test/CodeGen/Mips/llvm-ir/sqrt.ll
new file mode 100644
index 00000000000..1a8892de0ee
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/llvm-ir/sqrt.ll
@@ -0,0 +1,13 @@
+; RUN: llc < %s -march=mipsel -mcpu=mips32r2 -mattr=+micromips | FileCheck %s
+; RUN: llc < %s -march=mips -mcpu=mips32r2 -mattr=+micromips | FileCheck %s
+; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips | FileCheck %s
+
+define float @sqrt_fn(float %value) #0 {
+entry:
+ %sqrtf = tail call float @sqrtf(float %value) #0
+ ret float %sqrtf
+}
+
+declare float @sqrtf(float)
+
+; CHECK: sqrt.s $f0, $f12
OpenPOWER on IntegriCloud