diff options
author | Owen Anderson <resistor@mac.com> | 2008-05-29 08:45:13 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-05-29 08:45:13 +0000 |
commit | 871d8eb8662e66a3c2642fc8477d515973ecfe0b (patch) | |
tree | 12d9bb821fab51c14ed8c31b95761797b4a531ba /test | |
parent | dea99367632d9e326909dbac319fbe04f70f3697 (diff) | |
download | external_llvm-871d8eb8662e66a3c2642fc8477d515973ecfe0b.zip external_llvm-871d8eb8662e66a3c2642fc8477d515973ecfe0b.tar.gz external_llvm-871d8eb8662e66a3c2642fc8477d515973ecfe0b.tar.bz2 |
Replace the old ADCE implementation with a new one that more simply solves
the one case that ADCE catches that normal DCE doesn't: non-induction variable
loop computations.
This implementation handles this problem without using postdominators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51668 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/ADCE/2003-12-19-MergeReturn.ll | 27 | ||||
-rw-r--r-- | test/Transforms/ADCE/dead-phi-edge.ll | 17 |
2 files changed, 0 insertions, 44 deletions
diff --git a/test/Transforms/ADCE/2003-12-19-MergeReturn.ll b/test/Transforms/ADCE/2003-12-19-MergeReturn.ll deleted file mode 100644 index b2c294b..0000000 --- a/test/Transforms/ADCE/2003-12-19-MergeReturn.ll +++ /dev/null @@ -1,27 +0,0 @@ -; This testcase was failing because without merging the return blocks, ADCE -; didn't know that it could get rid of the then.0 block. - -; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep load - - -define void @main(i32 %argc, i8** %argv) { -entry: - call void @__main( ) - %tmp.1 = icmp ule i32 %argc, 5 ; <i1> [#uses=1] - br i1 %tmp.1, label %then.0, label %return - -then.0: ; preds = %entry - %tmp.8 = load i8** %argv ; <i8*> [#uses=1] - %tmp.10 = load i8* %tmp.8 ; <i8> [#uses=1] - %tmp.11 = icmp eq i8 %tmp.10, 98 ; <i1> [#uses=1] - br i1 %tmp.11, label %then.1, label %return - -then.1: ; preds = %then.0 - ret void - -return: ; preds = %then.0, %entry - ret void -} - -declare void @__main() - diff --git a/test/Transforms/ADCE/dead-phi-edge.ll b/test/Transforms/ADCE/dead-phi-edge.ll deleted file mode 100644 index 8445601..0000000 --- a/test/Transforms/ADCE/dead-phi-edge.ll +++ /dev/null @@ -1,17 +0,0 @@ -; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep call - -; The call is not live just because the PHI uses the call retval! - -define i32 @test(i32 %X) { -; <label>:0 - br label %Done - -DeadBlock: ; No predecessors! - %Y = call i32 @test( i32 0 ) ; <i32> [#uses=1] - br label %Done - -Done: ; preds = %DeadBlock, %0 - %Z = phi i32 [ %X, %0 ], [ %Y, %DeadBlock ] ; <i32> [#uses=1] - ret i32 %Z -} - |