From dcb6599980e200e0119a8dc22339ed20139d42b7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 22 May 2011 07:02:43 +0000 Subject: [PATCH] remove a trivial test, make some other tests less trivial. llvm-svn: 131846 --- test/Transforms/GVN/2007-07-26-InterlockingLoops.ll | 5 +++++ test/Transforms/GVN/2008-07-02-Unreachable.ll | 2 ++ test/Transforms/GVN/mixed.ll | 13 ------------- test/Transforms/GVN/rle.ll | 5 ++++- 4 files changed, 11 insertions(+), 14 deletions(-) delete mode 100644 test/Transforms/GVN/mixed.ll diff --git a/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll b/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll index 14cb91b5316..a1cc0083f1e 100644 --- a/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll +++ b/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll @@ -4,8 +4,11 @@ define i32 @NextRootMove(i32 %wtm) { entry: + %A = alloca i32* %tmp17618 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4 + store i32* %tmp17618, i32** %A ; CHECK: entry: +; CHECK-NEXT: alloca i32 ; CHECK-NEXT: %tmp17618 = load ; CHECK-NOT: load ; CHECK-NOT: phi @@ -16,6 +19,7 @@ cond_true116: cond_true128: %tmp17625 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4 + store i32* %tmp17625, i32** %A br i1 false, label %bb98.backedge, label %return.loopexit bb98.backedge: @@ -23,6 +27,7 @@ bb98.backedge: cond_true145: %tmp17631 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4 + store i32* %tmp17631, i32** %A br i1 false, label %bb98.backedge, label %return.loopexit return.loopexit: diff --git a/test/Transforms/GVN/2008-07-02-Unreachable.ll b/test/Transforms/GVN/2008-07-02-Unreachable.ll index be69cfc0319..407940b87d7 100644 --- a/test/Transforms/GVN/2008-07-02-Unreachable.ll +++ b/test/Transforms/GVN/2008-07-02-Unreachable.ll @@ -5,6 +5,7 @@ define i8 @func_1() nounwind { entry: + %A = alloca i8 br i1 false, label %ifelse, label %ifthen ifthen: ; preds = %entry @@ -12,6 +13,7 @@ ifthen: ; preds = %entry ifelse: ; preds = %entry %tmp3 = load i8* @g_3 ; [#uses=0] + store i8 %tmp3, i8* %A br label %forcond.thread forcond.thread: ; preds = %ifelse diff --git a/test/Transforms/GVN/mixed.ll b/test/Transforms/GVN/mixed.ll deleted file mode 100644 index 6bfada2f4d5..00000000000 --- a/test/Transforms/GVN/mixed.ll +++ /dev/null @@ -1,13 +0,0 @@ -; RUN: opt < %s -basicaa -gvn -S | not grep DEADLOAD -; RUN: opt < %s -basicaa -gvn -S | not grep DEADGEP - -define i32 @main(i32** %p) { -block1: - %z1 = load i32** %p - %z2 = getelementptr i32* %z1, i32 0 - %z3 = load i32* %z2 - %DEADLOAD = load i32** %p - %DEADGEP = getelementptr i32* %DEADLOAD, i32 0 - %DEADLOAD2 = load i32* %DEADGEP - ret i32 %DEADLOAD2 -} diff --git a/test/Transforms/GVN/rle.ll b/test/Transforms/GVN/rle.ll index 4ff5becb206..51f2727f1c8 100644 --- a/test/Transforms/GVN/rle.ll +++ b/test/Transforms/GVN/rle.ll @@ -360,8 +360,11 @@ Cont: define i32 @chained_load(i32** %p) { block1: + %A = alloca i32* + %z = load i32** %p - br i1 true, label %block2, label %block3 + store i32* %z, i32** %A + br i1 true, label %block2, label %block3 block2: %a = load i32** %p