summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-06-08 15:32:59 +0000
committerVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-06-08 15:32:59 +0000
commit1799921672835c49f6a29fc27d1840b7c36beabd (patch)
tree2120cae2da53bb9838ffd131b153085b96800183 /test
parent9eefea009fb559cf441254f7022a2824386852c6 (diff)
downloadllvm-1799921672835c49f6a29fc27d1840b7c36beabd.tar.gz
llvm-1799921672835c49f6a29fc27d1840b7c36beabd.tar.bz2
llvm-1799921672835c49f6a29fc27d1840b7c36beabd.tar.xz
[Sparc] Delete FPMover Pass and remove Fp* Pseudo-instructions from Sparc backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/SPARC/float.ll47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/float.ll b/test/CodeGen/SPARC/float.ll
new file mode 100644
index 0000000000..ab46fb301e
--- /dev/null
+++ b/test/CodeGen/SPARC/float.ll
@@ -0,0 +1,47 @@
+; RUN: llc -march=sparc < %s | FileCheck %s -check-prefix=V8
+; RUN: llc -march=sparc -O0 < %s | FileCheck %s -check-prefix=V8-UNOPT
+; RUN: llc -march=sparc -mattr=v9 < %s | FileCheck %s -check-prefix=V9
+
+
+; V8: test_neg:
+; V8: call get_double
+; V8: fnegs %f0, %f0
+
+; V8-UNOPT: test_neg:
+; V8-UNOPT: fnegs
+; V8-UNOPT: ! implicit-def
+; V8-UNOPT: fmovs {{.+}}, %f0
+; V8-UNOPT: fmovs {{.+}}, %f1
+
+; V9: test_neg:
+; V9: fnegd %f0, %f0
+
+define double @test_neg() {
+entry:
+ %0 = tail call double @get_double()
+ %1 = fsub double -0.000000e+00, %0
+ ret double %1
+}
+
+; V8: test_abs:
+; V8: fabss %f0, %f0
+
+; V8-UNOPT: test_abs:
+; V8-UNOPT: fabss
+; V8-UNOPT: ! implicit-def
+; V8-UNOPT: fmovs {{.+}}, %f0
+; V8-UNOPT: fmovs {{.+}}, %f1
+
+; V9: test_abs:
+; V9: fabsd %f0, %f0
+
+define double @test_abs() {
+entry:
+ %0 = tail call double @get_double()
+ %1 = tail call double @llvm.fabs.f64(double %0)
+ ret double %1
+}
+
+declare double @get_double()
+declare double @llvm.fabs.f64(double) nounwind readonly
+