summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-11-10 09:47:48 +0000
committerHans Wennborg <hans@hanshq.net>2015-11-10 09:47:48 +0000
commit21ce8ecb09ae59b96fbca75eb595c100d0a4d5c6 (patch)
tree07eecae41260d3a841883657a9de3e95edacdeda /llvm/test
parentf6f45476f5c2030cdb713e1aca3daeadc08d9e6d (diff)
downloadbcm5719-llvm-21ce8ecb09ae59b96fbca75eb595c100d0a4d5c6.tar.gz
bcm5719-llvm-21ce8ecb09ae59b96fbca75eb595c100d0a4d5c6.zip
Inliner: Do zero-cost inlines even if above a negative threshold (PR24851)
Differential Revision: http://reviews.llvm.org/D14499 llvm-svn: 252595
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/Inline/zero-cost.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Inline/zero-cost.ll b/llvm/test/Transforms/Inline/zero-cost.ll
new file mode 100644
index 00000000000..8e7194a1963
--- /dev/null
+++ b/llvm/test/Transforms/Inline/zero-cost.ll
@@ -0,0 +1,17 @@
+; RUN: opt -inline -S %s | FileCheck %s
+
+define void @f() {
+entry:
+ tail call void @g()
+ unreachable
+
+; CHECK-LABEL: @f
+; CHECK-NOT: call
+; CHECK: unreachable
+}
+
+define void @g() {
+entry:
+ unreachable
+}
+
OpenPOWER on IntegriCloud