For PR950:
Update the test suite to accommodate the change from signed integer types
to signless integer types. The changes were of only a few kinds:

1. Make sure llvm-upgrade is run on the source which does the bulk of the
   changes automatically.

2. Change things like "grep 'int'" to "grep 'i32'"

3. In several tests bitcasting caused the same name to be reused in the
   same type plane. These had to be manually fixed. The fix was (generally)
   to leave the bitcast and provide the instruction with a new name. This
   should not affect the semantics of the test. In a few cases, the
   bitcasts were known to be superfluous and irrelevant to the test case
   so they were removed.

4. One test case uses a bytecode file which needed to be updated to the
   latest bytecode format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32789 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Linker/2002-07-17-GlobalFail.ll b/test/Linker/2002-07-17-GlobalFail.ll
index 285b6ab..d950e40 100644
--- a/test/Linker/2002-07-17-GlobalFail.ll
+++ b/test/Linker/2002-07-17-GlobalFail.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s > %t.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.bc
 ; RUN: echo | llvm-as > %t.tmp.bc
 ; RUN: llvm-link %t.tmp.bc %t.bc
 
diff --git a/test/Linker/2002-07-17-LinkTest2.ll b/test/Linker/2002-07-17-LinkTest2.ll
index 413a31a..67bf686 100644
--- a/test/Linker/2002-07-17-LinkTest2.ll
+++ b/test/Linker/2002-07-17-LinkTest2.ll
@@ -1,7 +1,7 @@
 ; This fails linking when it is linked with an empty file as the first object file
 
 ; RUN: llvm-as > %t1.bc < /dev/null
-; RUN: llvm-as < %s > %t2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t2.bc
 ; RUN: llvm-link %t[12].bc
 
 %work = global int (int, int)* %zip
diff --git a/test/Linker/2002-08-20-ConstantExpr.ll b/test/Linker/2002-08-20-ConstantExpr.ll
index 8b00cb9..03b178e 100644
--- a/test/Linker/2002-08-20-ConstantExpr.ll
+++ b/test/Linker/2002-08-20-ConstantExpr.ll
@@ -1,7 +1,7 @@
 ; This fails linking when it is linked with an empty file as the first object file
 
 ; RUN: llvm-as > %t.LinkTest.bc < /dev/null
-; RUN: llvm-as < %s > %t.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.bc
 ; RUN: llvm-link %t.LinkTest.bc %t.bc
 
 %work = global int 4
diff --git a/test/Linker/2003-04-26-NullPtrLinkProblem.ll b/test/Linker/2003-04-26-NullPtrLinkProblem.ll
index a076045..3caf763 100644
--- a/test/Linker/2003-04-26-NullPtrLinkProblem.ll
+++ b/test/Linker/2003-04-26-NullPtrLinkProblem.ll
@@ -1,7 +1,7 @@
 ; This one fails because the LLVM runtime is allowing two null pointers of
 ; the same type to be created!
 
-; RUN: echo "%T = type int" | llvm-as > %t.2.bc
+; RUN: echo "%T = type int" | llvm-upgrade | llvm-as > %t.2.bc
 ; RUN: llvm-upgrade < %s | llvm-as -f > %t.1.bc
 ; RUN: llvm-link %t.[12].bc
 
diff --git a/test/Linker/2003-05-15-TypeProblem.ll b/test/Linker/2003-05-15-TypeProblem.ll
index 163cdfd..ee1caf7 100644
--- a/test/Linker/2003-05-15-TypeProblem.ll
+++ b/test/Linker/2003-05-15-TypeProblem.ll
@@ -1,8 +1,8 @@
 ; This one fails because the LLVM runtime is allowing two null pointers of
 ; the same type to be created!
 
-; RUN: echo "%S = type { %T*} %T = type opaque" | llvm-as > %t.2.bc
-; RUN: llvm-as < %s > %t.1.bc
+; RUN: echo "%S = type { %T*} %T = type opaque" | llvm-upgrade | llvm-as > %t.2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc
 ; RUN: llvm-link %t.[12].bc
 
 %S = type { %T* }
diff --git a/test/Linker/2003-06-02-TypeResolveProblem.ll b/test/Linker/2003-06-02-TypeResolveProblem.ll
index ceb046e..05d7adf 100644
--- a/test/Linker/2003-06-02-TypeResolveProblem.ll
+++ b/test/Linker/2003-06-02-TypeResolveProblem.ll
@@ -1,5 +1,5 @@
-; RUN: echo "%T = type opaque" | llvm-as > %t.2.bc
-; RUN: llvm-as < %s > %t.1.bc
+; RUN: echo "%T = type opaque" | llvm-upgrade | llvm-as > %t.2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc
 ; RUN: llvm-link %t.[12].bc
 
 %T = type opaque
diff --git a/test/Linker/2003-06-02-TypeResolveProblem2.ll b/test/Linker/2003-06-02-TypeResolveProblem2.ll
index aa1bc17..c0228c4 100644
--- a/test/Linker/2003-06-02-TypeResolveProblem2.ll
+++ b/test/Linker/2003-06-02-TypeResolveProblem2.ll
@@ -1,5 +1,5 @@
-; RUN: echo "%T = type int" | llvm-as > %t.1.bc
-; RUN: llvm-as < %s > %t.2.bc
+; RUN: echo "%T = type int" | llvm-upgrade | llvm-as > %t.1.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.2.bc
 ; RUN: llvm-link %t.[12].bc
 
 %T = type opaque
diff --git a/test/Linker/2003-08-20-OpaqueTypeResolve.ll b/test/Linker/2003-08-20-OpaqueTypeResolve.ll
index 5b45cdf..6b378d5 100644
--- a/test/Linker/2003-08-20-OpaqueTypeResolve.ll
+++ b/test/Linker/2003-08-20-OpaqueTypeResolve.ll
@@ -1,6 +1,6 @@
 
-; RUN: llvm-as < %s > %t.out1.bc
-; RUN: echo "%S = type { int, int* }" | llvm-as > %t.out2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc
+; RUN: echo "%S = type { int, int* }" | llvm-upgrade | llvm-as > %t.out2.bc
 ; RUN: llvm-link %t.out[12].bc
 
 %T = type opaque
diff --git a/test/Linker/2003-08-23-GlobalVarLinking.ll b/test/Linker/2003-08-23-GlobalVarLinking.ll
index 51ad194..e249641 100644
--- a/test/Linker/2003-08-23-GlobalVarLinking.ll
+++ b/test/Linker/2003-08-23-GlobalVarLinking.ll
@@ -1,5 +1,5 @@
-; RUN: llvm-as < %s > %t.out1.bc
-; RUN: echo "%S = external global { int, opaque* } declare void %F(opaque*)" | llvm-as > %t.out2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc
+; RUN: echo "%S = external global { int, opaque* } declare void %F(opaque*)" | llvm-upgrade | llvm-as > %t.out2.bc
 ; RUN: llvm-link %t.out[12].bc | llvm-dis | not grep opaque
 
 ; After linking this testcase, there should be no opaque types left.  The two
diff --git a/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll b/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll
index e052d56..1a95b87 100644
--- a/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll
+++ b/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll
@@ -1,8 +1,8 @@
 ; It's a bad idea to go recursively traipsing through types without a safety 
 ; net.
 
-; RUN: llvm-as < %s > %t.out1.bc
-; RUN: echo "%S = type { %S*, int* }" | llvm-as > %t.out2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc
+; RUN: echo "%S = type { %S*, int* }" | llvm-upgrade | llvm-as > %t.out2.bc
 ; RUN: llvm-link %t.out[12].bc
 
 %S = type { %S*, opaque* }
diff --git a/test/Linker/2003-10-21-ConflictingTypesTolerance.ll b/test/Linker/2003-10-21-ConflictingTypesTolerance.ll
index afc8f46..db098d6 100644
--- a/test/Linker/2003-10-21-ConflictingTypesTolerance.ll
+++ b/test/Linker/2003-10-21-ConflictingTypesTolerance.ll
@@ -1,5 +1,5 @@
-; RUN: llvm-as < %s > %t.out1.bc
-; RUN: echo "%S = type [8 x int] external global %S " | llvm-as > %t.out2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc
+; RUN: echo "%S = type [8 x int] external global %S " | llvm-upgrade | llvm-as > %t.out2.bc
 ; RUN: llvm-link %t.out[12].bc | llvm-dis | grep %S | grep '{'
 
 %S = type { int }
diff --git a/test/Linker/2003-10-27-LinkOncePromote.ll b/test/Linker/2003-10-27-LinkOncePromote.ll
index e726222..617e5c6 100644
--- a/test/Linker/2003-10-27-LinkOncePromote.ll
+++ b/test/Linker/2003-10-27-LinkOncePromote.ll
@@ -1,8 +1,8 @@
 ; The linker should merge link-once globals into strong external globals,
 ; just like it does for weak symbols!
 
-; RUN: echo "%X = global int 7" | llvm-as > %t.2.bc
-; RUN: llvm-as < %s > %t.1.bc
+; RUN: echo "%X = global int 7" | llvm-upgrade | llvm-as > %t.2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc
 ; RUN: llvm-link %t.[12].bc
 
 %X = linkonce global int 7
diff --git a/test/Linker/2004-02-17-WeakStrongLinkage.ll b/test/Linker/2004-02-17-WeakStrongLinkage.ll
index 352c16b..b2579d4 100644
--- a/test/Linker/2004-02-17-WeakStrongLinkage.ll
+++ b/test/Linker/2004-02-17-WeakStrongLinkage.ll
@@ -1,5 +1,5 @@
-; RUN: llvm-as < %s > %t.out2.bc
-; RUN: echo "%me = global int* null" | llvm-as > %t.out1.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.out2.bc
+; RUN: echo "%me = global int* null" | llvm-upgrade | llvm-as > %t.out1.bc
 ; RUN: llvm-link %t.out[12].bc -o /dev/null -f
 
 %me = weak global int * null
diff --git a/test/Linker/2005-02-12-ConstantGlobals-2.ll b/test/Linker/2005-02-12-ConstantGlobals-2.ll
index 6de7747..bf93ca8 100644
--- a/test/Linker/2005-02-12-ConstantGlobals-2.ll
+++ b/test/Linker/2005-02-12-ConstantGlobals-2.ll
@@ -1,8 +1,8 @@
 ; Test that a prototype can be marked const, and the definition is allowed
 ; to be nonconst.
 
-; RUN: echo "%X = external constant int" | llvm-as > %t.2.bc
-; RUN: llvm-as < %s > %t.1.bc
-; RUN: llvm-link %t.[12].bc | llvm-dis | grep 'global int 7'
+; RUN: echo "%X = external constant int" | llvm-upgrade | llvm-as > %t.2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc
+; RUN: llvm-link %t.[12].bc | llvm-dis | grep 'global i32 7'
 
 %X = global int 7
diff --git a/test/Linker/2005-02-12-ConstantGlobals.ll b/test/Linker/2005-02-12-ConstantGlobals.ll
index f1e219e..5bb43a7 100644
--- a/test/Linker/2005-02-12-ConstantGlobals.ll
+++ b/test/Linker/2005-02-12-ConstantGlobals.ll
@@ -1,8 +1,8 @@
 ; Test that a prototype can be marked const, and the definition is allowed
 ; to be nonconst.
 
-; RUN: echo "%X = global int 7" | llvm-as > %t.2.bc
-; RUN: llvm-as < %s > %t.1.bc
-; RUN: llvm-link %t.[12].bc | llvm-dis | grep 'global int 7'
+; RUN: echo "%X = global int 7" | llvm-upgrade | llvm-as > %t.2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc
+; RUN: llvm-link %t.[12].bc | llvm-dis | grep 'global i32 7'
 
 %X = external constant int
diff --git a/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll b/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll
index 5caea0a..c5b78cc 100644
--- a/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll
+++ b/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll
@@ -1,5 +1,5 @@
-; RUN: echo "%G = appending global [0 x int] zeroinitializer" | llvm-as > %t.out2.bc
-; RUN: llvm-as < %s > %t.out1.bc
+; RUN: echo "%G = appending global [0 x int] zeroinitializer" | llvm-upgrade | llvm-as > %t.out2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc
 ; RUN: llvm-link %t.out[12].bc | llvm-dis | grep '%G ='
 
 ; When linked, the globals should be merged, and the result should still 
diff --git a/test/Linker/2006-01-19-ConstantPacked.ll b/test/Linker/2006-01-19-ConstantPacked.ll
index 3f7bf46..df56105 100644
--- a/test/Linker/2006-01-19-ConstantPacked.ll
+++ b/test/Linker/2006-01-19-ConstantPacked.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as %s -f -o %s.bc ; llvm-link -f -o %s.linked %s.bc
+; RUN: llvm-upgrade < %s | llvm-as -f -o %s.bc ; llvm-link -f -o %s.linked %s.bc
 
 target endian = big
 target pointersize = 32
diff --git a/test/Linker/2006-06-15-GlobalVarAlignment.ll b/test/Linker/2006-06-15-GlobalVarAlignment.ll
index 65fde7c..22e9755 100644
--- a/test/Linker/2006-06-15-GlobalVarAlignment.ll
+++ b/test/Linker/2006-06-15-GlobalVarAlignment.ll
@@ -1,7 +1,7 @@
 ; The linker should choose the largest alignment when linking.
 
-; RUN: echo "%X = global int 7, align 8" | llvm-as > %t.2.bc
-; RUN: llvm-as < %s > %t.1.bc
+; RUN: echo "%X = global int 7, align 8" | llvm-upgrade | llvm-as > %t.2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc
 ; RUN: llvm-link %t.[12].bc | llvm-dis | grep 'align 8'
 
 %X = weak global int 7, align 4
diff --git a/test/Linker/AppendingLinkage2.ll b/test/Linker/AppendingLinkage2.ll
index 8aabc8b..a906f69 100644
--- a/test/Linker/AppendingLinkage2.ll
+++ b/test/Linker/AppendingLinkage2.ll
@@ -1,7 +1,7 @@
 ; Test that appending linkage works correctly when arrays are the same size.
 
-; RUN: echo "%X = appending global [1x int] [int 8]" | llvm-as > %t.2.bc
-; RUN: llvm-as < %s > %t.1.bc
+; RUN: echo "%X = appending global [1x int] [int 8]" | llvm-upgrade | llvm-as > %t.2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc
 ; RUN: llvm-link %t.[12].bc | llvm-dis | grep 7 | grep 8
 
 %X = appending global [1 x int] [int 7]
diff --git a/test/Linker/ConstantGlobals1.ll b/test/Linker/ConstantGlobals1.ll
index ac2d5c0..1a05f7a 100644
--- a/test/Linker/ConstantGlobals1.ll
+++ b/test/Linker/ConstantGlobals1.ll
@@ -1,7 +1,7 @@
 ; Test that appending linkage works correctly when arrays are the same size.
 
-; RUN: echo "%X = constant [1x int] [int 8]" | llvm-as > %t.2.bc
-; RUN: llvm-upgrade %s | llvm-as > %t.1.bc
+; RUN: echo "%X = constant [1x int] [int 8]" | llvm-upgrade | llvm-as > %t.2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc
 ; RUN: llvm-link %t.[12].bc | llvm-dis | grep constant
 
 %X = uninitialized global [1 x int]
diff --git a/test/Linker/ConstantGlobals2.ll b/test/Linker/ConstantGlobals2.ll
index 3650c5f..ae97a0b 100644
--- a/test/Linker/ConstantGlobals2.ll
+++ b/test/Linker/ConstantGlobals2.ll
@@ -1,7 +1,7 @@
 ; Test that appending linkage works correctly when arrays are the same size.
 
-; RUN: echo "%X = external global [1x int]" | llvm-as > %t.2.bc
-; RUN: llvm-upgrade %s | llvm-as > %t.1.bc
+; RUN: echo "%X = external global [1x int]" | llvm-upgrade | llvm-as > %t.2.bc
+; RUN: llvm-upgrade %s -o - | llvm-as > %t.1.bc
 ; RUN: llvm-link %t.[12].bc | llvm-dis | grep constant
 
 %X = constant [1 x int] [ int 12 ]
diff --git a/test/Linker/ConstantGlobals3.ll b/test/Linker/ConstantGlobals3.ll
index 5872706..9a84c3a 100644
--- a/test/Linker/ConstantGlobals3.ll
+++ b/test/Linker/ConstantGlobals3.ll
@@ -1,6 +1,6 @@
 ; Test that appending linkage works correctly when arrays are the same size.
 
-; RUN: echo "%X = external constant [1x int]" | llvm-as > %t.2.bc
+; RUN: echo "%X = external constant [1x int]" | llvm-upgrade | llvm-as > %t.2.bc
 ; RUN: llvm-upgrade %s | llvm-as > %t.1.bc
 ; RUN: llvm-link %t.[12].bc | llvm-dis | grep constant
 
diff --git a/test/Linker/LinkOnce.ll b/test/Linker/LinkOnce.ll
index 17e742e..95f65ae 100644
--- a/test/Linker/LinkOnce.ll
+++ b/test/Linker/LinkOnce.ll
@@ -1,8 +1,8 @@
 ; This fails because the linker renames the non-opaque type not the opaque 
 ; one...
 
-; RUN: echo "%X = linkonce global int 8" | llvm-as > %t.2.bc
-; RUN: llvm-as < %s > %t.1.bc
+; RUN: echo "%X = linkonce global int 8" | llvm-upgrade | llvm-as > %t.2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc
 ; RUN: llvm-link %t.[12].bc | llvm-dis
 
 %X = linkonce global int 7
diff --git a/test/Linker/weakextern.ll b/test/Linker/weakextern.ll
index d1f78fb..3bda535 100644
--- a/test/Linker/weakextern.ll
+++ b/test/Linker/weakextern.ll
@@ -1,9 +1,9 @@
-; RUN: llvm-as < %s > %t.bc
-; RUN: llvm-as < `dirname %s`/testlink1.ll > %t2.bc
+; RUN: llvm-upgrade < %s | llvm-as > %t.bc
+; RUN: llvm-upgrade < `dirname %s`/testlink1.ll | llvm-as > %t2.bc
 ; RUN: llvm-link %t.bc %t.bc %t2.bc -o %t1.bc -f
-; RUN: llvm-dis < %t1.bc |grep "kallsyms_names = extern_weak" &&
-; RUN: llvm-dis < %t1.bc |grep "MyVar = external global int" &&
-; RUN: llvm-dis < %t1.bc |grep "Inte = global int"
+; RUN: llvm-dis < %t1.bc | grep "kallsyms_names = extern_weak" &&
+; RUN: llvm-dis < %t1.bc | grep "MyVar = external global i32" &&
+; RUN: llvm-dis < %t1.bc | grep "Inte = global i32"
 
 %kallsyms_names = extern_weak global [0 x ubyte]
 %MyVar     = extern_weak global int