summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/TailCallElim
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/TailCallElim')
-rw-r--r--llvm/test/Transforms/TailCallElim/inf-recursion.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/TailCallElim/inf-recursion.ll b/llvm/test/Transforms/TailCallElim/inf-recursion.ll
new file mode 100644
index 00000000000..d3461719b51
--- /dev/null
+++ b/llvm/test/Transforms/TailCallElim/inf-recursion.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | opt -tailcallelim | grep call
+; Don't turn this into an infinite loop, this is probably the implementation
+; of fabs and we expect the codegen to lower fabs.
+
+define double @fabs(double %f) {
+entry:
+ %tmp2 = call double @fabs( double %f ) ; <double> [#uses=1]
+ ret double %tmp2
+}
+
OpenPOWER on IntegriCloud