summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Inline
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2017-11-27 19:03:40 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2017-11-27 19:03:40 +0000
commitd9e710984d169280e613b229974ceea22f7132fc (patch)
tree1e3ea47d5a11501c04d9b151917cfa81db943d2d /llvm/test/Transforms/Inline
parent14d7aac15dafa4e2622dd9ba284044977d40363f (diff)
downloadbcm5719-llvm-d9e710984d169280e613b229974ceea22f7132fc.tar.gz
bcm5719-llvm-d9e710984d169280e613b229974ceea22f7132fc.zip
Inliner: Don't mark notail calls with the 'tail' attribute
enum TailCallKind { TCK_None = 0, TCK_Tail = 1, TCK_MustTail = 2, TCK_NoTail = 3 }; TCK_NoTail is greater than TCK_Tail so taking the min does not do the correct thing. rdar://35639547 llvm-svn: 319075
Diffstat (limited to 'llvm/test/Transforms/Inline')
-rw-r--r--llvm/test/Transforms/Inline/inline-tail.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Inline/inline-tail.ll b/llvm/test/Transforms/Inline/inline-tail.ll
index 66a6be7a59b..7b0fe57b68e 100644
--- a/llvm/test/Transforms/Inline/inline-tail.ll
+++ b/llvm/test/Transforms/Inline/inline-tail.ll
@@ -181,3 +181,18 @@ define i32 @test_mixedret_a(i1 zeroext %b) {
%rv = musttail call i32 @test_mixedret_b(i1 zeroext %b)
ret i32 %rv
}
+
+declare i32 @donttailcall()
+
+define i32 @notail() {
+ %rv = notail call i32 @donttailcall()
+ ret i32 %rv
+}
+
+; CHECK: @test_notail
+; CHECK: notail call i32 @donttailcall
+; CHECK: ret
+define i32 @test_notail() {
+ %rv = tail call i32 @notail()
+ ret i32 %rv
+}
OpenPOWER on IntegriCloud