remove a trivial test, make some other tests less trivial.
authorChris Lattner <sabre@nondot.org>
Sun, 22 May 2011 07:02:43 +0000 (07:02 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 22 May 2011 07:02:43 +0000 (07:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131846 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/GVN/2007-07-26-InterlockingLoops.ll
test/Transforms/GVN/2008-07-02-Unreachable.ll
test/Transforms/GVN/mixed.ll [deleted file]
test/Transforms/GVN/rle.ll

index 14cb91b5316728ac8ea529c45d0964a4c2199ffa..a1cc0083f1e632962f8716452748d68f7b3dab44 100644 (file)
@@ -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:
index be69cfc0319ce355aa9ee3a6538c347015a8b07f..407940b87d730bf91b385a2f0b0053b0fd843448 100644 (file)
@@ -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           ; <i8> [#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 (file)
index 6bfada2..0000000
+++ /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
-}
index 4ff5becb2064a0a4c3f4ed9365937475a5ff974d..51f2727f1c8b3c037bbcbc59ab9a4a8f98598dd3 100644 (file)
@@ -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