Remove llvm-upgrade and update tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48137 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Transforms/TailDup/2003-06-24-Simpleloop.ll b/test/Transforms/TailDup/2003-06-24-Simpleloop.ll
index e2b979c..5c3b539 100644
--- a/test/Transforms/TailDup/2003-06-24-Simpleloop.ll
+++ b/test/Transforms/TailDup/2003-06-24-Simpleloop.ll
@@ -1,18 +1,15 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
 
-void %motion_result7() {
+define void @motion_result7() {
 entry:
-        br label %endif
-
-endif:
-        %i.1 = phi int [ %inc, %no_exit ], [ 0, %entry ]
-        %inc = add int %i.1, 1
-        br bool false, label %no_exit, label %UnifiedExitNode
-
-no_exit:
-        br bool false, label %UnifiedExitNode, label %endif
-
-UnifiedExitNode:
-        ret void
+	br label %endif
+endif:		; preds = %no_exit, %entry
+	%i.1 = phi i32 [ %inc, %no_exit ], [ 0, %entry ]		; <i32> [#uses=1]
+	%inc = add i32 %i.1, 1		; <i32> [#uses=1]
+	br i1 false, label %no_exit, label %UnifiedExitNode
+no_exit:		; preds = %endif
+	br i1 false, label %UnifiedExitNode, label %endif
+UnifiedExitNode:		; preds = %no_exit, %endif
+	ret void
 }
 
diff --git a/test/Transforms/TailDup/2003-07-22-InfiniteLoop.ll b/test/Transforms/TailDup/2003-07-22-InfiniteLoop.ll
index 4d65069..705f8bc 100644
--- a/test/Transforms/TailDup/2003-07-22-InfiniteLoop.ll
+++ b/test/Transforms/TailDup/2003-07-22-InfiniteLoop.ll
@@ -1,13 +1,11 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
 
-implementation
-
-int %sum() {
+define i32 @sum() {
 entry:
 	br label %loopentry
-
-loopentry:
-	%i.0 = phi int [ 1, %entry ], [ %tmp.3, %loopentry ]
-	%tmp.3 = add int %i.0, 1
+loopentry:		; preds = %loopentry, %entry
+	%i.0 = phi i32 [ 1, %entry ], [ %tmp.3, %loopentry ]		; <i32> [#uses=1]
+	%tmp.3 = add i32 %i.0, 1		; <i32> [#uses=1]
 	br label %loopentry
 }
+
diff --git a/test/Transforms/TailDup/2003-08-23-InvalidatedPointers.ll b/test/Transforms/TailDup/2003-08-23-InvalidatedPointers.ll
index 72e03e1..1fae77b 100644
--- a/test/Transforms/TailDup/2003-08-23-InvalidatedPointers.ll
+++ b/test/Transforms/TailDup/2003-08-23-InvalidatedPointers.ll
@@ -1,40 +1,29 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
 
-implementation
-
-int %sell_haggle() {
-entry:		; No predecessors!
-	br bool false, label %then.5, label %UnifiedExitNode
-
+define i32 @sell_haggle() {
+entry:
+	br i1 false, label %then.5, label %UnifiedExitNode
 then.5:		; preds = %entry
-	br bool false, label %loopentry.1.preheader, label %else.1
-
+	br i1 false, label %loopentry.1.preheader, label %else.1
 else.1:		; preds = %then.5
 	br label %loopentry.1.preheader
-
-loopentry.1.preheader:		; preds = %then.5, %else.1
-	%final_ask.0 = phi int [ 0, %else.1 ], [ 0, %then.5 ]		; <int> [#uses=2]
+loopentry.1.preheader:		; preds = %else.1, %then.5
+	%final_ask.0 = phi i32 [ 0, %else.1 ], [ 0, %then.5 ]		; <i32> [#uses=2]
 	br label %loopentry.1
-
-loopentry.1:		; preds = %loopentry.1.preheader, %endif.17
-	switch uint 0, label %UnifiedExitNode [
-		 uint 2, label %UnifiedExitNode
-		 uint 1, label %endif.16
+loopentry.1:		; preds = %endif.17, %loopentry.1.preheader
+	switch i32 0, label %UnifiedExitNode [
+		 i32 2, label %UnifiedExitNode
+		 i32 1, label %endif.16
 	]
-
 endif.16:		; preds = %loopentry.1
-	br bool false, label %then.17, label %UnifiedExitNode
-
+	br i1 false, label %then.17, label %UnifiedExitNode
 then.17:		; preds = %endif.16
-	br bool false, label %then.18, label %endif.17
-
+	br i1 false, label %then.18, label %endif.17
 then.18:		; preds = %then.17
-	br bool false, label %endif.17, label %UnifiedExitNode
-
-endif.17:		; preds = %then.17, %then.18
-	%cur_ask.3 = phi int [ %final_ask.0, %then.17 ], [ %final_ask.0, %then.18 ]		; <int> [#uses=0]
-	br bool false, label %loopentry.1, label %UnifiedExitNode
-
-UnifiedExitNode:		; preds = %entry, %endif.17, %then.18, %endif.16, %loopentry.1, %loopentry.1
-	ret int 0
+	br i1 false, label %endif.17, label %UnifiedExitNode
+endif.17:		; preds = %then.18, %then.17
+	%cur_ask.3 = phi i32 [ %final_ask.0, %then.17 ], [ %final_ask.0, %then.18 ]		; <i32> [#uses=0]
+	br i1 false, label %loopentry.1, label %UnifiedExitNode
+UnifiedExitNode:		; preds = %endif.17, %then.18, %endif.16, %loopentry.1, %loopentry.1, %entry
+	ret i32 0
 }
diff --git a/test/Transforms/TailDup/2003-08-31-UnreachableBlocks.ll b/test/Transforms/TailDup/2003-08-31-UnreachableBlocks.ll
index 416a5df..e464713 100644
--- a/test/Transforms/TailDup/2003-08-31-UnreachableBlocks.ll
+++ b/test/Transforms/TailDup/2003-08-31-UnreachableBlocks.ll
@@ -1,20 +1,17 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
 
-int %foo() {
+define i32 @foo() {
 entry:
 	br label %return.i
-
-after_ret.i:
+after_ret.i:		; No predecessors!
 	br label %return.i
-
-return.i:
-	%tmp.3 = cast int* null to int
+return.i:		; preds = %after_ret.i, %entry
+	%tmp.3 = ptrtoint i32* null to i32		; <i32> [#uses=1]
 	br label %return.i1
-
-after_ret.i1:
+after_ret.i1:		; No predecessors!
 	br label %return.i1
-
-return.i1:
-	%tmp.8 = sub int %tmp.3, 0
-	ret int 0
+return.i1:		; preds = %after_ret.i1, %return.i
+	%tmp.8 = sub i32 %tmp.3, 0		; <i32> [#uses=0]
+	ret i32 0
 }
+
diff --git a/test/Transforms/TailDup/2004-04-01-DemoteRegToStack.llx b/test/Transforms/TailDup/2004-04-01-DemoteRegToStack.llx
index 4ea8490..81624ff 100644
--- a/test/Transforms/TailDup/2004-04-01-DemoteRegToStack.llx
+++ b/test/Transforms/TailDup/2004-04-01-DemoteRegToStack.llx
@@ -1,22 +1,20 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
 
-void %interpret() {
+define void @interpret() {
 entry:
 	br label %retry
-
-retry:
-	%tmp.8 = call int %interp()
-	switch uint 0, label %endif.4 [
-		 uint 4294967271, label %return
-		 uint 4294967280, label %return
+retry:		; preds = %endif.4, %entry
+	%tmp.8 = call i32 @interp( )		; <i32> [#uses=3]
+	switch i32 0, label %endif.4 [
+		 i32 -25, label %return
+		 i32 -16, label %return
 	]
-
-endif.4:
-	br bool false, label %return, label %retry
-
-return:
-	%result.0 = phi int [ %tmp.8, %retry ], [%tmp.8, %retry], [ %tmp.8, %endif.4 ]
+endif.4:		; preds = %retry
+	br i1 false, label %return, label %retry
+return:		; preds = %endif.4, %retry, %retry
+	%result.0 = phi i32 [ %tmp.8, %retry ], [ %tmp.8, %retry ], [ %tmp.8, %endif.4 ]		; <i32> [#uses=0]
 	ret void
 }
 
-declare int %interp()
+declare i32 @interp()
+
diff --git a/test/Transforms/TailDup/MergeTest.ll b/test/Transforms/TailDup/MergeTest.ll
index c11d735..252bf56 100644
--- a/test/Transforms/TailDup/MergeTest.ll
+++ b/test/Transforms/TailDup/MergeTest.ll
@@ -1,31 +1,27 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate  | llvm-dis | grep add | not grep uses=1
+; RUN: llvm-as < %s | opt -tailduplicate  | llvm-dis | grep add | not grep uses=1
 
-int %test1(bool %C, int %A, int* %P) {
+define i32 @test1(i1 %C, i32 %A, i32* %P) {
 entry:
-        br bool %C, label %L1, label %L2
-
-L1:
-	store int 1, int* %P
-        br label %L2
-
-L2:
-	%X = add int %A, 17
-	ret int %X
+	br i1 %C, label %L1, label %L2
+L1:		; preds = %entry
+	store i32 1, i32* %P
+	br label %L2
+L2:		; preds = %L1, %entry
+	%X = add i32 %A, 17		; <i32> [#uses=1]
+	ret i32 %X
 }
 
-int %test2(bool %C, int %A, int* %P) {
+define i32 @test2(i1 %C, i32 %A, i32* %P) {
 entry:
-        br bool %C, label %L1, label %L2
-
-L1:
-	store int 1, int* %P
-        br label %L3
-
-L2:
-	store int 7, int* %P
+	br i1 %C, label %L1, label %L2
+L1:		; preds = %entry
+	store i32 1, i32* %P
 	br label %L3
-L3:
-	%X = add int %A, 17
-	ret int %X
+L2:		; preds = %entry
+	store i32 7, i32* %P
+	br label %L3
+L3:		; preds = %L2, %L1
+	%X = add i32 %A, 17		; <i32> [#uses=1]
+	ret i32 %X
 }
 
diff --git a/test/Transforms/TailDup/PHIUpdateTest.ll b/test/Transforms/TailDup/PHIUpdateTest.ll
index ae591a0..6f86587 100644
--- a/test/Transforms/TailDup/PHIUpdateTest.ll
+++ b/test/Transforms/TailDup/PHIUpdateTest.ll
@@ -1,20 +1,16 @@
 ; This test checks to make sure phi nodes are updated properly
 ;
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
 
-
-
-int %test(bool %c, int %X, int %Y) {
+define i32 @test(i1 %c, i32 %X, i32 %Y) {
 	br label %L
-
-L:
-	%A = add int %X, %Y
-	br bool %c, label %T, label %F
-
-F:
-	br bool %c, label %L, label %T
-
-T:
-	%V = phi int [%A, %L], [0, %F]
-	ret int %V
+L:		; preds = %F, %0
+	%A = add i32 %X, %Y		; <i32> [#uses=1]
+	br i1 %c, label %T, label %F
+F:		; preds = %L
+	br i1 %c, label %L, label %T
+T:		; preds = %F, %L
+	%V = phi i32 [ %A, %L ], [ 0, %F ]		; <i32> [#uses=1]
+	ret i32 %V
 }
+
diff --git a/test/Transforms/TailDup/basictest.ll b/test/Transforms/TailDup/basictest.ll
index 085acf5..ef36890 100644
--- a/test/Transforms/TailDup/basictest.ll
+++ b/test/Transforms/TailDup/basictest.ll
@@ -1,22 +1,20 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
 
-declare void %__main()
+declare void @__main()
 
-int %main() {
-entry:		; No predecessors!
-	call void %__main( )
+define i32 @main() {
+entry:
+	call void @__main( )
 	br label %loopentry
-
-loopentry:		; preds = %entry, %no_exit
-	%i.0 = phi int [ %inc, %no_exit ], [ 0, %entry ]		; <int> [#uses=2]
-	%tmp.1 = setle int %i.0, 99		; <bool> [#uses=1]
-	br bool %tmp.1, label %no_exit, label %return
-
+loopentry:		; preds = %no_exit, %entry
+	%i.0 = phi i32 [ %inc, %no_exit ], [ 0, %entry ]		; <i32> [#uses=3]
+	%tmp.1 = icmp sle i32 %i.0, 99		; <i1> [#uses=1]
+	br i1 %tmp.1, label %no_exit, label %return
 no_exit:		; preds = %loopentry
-	%tmp.51 = call int %main( )		; <int> [#uses=0]
-	%inc = add int %i.0, 1		; <int> [#uses=1]
+	%tmp.51 = call i32 @main( )		; <i32> [#uses=0]
+	%inc = add i32 %i.0, 1		; <i32> [#uses=1]
 	br label %loopentry
-
 return:		; preds = %loopentry
-	ret int %i.0
+	ret i32 %i.0
 }
+
diff --git a/test/Transforms/TailDup/basictest2.ll b/test/Transforms/TailDup/basictest2.ll
index c67b3d5..f79d718 100644
--- a/test/Transforms/TailDup/basictest2.ll
+++ b/test/Transforms/TailDup/basictest2.ll
@@ -1,17 +1,15 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
 
-void %ab() {
+define void @ab() {
 entry:
 	br label %loopentry.5
-
-loopentry.5:
-	%poscnt.1 = phi long [ 0, %entry ], [ %tmp.289, %no_exit.5 ]
-	%tmp.289 = shr long %poscnt.1, ubyte 1
-	br bool false, label %no_exit.5, label %loopexit.5
-
-no_exit.5:
+loopentry.5:		; preds = %no_exit.5, %entry
+	%poscnt.1 = phi i64 [ 0, %entry ], [ %tmp.289, %no_exit.5 ]		; <i64> [#uses=1]
+	%tmp.289 = ashr i64 %poscnt.1, 1		; <i64> [#uses=1]
+	br i1 false, label %no_exit.5, label %loopexit.5
+no_exit.5:		; preds = %loopentry.5
 	br label %loopentry.5
-
-loopexit.5:
+loopexit.5:		; preds = %loopentry.5
 	ret void
 }
+
diff --git a/test/Transforms/TailDup/if-tail-dup.ll b/test/Transforms/TailDup/if-tail-dup.ll
index 952a2e8..7c4d9c2 100644
--- a/test/Transforms/TailDup/if-tail-dup.ll
+++ b/test/Transforms/TailDup/if-tail-dup.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | \
+; RUN: llvm-as < %s | opt -tailduplicate | \
 ; RUN:   llc -march=x86 -o %t -f
 ; RUN: grep {\\\<je\\\>} %t
 ; RUN: not grep jmp %t
@@ -12,50 +12,38 @@
 ;  if (c & 8)  P[3] = 1;
 ;}
 
-implementation
-
-void %foo(int %c, int* %P) {
+define void @foo(i32 %c, i32* %P) {
 entry:
-        %tmp1 = and int %c, 1           ; <int> [#uses=1]
-        %tmp1 = seteq int %tmp1, 0              ; <bool> [#uses=1]
-        br bool %tmp1, label %cond_next, label %cond_true
-
-cond_true:              ; preds = %entry
-        store int 1, int* %P
-        br label %cond_next
-
-cond_next:              ; preds = %entry, %cond_true
-        %tmp5 = and int %c, 2           ; <int> [#uses=1]
-        %tmp5 = seteq int %tmp5, 0              ; <bool> [#uses=1]
-        br bool %tmp5, label %cond_next10, label %cond_true6
-
-cond_true6:             ; preds = %cond_next
-        %tmp8 = getelementptr int* %P, int 1            ; <int*> [#uses=1]
-        store int 1, int* %tmp8
-        br label %cond_next10
-
-cond_next10:            ; preds = %cond_next, %cond_true6
-        %tmp13 = and int %c, 4          ; <int> [#uses=1]
-        %tmp13 = seteq int %tmp13, 0            ; <bool> [#uses=1]
-        br bool %tmp13, label %cond_next18, label %cond_true14
-
-cond_true14:            ; preds = %cond_next10
-        %tmp16 = getelementptr int* %P, int 2           ; <int*> [#uses=1]
-        store int 1, int* %tmp16
-        br label %cond_next18
-
-cond_next18:            ; preds = %cond_next10, %cond_true14
-        %tmp21 = and int %c, 8          ; <int> [#uses=1]
-        %tmp21 = seteq int %tmp21, 0            ; <bool> [#uses=1]
-        br bool %tmp21, label %return, label %cond_true22
-
-cond_true22:            ; preds = %cond_next18
-        %tmp24 = getelementptr int* %P, int 3           ; <int*> [#uses=1]
-        store int 1, int* %tmp24
-        ret void
-
-return:         ; preds = %cond_next18
-        ret void
+	%tmp1 = and i32 %c, 1		; <i32> [#uses=1]
+	%tmp1.upgrd.1 = icmp eq i32 %tmp1, 0		; <i1> [#uses=1]
+	br i1 %tmp1.upgrd.1, label %cond_next, label %cond_true
+cond_true:		; preds = %entry
+	store i32 1, i32* %P
+	br label %cond_next
+cond_next:		; preds = %cond_true, %entry
+	%tmp5 = and i32 %c, 2		; <i32> [#uses=1]
+	%tmp5.upgrd.2 = icmp eq i32 %tmp5, 0		; <i1> [#uses=1]
+	br i1 %tmp5.upgrd.2, label %cond_next10, label %cond_true6
+cond_true6:		; preds = %cond_next
+	%tmp8 = getelementptr i32* %P, i32 1		; <i32*> [#uses=1]
+	store i32 1, i32* %tmp8
+	br label %cond_next10
+cond_next10:		; preds = %cond_true6, %cond_next
+	%tmp13 = and i32 %c, 4		; <i32> [#uses=1]
+	%tmp13.upgrd.3 = icmp eq i32 %tmp13, 0		; <i1> [#uses=1]
+	br i1 %tmp13.upgrd.3, label %cond_next18, label %cond_true14
+cond_true14:		; preds = %cond_next10
+	%tmp16 = getelementptr i32* %P, i32 2		; <i32*> [#uses=1]
+	store i32 1, i32* %tmp16
+	br label %cond_next18
+cond_next18:		; preds = %cond_true14, %cond_next10
+	%tmp21 = and i32 %c, 8		; <i32> [#uses=1]
+	%tmp21.upgrd.4 = icmp eq i32 %tmp21, 0		; <i1> [#uses=1]
+	br i1 %tmp21.upgrd.4, label %return, label %cond_true22
+cond_true22:		; preds = %cond_next18
+	%tmp24 = getelementptr i32* %P, i32 3		; <i32*> [#uses=1]
+	store i32 1, i32* %tmp24
+	ret void
+return:		; preds = %cond_next18
+	ret void
 }
-
-