summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionAttrs/nounwind.ll
diff options
context:
space:
mode:
authorJohannes Doerfert <jdoerfert@anl.gov>2019-08-05 23:22:05 +0000
committerJohannes Doerfert <jdoerfert@anl.gov>2019-08-05 23:22:05 +0000
commite83f303938a5aa2f43ba1dbe024b16fec06f20cc (patch)
treee29d54da9aa01be3edf1b9eebd4c2df5d8562369 /llvm/test/Transforms/FunctionAttrs/nounwind.ll
parenta5c25c5d469f0f9999610bb391bd156eb70e7975 (diff)
downloadbcm5719-llvm-e83f303938a5aa2f43ba1dbe024b16fec06f20cc.tar.gz
bcm5719-llvm-e83f303938a5aa2f43ba1dbe024b16fec06f20cc.zip
[Attributor] Deduce the "no-return" attribute for functions
A function is "no-return" if we never reach a return instruction, either because there are none or the ones that exist are dead. Test have been adjusted: - either noreturn was added, or - noreturn was avoided by modifying the code. The new noreturn_{sync,async} test make sure we do handle invoke instructions with a noreturn (and potentially nowunwind) callee correctly, even in the presence of potential asynchronous exceptions. llvm-svn: 367948
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs/nounwind.ll')
-rw-r--r--llvm/test/Transforms/FunctionAttrs/nounwind.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/nounwind.ll b/llvm/test/Transforms/FunctionAttrs/nounwind.ll
index fa2dddd31ae..1c9d019960c 100644
--- a/llvm/test/Transforms/FunctionAttrs/nounwind.ll
+++ b/llvm/test/Transforms/FunctionAttrs/nounwind.ll
@@ -13,7 +13,7 @@ define i32 @foo1() {
; TEST 2
; CHECK: Function Attrs: nounwind readnone
; CHECK-NEXT: define i32 @scc1_foo()
-; ATTRIBUTOR: Function Attrs: nofree nosync nounwind
+; ATTRIBUTOR: Function Attrs: nofree noreturn nosync nounwind
; ATTRIBUTOR-NEXT: define i32 @scc1_foo()
define i32 @scc1_foo() {
%1 = call i32 @scc1_bar()
@@ -24,7 +24,7 @@ define i32 @scc1_foo() {
; TEST 3
; CHECK: Function Attrs: nounwind readnone
; CHECK-NEXT: define i32 @scc1_bar()
-; ATTRIBUTOR: Function Attrs: nofree nosync nounwind
+; ATTRIBUTOR: Function Attrs: nofree noreturn nosync nounwind
; ATTRIBUTOR-NEXT: define i32 @scc1_bar()
define i32 @scc1_bar() {
%1 = call i32 @scc1_foo()
OpenPOWER on IntegriCloud