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 | 7686b555e26c31b52471f67536053e5f73e2991c (patch) | |
| tree | 16c813763cc596bffa49af82b87c3a94b5da4962 /llvm/test/Transforms/ADCE | |
| parent | 5e28227dbd2902be4f5b1604ca3fd4fa2481c1e7 (diff) | |
| download | bcm5719-llvm-7686b555e26c31b52471f67536053e5f73e2991c.tar.gz bcm5719-llvm-7686b555e26c31b52471f67536053e5f73e2991c.zip | |
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.
llvm-svn: 51668
Diffstat (limited to 'llvm/test/Transforms/ADCE')
| -rw-r--r-- | llvm/test/Transforms/ADCE/2003-12-19-MergeReturn.ll | 27 | ||||
| -rw-r--r-- | llvm/test/Transforms/ADCE/dead-phi-edge.ll | 17 |
2 files changed, 0 insertions, 44 deletions
diff --git a/llvm/test/Transforms/ADCE/2003-12-19-MergeReturn.ll b/llvm/test/Transforms/ADCE/2003-12-19-MergeReturn.ll deleted file mode 100644 index b2c294b1df0..00000000000 --- a/llvm/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/llvm/test/Transforms/ADCE/dead-phi-edge.ll b/llvm/test/Transforms/ADCE/dead-phi-edge.ll deleted file mode 100644 index 844560181a2..00000000000 --- a/llvm/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 -} - |

