summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionAttrs
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-06-25 00:55:12 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-06-25 00:55:12 +0000
commit0f45572761388f418dc2c95034416f01eec6bc94 (patch)
treedb55b32cdb033ff3614ab91546eb8343217b45f3 /llvm/test/Transforms/FunctionAttrs
parentf4c56e97dffe9d0d40c1c428a59ec6a3a0d59f66 (diff)
downloadbcm5719-llvm-0f45572761388f418dc2c95034416f01eec6bc94.tar.gz
bcm5719-llvm-0f45572761388f418dc2c95034416f01eec6bc94.zip
The absence of noreturn doesn't ensure mayReturn
There are two separate issues: - LLVM doesn't consider infinite loops to be side effects: we happily hoist/sink above/below loops whose bounds are unknown. - The absence of the noreturn attribute is insufficient for us to know if a function will definitely return. Relying on noreturn in the middle-end for any property is an accident waiting to happen. llvm-svn: 273762
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs')
-rw-r--r--llvm/test/Transforms/FunctionAttrs/noreturn.ll18
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/noreturn.ll b/llvm/test/Transforms/FunctionAttrs/noreturn.ll
deleted file mode 100644
index 990bea984df..00000000000
--- a/llvm/test/Transforms/FunctionAttrs/noreturn.ll
+++ /dev/null
@@ -1,18 +0,0 @@
-; RUN: opt < %s -functionattrs -instcombine -S | FileCheck %s
-
-define void @endless_loop() noreturn nounwind readnone ssp uwtable {
-entry:
- br label %while.body
-
-while.body:
- br label %while.body
-}
-;CHECK-LABEL: @main(
-;CHECK: endless_loop
-;CHECK: ret
-define i32 @main() noreturn nounwind ssp uwtable {
-entry:
- tail call void @endless_loop()
- unreachable
-}
-
OpenPOWER on IntegriCloud