From: Chris Lattner Date: Sat, 10 Apr 2004 06:52:20 +0000 (+0000) Subject: New testcases X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dc4736f8e60376f2edb698cbd43bb0be7ffde680;p=oota-llvm.git New testcases git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12806 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/ADCE/dce_pure_call.ll b/test/Transforms/ADCE/dce_pure_call.ll new file mode 100644 index 00000000000..dad2912702d --- /dev/null +++ b/test/Transforms/ADCE/dce_pure_call.ll @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep call + +declare int %strlen(sbyte*) + +void %test() { + ;; Dead call should be deleted! + call int %strlen(sbyte *null) + ret void +} diff --git a/test/Transforms/ADCE/dce_pure_invoke.ll b/test/Transforms/ADCE/dce_pure_invoke.ll new file mode 100644 index 00000000000..608c6554129 --- /dev/null +++ b/test/Transforms/ADCE/dce_pure_invoke.ll @@ -0,0 +1,13 @@ +; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep null + +declare int %strlen(sbyte*) + +int %test() { + ;; Dead call should be deleted! + invoke int %strlen(sbyte *null) to label %Cont unwind label %Other +Cont: + ret int 0 +Other: + ret int 1 +} +