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/CodeGen/X86/2006-05-02-InstrSched1.ll b/test/CodeGen/X86/2006-05-02-InstrSched1.ll
index 631e416..4711897 100644
--- a/test/CodeGen/X86/2006-05-02-InstrSched1.ll
+++ b/test/CodeGen/X86/2006-05-02-InstrSched1.ll
@@ -11,10 +11,8 @@
 	%tmp4 = getelementptr ubyte* %tmp, uint %tmp3		; <ubyte*> [#uses=1]
 	%tmp7 = load uint* %tmp		; <uint> [#uses=1]
 	%tmp8 = getelementptr ubyte* %tmp, uint %tmp7		; <ubyte*> [#uses=1]
-	%tmp8 = cast ubyte* %tmp8 to sbyte*		; <sbyte*> [#uses=1]
-	%tmp4 = cast ubyte* %tmp4 to sbyte*		; <sbyte*> [#uses=1]
-	%tmp = tail call int %memcmp( sbyte* %tmp8, sbyte* %tmp4, uint %tmp )		; <int> [#uses=1]
-	ret int %tmp
+	%result = tail call int %memcmp( sbyte* %tmp8, sbyte* %tmp4, uint %tmp )		; <int> [#uses=1]
+	ret int %result
 }
 
 declare int %memcmp(sbyte*, sbyte*, uint)
diff --git a/test/CodeGen/X86/2006-08-07-CycleInDAG.ll b/test/CodeGen/X86/2006-08-07-CycleInDAG.ll
index 1de4028..6cc548e 100644
--- a/test/CodeGen/X86/2006-08-07-CycleInDAG.ll
+++ b/test/CodeGen/X86/2006-08-07-CycleInDAG.ll
@@ -10,8 +10,8 @@
 	%tmp24.i = load int* null		; <int> [#uses=1]
 	%tmp13.i12.i = tail call double %ldexp( double 0.000000e+00, int 0 )		; <double> [#uses=1]
 	%tmp13.i13.i = cast double %tmp13.i12.i to float		; <float> [#uses=1]
-	%tmp11.i = load int* null		; <int> [#uses=1]
-	%tmp11.i = cast int %tmp11.i to uint		; <uint> [#uses=1]
+	%tmp11.s = load int* null		; <int> [#uses=1]
+	%tmp11.i = cast int %tmp11.s to uint		; <uint> [#uses=1]
 	%n.i = cast int %tmp24.i to uint		; <uint> [#uses=1]
 	%tmp13.i7 = mul uint %tmp11.i, %n.i		; <uint> [#uses=1]
 	%tmp.i8 = tail call sbyte* %calloc( uint %tmp13.i7, uint 4 )		; <sbyte*> [#uses=0]
diff --git a/test/CodeGen/X86/loop-hoist.ll b/test/CodeGen/X86/loop-hoist.ll
index 3ee0cbc..ccbf53f 100644
--- a/test/CodeGen/X86/loop-hoist.ll
+++ b/test/CodeGen/X86/loop-hoist.ll
@@ -5,9 +5,9 @@
 
 implementation   ; Functions:
 
-void %foo(int %N) {
+void %foo(int %N.in) {
 entry:
-        %N = cast int %N to uint                ; <uint> [#uses=1]
+        %N = cast int %N.in to uint                ; <uint> [#uses=1]
         br label %cond_true
 
 cond_true:              ; preds = %cond_true, %entry
diff --git a/test/CodeGen/X86/loop-strength-reduce.ll b/test/CodeGen/X86/loop-strength-reduce.ll
index a54d907..b0f5766 100644
--- a/test/CodeGen/X86/loop-strength-reduce.ll
+++ b/test/CodeGen/X86/loop-strength-reduce.ll
@@ -4,10 +4,10 @@
 
 %A = internal global [16 x [16 x int]] zeroinitializer, align 32
 
-void %test(int %row, int %N) {
+void %test(int %row, int %N.in) {
 entry:
-	%N = cast int %N to uint
-	%tmp5 = setgt int %N, 0
+	%N = cast int %N.in to uint
+	%tmp5 = setgt int %N.in, 0
 	br bool %tmp5, label %cond_true, label %return
 
 cond_true:
diff --git a/test/CodeGen/X86/trunc-to-bool.ll b/test/CodeGen/X86/trunc-to-bool.ll
index 3e00975..f4fa9c6 100644
--- a/test/CodeGen/X86/trunc-to-bool.ll
+++ b/test/CodeGen/X86/trunc-to-bool.ll
@@ -1,19 +1,21 @@
 ; An integer truncation to bool should be done with an and instruction to make
 ; sure only the LSBit survives. Test that this is the case both for a returned
 ; value and as the operand of a branch.
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep '\(and\)\|\(test.*\$1\)' | wc -l | grep 6
-bool %test1(int %X) {
-    %Y = trunc int %X to bool
+; RUN: llvm-as < %s | llc -march=x86 &&
+; RUN: llvm-as < %s | llc -march=x86 | grep '\(and\)\|\(test.*\$1\)' | \
+; RUN:   wc -l | grep 6
+
+define bool @zext %test1(i32 %X) {
+    %Y = trunc i32 %X to bool
     ret bool %Y
 }
 
-bool %test2(int %val, int %mask) {
+define bool %test2(i32 %val, i32 %mask) {
 entry:
-    %mask     = trunc int %mask to ubyte
-    %shifted  = ashr int %val, ubyte %mask
-    %anded    = and int %shifted, 1
-    %trunced  = trunc int %anded to bool
+    %mask = trunc i32 %mask to i8
+    %shifted = ashr i32 %val, i8 %mask
+    %anded = and i32 %shifted, 1
+    %trunced = trunc i32 %anded to bool
     br bool %trunced, label %ret_true, label %ret_false
 ret_true:
     ret bool true
@@ -21,39 +23,40 @@
     ret bool false
 }
 
-int %test3(sbyte* %ptr) {
-    %val = load sbyte* %ptr
-    %tmp = trunc sbyte %val to bool             ; %<bool> [#uses=1]
+define i32 %test3(i8* %ptr) {
+    %val = load i8* %ptr
+    %tmp = trunc i8 %val to bool
     br bool %tmp, label %cond_true, label %cond_false
 cond_true:
-    ret int 21
+    ret i32 21
 cond_false:
-    ret int 42
+    ret i32 42
 }
 
-int %test4(sbyte* %ptr) {
-    %tmp = ptrtoint sbyte* %ptr to bool
+define i32 %test4(i8* %ptr) {
+    %tmp = ptrtoint i8* %ptr to bool
     br bool %tmp, label %cond_true, label %cond_false
 cond_true:
-    ret int 21
+    ret i32 21
 cond_false:
-    ret int 42
+    ret i32 42
 }
 
-int %test5(float %f) {
+define i32 %test5(float %f) {
     %tmp = fptoui float %f to bool
     br bool %tmp, label %cond_true, label %cond_false
 cond_true:
-    ret int 21
+    ret i32 21
 cond_false:
-    ret int 42
+    ret i32 42
 }
 
-int %test6(double %d) {
+define i32 %test6(double %d) {
     %tmp = fptosi double %d to bool
     br bool %tmp, label %cond_true, label %cond_false
 cond_true:
-    ret int 21
+    ret i32 21
 cond_false:
-    ret int 42
+    ret i32 42
 }
+
diff --git a/test/CodeGen/X86/vec_ins_extract.ll b/test/CodeGen/X86/vec_ins_extract.ll
index 9d9f17e..b243506 100644
--- a/test/CodeGen/X86/vec_ins_extract.ll
+++ b/test/CodeGen/X86/vec_ins_extract.ll
@@ -1,7 +1,7 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -instcombine | \
-; RUN:    llc -march=x86 -mcpu=yonah &&
+; RUN:   llc -march=x86 -mcpu=yonah &&
 ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -instcombine | \
-; RUN:    llc -march=x86 -mcpu=yonah | not grep sub.*esp
+; RUN:   llc -march=x86 -mcpu=yonah | not grep sub.*esp
 
 ; This checks that various insert/extract idiom work without going to the 
 ; stack.