diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-19 09:08:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-19 09:08:15 +0000 |
commit | 7fe178681bdf93399861382df4f68c78fce24d92 (patch) | |
tree | 0c0d2a9a2f104c15b95cdb211f886546cea3a71e | |
parent | 539ca70112b5c1a8a8a6392a50d9e5516be2402f (diff) |
New testcase for missed optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10538 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/ADCE/2003-12-19-MergeReturn.llx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/Transforms/ADCE/2003-12-19-MergeReturn.llx b/test/Transforms/ADCE/2003-12-19-MergeReturn.llx new file mode 100644 index 0000000000..541f2abe97 --- /dev/null +++ b/test/Transforms/ADCE/2003-12-19-MergeReturn.llx @@ -0,0 +1,28 @@ +; 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 + + +implementation ; Functions: + +void %main(uint %argc, sbyte** %argv) { +entry: + call void %__main( ) + %tmp.1 = setle uint %argc, 5 ; <bool> [#uses=1] + br bool %tmp.1, label %then.0, label %return + +then.0: ; preds = %entry + %tmp.8 = load sbyte** %argv ; <sbyte*> [#uses=1] + %tmp.10 = load sbyte* %tmp.8 ; <sbyte> [#uses=1] + %tmp.11 = seteq sbyte %tmp.10, 98 ; <bool> [#uses=1] + br bool %tmp.11, label %then.1, label %return + +then.1: ; preds = %then.0 + ret void + +return: ; preds = %entry, %then.0 + ret void +} + +declare void %__main() |