Promote GEP ubyte indices to uint. Backwards compatibility for 1.2 and
older features will be dropped soon and these test cases must not rely
on the upgrade capability.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31896 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Feature/constexpr.ll b/test/Feature/constexpr.ll
index 0572fc9..5300da7 100644
--- a/test/Feature/constexpr.ll
+++ b/test/Feature/constexpr.ll
@@ -61,17 +61,18 @@
 %S3  = global %SAType* %S3c		    ;; Ref. to constant S3
 
 					    ;; Pointer to float (**%S1).1.0
-%S1fld1a = global float* getelementptr (%SType* %S2c, long 0, ubyte 1, ubyte 0)
+%S1fld1a = global float* getelementptr (%SType* %S2c, long 0, uint 1, uint 0)
 					    ;; Another ptr to the same!
-%S1fld1b = global float* getelementptr (%SType* %S2c, long 0, ubyte 1, ubyte 0)
+%S1fld1b = global float* getelementptr (%SType* %S2c, long 0, uint 1, uint 0)
 
 %S1fld1bptr = global float** %S1fld1b	    ;; Ref. to previous pointer
 
 					    ;; Pointer to ubyte (**%S2).1.1.0
-%S2fld3 = global ubyte* getelementptr (%SType* %S2c, long 0, ubyte 1, ubyte 1, ubyte 0) 
+%S2fld3 = global ubyte* getelementptr (%SType* %S2c, long 0, uint 1, uint 1, %uint 0) 
 
 					    ;; Pointer to float (**%S2).1.0[0]
-;%S3fld3 = global float* getelementptr (%SAType** %S3, long 0, long 0, ubyte 1, ubyte 0, long 0) 
+;%S3fld3 = global float* getelementptr (%SAType** %S3, long 0, long 0, uint 1,
+uint 0, long 0) 
 
 ;;---------------------------------------------------------
 ;; TODO: Test constant expressions for unary and binary operators
@@ -86,7 +87,7 @@
 
 %char8a = global int* cast (sbyte* getelementptr([11x sbyte]* %somestr, long 0, long 8) to int*)
 
-;%S3fld3 = global float* getelementptr (%SAType** %S3, long 0, long 0, ubyte 1, ubyte 0, long 0) 
+;%S3fld3 = global float* getelementptr (%SAType** %S3, long 0, long 0, uint 1, uint 0, long 0) 
 
 
 ;;---------------------------------------------------
diff --git a/test/Feature/globalvars.ll b/test/Feature/globalvars.ll
index 0b20c1b..b500162 100644
--- a/test/Feature/globalvars.ll
+++ b/test/Feature/globalvars.ll
@@ -19,7 +19,7 @@
 int "foo"(int %blah)
 begin
 	store int 5, int *%MyVar
-	%idx = getelementptr { \2 *, int } * %MyIntList, long 0, ubyte 1
+	%idx = getelementptr { \2 *, int } * %MyIntList, long 0, uint 1
   	store int 12, int* %idx
   	ret int %blah
 end
diff --git a/test/Feature/recursivetype.ll b/test/Feature/recursivetype.ll
index 29fb93c..e91d49e 100644
--- a/test/Feature/recursivetype.ll
+++ b/test/Feature/recursivetype.ll
@@ -93,7 +93,7 @@
         ret %list* null
 
 bb4:
-	%idx = getelementptr %list* %reg115, long 0, ubyte 1                  ;;<int>
+	%idx = getelementptr %list* %reg115, long 0, uint 1                  ;;<int>
         %reg111 = load int* %idx
         %cond1013 = setne int %reg111, %Data                    ;;<bool>
         br bool %cond1013, label %bb6, label %bb5
@@ -102,7 +102,7 @@
         ret %list* %reg115
 
 bb6:
-	%idx2 = getelementptr %list* %reg115, long 0, ubyte 0                  ;;<%list*>
+	%idx2 = getelementptr %list* %reg115, long 0, uint 0                  ;;<%list*>
         %reg116 = load %list** %idx2
         br label %bb2
 end
diff --git a/test/Feature/testalloca.ll b/test/Feature/testalloca.ll
index ac08be6..5a13bad 100644
--- a/test/Feature/testalloca.ll
+++ b/test/Feature/testalloca.ll
@@ -15,12 +15,12 @@
     %val = load int* %ptr                   ; yields {int}:val = int %3
 
     %sptr = alloca %struct                  ; yields {%struct*}:sptr
-    %nsptr = getelementptr %struct * %sptr, long 0, ubyte 1  ; yields {inners*}:nsptr
-    %ubsptr = getelementptr %inners * %nsptr, long 0, ubyte 1  ; yields {{ubyte}*}:ubsptr
-    %idx = getelementptr {ubyte} * %ubsptr, long 0, ubyte 0
+    %nsptr = getelementptr %struct * %sptr, long 0, uint 1  ; yields {inners*}:nsptr
+    %ubsptr = getelementptr %inners * %nsptr, long 0, uint 1  ; yields {{ubyte}*}:ubsptr
+    %idx = getelementptr {ubyte} * %ubsptr, long 0, uint 0
     store ubyte 4, ubyte* %idx
     
-    %fptr = getelementptr %struct * %sptr, long 0, ubyte 1, ubyte 0  ; yields {float*}:fptr
+    %fptr = getelementptr %struct * %sptr, long 0, uint 1, uint 0  ; yields {float*}:fptr
     store float 4.0, float * %fptr
     
     ret int 3
diff --git a/test/Feature/testmemory.ll b/test/Feature/testmemory.ll
index cc6fe71..573ee98 100644
--- a/test/Feature/testmemory.ll
+++ b/test/Feature/testmemory.ll
@@ -28,7 +28,7 @@
 
 
     %aa = alloca %complexty, uint 5
-    %idx2 = getelementptr %complexty* %aa, long %i0, ubyte 1, ubyte 0, long %j0
+    %idx2 = getelementptr %complexty* %aa, long %i0, uint 1, uint 0, long %j0
     store sbyte *null, sbyte** %idx2
     
     %ptr = alloca int                       ; yields {int*}:ptr
@@ -36,8 +36,8 @@
     %val = load int* %ptr                   ; yields {int}:val = int %3
 
     %sptr = alloca %struct                  ; yields {%struct*}:sptr
-    %ubsptr = getelementptr %struct * %sptr, long 0, ubyte 1, ubyte 1  ; yields {{ubyte}*}:ubsptr
-    %idx3 = getelementptr {ubyte} * %ubsptr, long 0, ubyte 0
+    %ubsptr = getelementptr %struct * %sptr, long 0, uint 1, uint 1  ; yields {{ubyte}*}:ubsptr
+    %idx3 = getelementptr {ubyte} * %ubsptr, long 0, uint 0
     store ubyte 4, ubyte* %idx3
 
     ret int 3