diff options
author | Chris Lattner <sabre@nondot.org> | 2007-09-10 20:58:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-09-10 20:58:55 +0000 |
commit | 8d9455d4e4f63c368f17b74a36b472fc61685310 (patch) | |
tree | cff716eae06b3bfc787df1093f8c486c7ffb28d7 /test/Transforms/TailCallElim | |
parent | b0869ed44d477b63c304eee762abb49d73b4fd68 (diff) | |
download | external_llvm-8d9455d4e4f63c368f17b74a36b472fc61685310.zip external_llvm-8d9455d4e4f63c368f17b74a36b472fc61685310.tar.gz external_llvm-8d9455d4e4f63c368f17b74a36b472fc61685310.tar.bz2 |
Prevent tailcallelim from breaking "recursive" calls to builtins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41804 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/TailCallElim')
-rw-r--r-- | test/Transforms/TailCallElim/inf-recursion.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/TailCallElim/inf-recursion.ll b/test/Transforms/TailCallElim/inf-recursion.ll new file mode 100644 index 0000000..d346171 --- /dev/null +++ b/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 +} + |