summaryrefslogtreecommitdiff
path: root/test/Transforms/ADCE
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-05-06 06:49:50 +0000
committerDuncan Sands <baldrick@free.fr>2009-05-06 06:49:50 +0000
commit7af1c78b98d2df7d0ab9154461ca3d835706716e (patch)
tree36e5d75294f6632cb5486c95675e0f2b6d13de86 /test/Transforms/ADCE
parente031e4bcb91ceafa2ddf0a7480a7135bdf5ebd57 (diff)
downloadllvm-7af1c78b98d2df7d0ab9154461ca3d835706716e.tar.gz
llvm-7af1c78b98d2df7d0ab9154461ca3d835706716e.tar.bz2
llvm-7af1c78b98d2df7d0ab9154461ca3d835706716e.tar.xz
Allow readonly functions to unwind exceptions. Teach
the optimizers about this. For example, a readonly function with no uses cannot be removed unless it is also marked nounwind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ADCE')
-rw-r--r--test/Transforms/ADCE/dce_pure_call.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Transforms/ADCE/dce_pure_call.ll b/test/Transforms/ADCE/dce_pure_call.ll
index a7414e027e..3935bf72b9 100644
--- a/test/Transforms/ADCE/dce_pure_call.ll
+++ b/test/Transforms/ADCE/dce_pure_call.ll
@@ -1,8 +1,8 @@
; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep call
-declare i32 @strlen(i8*) readonly
+declare i32 @strlen(i8*) readonly nounwind
define void @test() {
- call i32 @strlen( i8* null ) readonly ; <i32>:1 [#uses=0]
+ call i32 @strlen( i8* null ) ; <i32>:1 [#uses=0]
ret void
}