aboutsummaryrefslogtreecommitdiff
path: root/test/Feature
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-11-23 15:14:52 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-11-23 15:14:52 +0000
commite5d4efa63ec2c1296e3a1a3e70763df02cd1a7ab (patch)
tree8d911b30b965f442bda5d3372328d7c093438a6b /test/Feature
parent565706b93e3695da49aee8d2eb67006ffdb2591f (diff)
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
Diffstat (limited to 'test/Feature')
-rw-r--r--test/Feature/constexpr.ll11
-rw-r--r--test/Feature/globalvars.ll2
-rw-r--r--test/Feature/recursivetype.ll4
-rw-r--r--test/Feature/testalloca.ll8
-rw-r--r--test/Feature/testmemory.ll6
5 files changed, 16 insertions, 15 deletions
diff --git a/test/Feature/constexpr.ll b/test/Feature/constexpr.ll
index 0572fc95ea..5300da73b9 100644
--- a/test/Feature/constexpr.ll
+++ b/test/Feature/constexpr.ll
@@ -61,17 +61,18 @@ global float 0.0
%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 @@ global float 0.0
%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 0b20c1b773..b5001627c6 100644
--- a/test/Feature/globalvars.ll
+++ b/test/Feature/globalvars.ll
@@ -19,7 +19,7 @@ implementation
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 29fb93c814..e91d49e815 100644
--- a/test/Feature/recursivetype.ll
+++ b/test/Feature/recursivetype.ll
@@ -93,7 +93,7 @@ bb3:
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 @@ bb5:
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 ac08be60e2..5a13bada72 100644
--- a/test/Feature/testalloca.ll
+++ b/test/Feature/testalloca.ll
@@ -15,12 +15,12 @@ begin
%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 cc6fe71019..573ee982d7 100644
--- a/test/Feature/testmemory.ll
+++ b/test/Feature/testmemory.ll
@@ -28,7 +28,7 @@ begin
%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 @@ begin
%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