summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Generic/fneg-fabs.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/Generic/fneg-fabs.ll')
-rw-r--r--llvm/test/CodeGen/Generic/fneg-fabs.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Generic/fneg-fabs.ll b/llvm/test/CodeGen/Generic/fneg-fabs.ll
new file mode 100644
index 00000000000..3dc4588eeab
--- /dev/null
+++ b/llvm/test/CodeGen/Generic/fneg-fabs.ll
@@ -0,0 +1,26 @@
+; RUN: llvm-upgrade < %s | llvm-as | llc
+
+double %fneg(double %X) {
+ %Y = sub double -0.0, %X
+ ret double %Y
+}
+
+float %fnegf(float %X) {
+ %Y = sub float -0.0, %X
+ ret float %Y
+}
+
+declare double %fabs(double)
+declare float %fabsf(float)
+
+
+double %fabstest(double %X) {
+ %Y = call double %fabs(double %X)
+ ret double %Y
+}
+
+float %fabsftest(float %X) {
+ %Y = call float %fabsf(float %X)
+ ret float %Y
+}
+
OpenPOWER on IntegriCloud