diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-11-23 15:14:52 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-11-23 15:14:52 +0000 |
commit | e5d4efa63ec2c1296e3a1a3e70763df02cd1a7ab (patch) | |
tree | 8d911b30b965f442bda5d3372328d7c093438a6b | |
parent | 565706b93e3695da49aee8d2eb67006ffdb2591f (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
62 files changed, 227 insertions, 226 deletions
diff --git a/test/Analysis/BasicAA/2003-03-04-GEPCrash.ll b/test/Analysis/BasicAA/2003-03-04-GEPCrash.ll index 1f48327809..8a25031d7b 100644 --- a/test/Analysis/BasicAA/2003-03-04-GEPCrash.ll +++ b/test/Analysis/BasicAA/2003-03-04-GEPCrash.ll @@ -1,7 +1,7 @@ ; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output ; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2 void %test({[2 x int],[2 x int]}* %A, long %X, long %Y) { - %P1 = getelementptr {[2 x int],[2 x int]}* %A, long 0, ubyte 0, long %X - %P2 = getelementptr {[2 x int],[2 x int]}* %A, long 0, ubyte 1, long %Y + %P1 = getelementptr {[2 x int],[2 x int]}* %A, long 0, uint 0, long %X + %P2 = getelementptr {[2 x int],[2 x int]}* %A, long 0, uint 1, long %Y ret void } diff --git a/test/Analysis/BasicAA/2003-05-21-GEP-Problem.ll b/test/Analysis/BasicAA/2003-05-21-GEP-Problem.ll index 7322e635ff..2e95261b5d 100644 --- a/test/Analysis/BasicAA/2003-05-21-GEP-Problem.ll +++ b/test/Analysis/BasicAA/2003-05-21-GEP-Problem.ll @@ -6,13 +6,13 @@ void %table_reindex(%struct..apr_table_t* %t.1) { ; No predecessors! br label %loopentry loopentry: ; preds = %0, %no_exit - %tmp.101 = getelementptr %struct..apr_table_t* %t.1, long 0, ubyte 0, ubyte 2 ; <int*> [#uses=1] + %tmp.101 = getelementptr %struct..apr_table_t* %t.1, long 0, uint 0, uint 2 %tmp.11 = load int* %tmp.101 ; <int> [#uses=0] br bool false, label %no_exit, label %UnifiedExitNode no_exit: ; preds = %loopentry %tmp.25 = cast int 0 to long ; <long> [#uses=1] - %tmp.261 = getelementptr %struct..apr_table_t* %t.1, long 0, ubyte 3, long %tmp.25 ; <int*> [#uses=1] + %tmp.261 = getelementptr %struct..apr_table_t* %t.1, long 0, uint 3, long %tmp.25 ; <int*> [#uses=1] store int 0, int* %tmp.261 br label %loopentry diff --git a/test/Analysis/BasicAA/2003-07-03-BasicAACrash.ll b/test/Analysis/BasicAA/2003-07-03-BasicAACrash.ll index 916b52341c..942fe9f147 100644 --- a/test/Analysis/BasicAA/2003-07-03-BasicAACrash.ll +++ b/test/Analysis/BasicAA/2003-07-03-BasicAACrash.ll @@ -6,7 +6,7 @@ implementation ; Functions: uint %BMT_CommitPartDrawObj() { - %tmp.19111 = getelementptr %struct..RefRect* null, long 0, ubyte 0, ubyte 1, ubyte 2 - %tmp.20311 = getelementptr %struct..RefRect* null, long 0, ubyte 1, ubyte 1, ubyte 2 + %tmp.19111 = getelementptr %struct..RefRect* null, long 0, uint 0, uint 1, uint 2 + %tmp.20311 = getelementptr %struct..RefRect* null, long 0, uint 1, uint 1, uint 2 ret uint 0 } diff --git a/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll b/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll index 2b6c7e12e1..c030c06ade 100644 --- a/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll +++ b/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll @@ -7,9 +7,9 @@ void %test(%T* %P) { %A = getelementptr %T* %P, long 0 - %B = getelementptr %T* %P, long 0, ubyte 0 - %C = getelementptr %T* %P, long 0, ubyte 1 - %D = getelementptr %T* %P, long 0, ubyte 1, long 0 - %E = getelementptr %T* %P, long 0, ubyte 1, long 5 + %B = getelementptr %T* %P, long 0, uint 0 + %C = getelementptr %T* %P, long 0, uint 1 + %D = getelementptr %T* %P, long 0, uint 1, long 0 + %E = getelementptr %T* %P, long 0, uint 1, long 5 ret void } diff --git a/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll b/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll index 3b37b2c07c..f751928c06 100644 --- a/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll +++ b/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll @@ -8,10 +8,10 @@ %G = external global %T void %test() { - %D = getelementptr %T* %G, long 0, ubyte 0 - %E = getelementptr %T* %G, long 0, ubyte 1, long 5 - %F = getelementptr uint* getelementptr (%T* %G, long 0, ubyte 0), long 0 - %X = getelementptr [10 x ubyte]* getelementptr (%T* %G, long 0, ubyte 1), long 0, long 5 + %D = getelementptr %T* %G, long 0, uint 0 + %E = getelementptr %T* %G, long 0, uint 1, long 5 + %F = getelementptr uint* getelementptr (%T* %G, long 0, uint 0), long 0 + %X = getelementptr [10 x ubyte]* getelementptr (%T* %G, long 0, uint 1), long 0, long 5 ret void } diff --git a/test/Analysis/BasicAA/featuretest.ll b/test/Analysis/BasicAA/featuretest.ll index 7fc129dd1e..d7bec22447 100644 --- a/test/Analysis/BasicAA/featuretest.ll +++ b/test/Analysis/BasicAA/featuretest.ll @@ -55,9 +55,9 @@ int %gep_distance_test(int* %A) { ; Test that if two pointers are spaced out by a constant offset, that they ; cannot alias, even if there is a variable offset between them... int %gep_distance_test2({int,int}* %A, long %distance) { - %A = getelementptr {int,int}* %A, long 0, ubyte 0 + %A = getelementptr {int,int}* %A, long 0, uint 0 %REMOVEu = load int* %A - %B = getelementptr {int,int}* %A, long %distance, ubyte 1 + %B = getelementptr {int,int}* %A, long %distance, uint 1 store int 7, int* %B ; B cannot alias A, it's at least 4 bytes away %REMOVEv = load int* %A %r = sub int %REMOVEu, %REMOVEv @@ -78,7 +78,7 @@ int %gep_distance_test3(int * %A) { int %constexpr_test() { %X = alloca int %Y = load int* %X - store int 5, int* getelementptr ({ int }* %Global, long 0, ubyte 0) + store int 5, int* getelementptr ({ int }* %Global, long 0, uint 0) %REMOVE = load int* %X %retval = sub int %Y, %REMOVE ret int %retval diff --git a/test/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll b/test/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll index ed49a85f11..db956231f8 100644 --- a/test/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll +++ b/test/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll @@ -5,12 +5,12 @@ int %main() { %A = alloca %T %B = alloca { %T } %C = alloca %T* - %Bp = getelementptr { %T }* %B, long 0, ubyte 0 + %Bp = getelementptr { %T }* %B, long 0, uint 0 %i0 = alloca int %i1 = alloca int - %Ap0 = getelementptr %T* %A, long 0, ubyte 0 - %Ap1 = getelementptr %T* %A, long 0, ubyte 1 + %Ap0 = getelementptr %T* %A, long 0, uint 0 + %Ap1 = getelementptr %T* %A, long 0, uint 1 store int* %i0, int** %Ap0 store int* %i1, int** %Ap1 diff --git a/test/Analysis/DSGraph/2003-06-29-NodeCollapsing2.ll b/test/Analysis/DSGraph/2003-06-29-NodeCollapsing2.ll index 9909c20b78..93260e821e 100644 --- a/test/Analysis/DSGraph/2003-06-29-NodeCollapsing2.ll +++ b/test/Analysis/DSGraph/2003-06-29-NodeCollapsing2.ll @@ -9,8 +9,8 @@ int %main() { %A = alloca %T %B = alloca { %T } %C = alloca %T* - %Bp = getelementptr { %T }* %B, long 0, ubyte 0 - %Ap = getelementptr %T* %A, long 0, ubyte 0 + %Bp = getelementptr { %T }* %B, long 0, uint 0 + %Ap = getelementptr %T* %A, long 0, uint 0 store %T* %A, %T** %C store %T* %Bp, %T** %C ; This store was causing merging to happen! diff --git a/test/Analysis/DSGraph/2003-07-01-FieldCollapse.ll b/test/Analysis/DSGraph/2003-07-01-FieldCollapse.ll index fe13567e5e..a0ab492443 100644 --- a/test/Analysis/DSGraph/2003-07-01-FieldCollapse.ll +++ b/test/Analysis/DSGraph/2003-07-01-FieldCollapse.ll @@ -6,6 +6,6 @@ implementation void %test() { - store short 5, short* getelementptr ({ int, short, short }* %X, long 0, ubyte 1) + store short 5, short* getelementptr ({ int, short, short }* %X, long 0, uint 1) ret void } diff --git a/test/Analysis/DSGraph/2003-11-02-NodeCollapsing.ll b/test/Analysis/DSGraph/2003-11-02-NodeCollapsing.ll index 846a3cb1e8..416fc25bbb 100644 --- a/test/Analysis/DSGraph/2003-11-02-NodeCollapsing.ll +++ b/test/Analysis/DSGraph/2003-11-02-NodeCollapsing.ll @@ -11,8 +11,8 @@ void %test() { %A = alloca double* %B = alloca %S %C = alloca %T - %b = getelementptr %S* %B, long 0, ubyte 0 - %c = getelementptr %T* %C, long 0, ubyte 0 + %b = getelementptr %S* %B, long 0, uint 0 + %c = getelementptr %T* %C, long 0, uint 0 store double* %b, double** %A store double* %c, double** %A diff --git a/test/Analysis/DSGraph/2005-03-22-IncompleteGlobal.ll b/test/Analysis/DSGraph/2005-03-22-IncompleteGlobal.ll index 182876c039..86b053367d 100644 --- a/test/Analysis/DSGraph/2005-03-22-IncompleteGlobal.ll +++ b/test/Analysis/DSGraph/2005-03-22-IncompleteGlobal.ll @@ -6,7 +6,7 @@ %G = external global %S void %main() { - %b = getelementptr %S* %G, long 0, ubyte 0 + %b = getelementptr %S* %G, long 0, uint 0 store double 0.1, double* %b ret void } diff --git a/test/Analysis/DSGraph/PhysicalSubtyping.ll b/test/Analysis/DSGraph/PhysicalSubtyping.ll index cdc2cf0238..6e9676ea12 100644 --- a/test/Analysis/DSGraph/PhysicalSubtyping.ll +++ b/test/Analysis/DSGraph/PhysicalSubtyping.ll @@ -7,9 +7,9 @@ int %main() { %A = alloca %S - %Ap = getelementptr %S* %A, long 0, ubyte 0 + %Ap = getelementptr %S* %A, long 0, uint 0 %B = alloca %T - %Bp = getelementptr %T* %B, long 0, ubyte 0 + %Bp = getelementptr %T* %B, long 0, uint 0 %C = alloca int* store int* %Ap, int** %C diff --git a/test/Analysis/DSGraph/gcsetest.ll b/test/Analysis/DSGraph/gcsetest.ll index 37600a8900..b9b28c4f8c 100644 --- a/test/Analysis/DSGraph/gcsetest.ll +++ b/test/Analysis/DSGraph/gcsetest.ll @@ -10,21 +10,21 @@ implementation %Ap = malloc int %Bp = malloc int %C = malloc {int*, int*} - %C1p = getelementptr {int*, int*}* %C, long 0, ubyte 0 + %C1p = getelementptr {int*, int*}* %C, long 0, uint 0 store int* %Ap, int** %C1p - %C2p = getelementptr {int*, int*}* %C, long 0, ubyte 1 + %C2p = getelementptr {int*, int*}* %C, long 0, uint 1 store int* %Bp, int** %C2p ret %intpair* %C } int* %getp(%intpair* %P) { - %pp = getelementptr %intpair* %P, long 0, ubyte 0 + %pp = getelementptr %intpair* %P, long 0, uint 0 %V = load int** %pp ret int *%V } int* %getq(%intpair* %P) { - %pp = getelementptr %intpair* %P, long 0, ubyte 1 + %pp = getelementptr %intpair* %P, long 0, uint 1 %V = load int** %pp ret int *%V } diff --git a/test/Analysis/LoadVN/dependent_loads.ll b/test/Analysis/LoadVN/dependent_loads.ll index 959628f4d6..331ba2110e 100644 --- a/test/Analysis/LoadVN/dependent_loads.ll +++ b/test/Analysis/LoadVN/dependent_loads.ll @@ -15,11 +15,11 @@ sbyte %test(sbyte** %P) { sbyte %test(%S ** %P) { %A = load %S** %P - %B = getelementptr %S* %A, int 0, ubyte 1 + %B = getelementptr %S* %A, int 0, uint 1 %C = load sbyte* %B %X = load %S** %P - %Y = getelementptr %S* %X, int 0, ubyte 1 + %Y = getelementptr %S* %X, int 0, uint 1 %Z = load sbyte* %Y %R = sub sbyte %C, %Z diff --git a/test/Assembler/2004-04-04-GetElementPtrIndexTypes.ll b/test/Assembler/2004-04-04-GetElementPtrIndexTypes.ll index 7912a969e6..ea6996197b 100644 --- a/test/Assembler/2004-04-04-GetElementPtrIndexTypes.ll +++ b/test/Assembler/2004-04-04-GetElementPtrIndexTypes.ll @@ -4,9 +4,9 @@ int *%t1({ float, int }* %X) { - %W = getelementptr { float, int }* %X, int 20, ubyte 1 + %W = getelementptr { float, int }* %X, int 20, uint 1 %X = getelementptr { float, int }* %X, uint 20, uint 1 - %Y = getelementptr { float, int }* %X, long 20, ubyte 1 + %Y = getelementptr { float, int }* %X, long 20, uint 1 %Z = getelementptr { float, int }* %X, ulong 20, uint 1 ret int* %Y } diff --git a/test/Assembler/ConstantExprFold.llx b/test/Assembler/ConstantExprFold.llx index 294c77a0d6..a0e9505909 100644 --- a/test/Assembler/ConstantExprFold.llx +++ b/test/Assembler/ConstantExprFold.llx @@ -20,8 +20,8 @@ global long* cast (long xor (long cast (long* %A to long), long 0) to long*) ; X global bool setlt (long* %A, long* getelementptr (long* %A, long 1)) ; true global bool setlt (long* %A, long* getelementptr (long* %A, long 0)) ; false -global bool setlt (int* getelementptr (%Ty* %B, long 0, ubyte 0), - int* getelementptr (%Ty* %B, long 0, ubyte 1)) ; true +global bool setlt (int* getelementptr (%Ty* %B, long 0, uint 0), + int* getelementptr (%Ty* %B, long 0, uint 1)) ; true ;global bool setne (long* %A, long* cast (%Ty* %B to long*)) ; true global bool seteq ({ short }* cast (int 1 to { short }*), { short }* null) diff --git a/test/CodeGen/CBackend/2003-06-01-NullPointerType.ll b/test/CodeGen/CBackend/2003-06-01-NullPointerType.ll index 5cd1c4c03b..c970786a71 100644 --- a/test/CodeGen/CBackend/2003-06-01-NullPointerType.ll +++ b/test/CodeGen/CBackend/2003-06-01-NullPointerType.ll @@ -4,6 +4,6 @@ %X = type { int, float } void %test() { - getelementptr %X* null, long 0, ubyte 1 + getelementptr %X* null, long 0, uint 1 ret void } diff --git a/test/CodeGen/CBackend/2003-10-28-CastToPtrToStruct.ll b/test/CodeGen/CBackend/2003-10-28-CastToPtrToStruct.ll index ae0679ea41..0fd4fbacfc 100644 --- a/test/CodeGen/CBackend/2003-10-28-CastToPtrToStruct.ll +++ b/test/CodeGen/CBackend/2003-10-28-CastToPtrToStruct.ll @@ -7,6 +7,6 @@ implementation ; Functions: void %I_InitGraphics() { shortcirc_next.3: ; preds = %no_exit.1 - %tmp.319 = load int* getelementptr ({ int, int }* cast (%union._XEvent* %.X_event_9 to { int, int }*), long 0, ubyte 1) ; <int> [#uses=1] + %tmp.319 = load int* getelementptr ({ int, int }* cast (%union._XEvent* %.X_event_9 to { int, int }*), long 0, uint 1) ; <int> [#uses=1] ret void } diff --git a/test/CodeGen/Generic/2003-05-28-ManyArgs.ll b/test/CodeGen/Generic/2003-05-28-ManyArgs.ll index 1a89b2b69c..e01d9f05fb 100644 --- a/test/CodeGen/Generic/2003-05-28-ManyArgs.ll +++ b/test/CodeGen/Generic/2003-05-28-ManyArgs.ll @@ -45,99 +45,99 @@ entry: %det_routing_arch = alloca %struct..s_det_routing_arch %segment_inf = alloca %struct..s_segment_inf* %timing_inf = alloca { uint, float, float, float, float, float, float, float, float, float, float } - %tmp.101 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 4 + %tmp.101 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 4 %tmp.105 = getelementptr [300 x sbyte]* %net_file, long 0, long 0 %tmp.106 = getelementptr [300 x sbyte]* %arch_file, long 0, long 0 %tmp.107 = getelementptr [300 x sbyte]* %place_file, long 0, long 0 %tmp.108 = getelementptr [300 x sbyte]* %route_file, long 0, long 0 - %tmp.109 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 0 - %tmp.112 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 0 - %tmp.114 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 6 - %tmp.118 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 7 + %tmp.109 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, uint 0 + %tmp.112 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 0 + %tmp.114 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 6 + %tmp.118 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 7 %tmp.135 = load int* %operation %tmp.137 = load int* %tmp.112 - %tmp.138 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 1 + %tmp.138 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 1 %tmp.139 = load float* %tmp.138 - %tmp.140 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 2 + %tmp.140 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 2 %tmp.141 = load int* %tmp.140 - %tmp.142 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 3 + %tmp.142 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 3 %tmp.143 = load uint* %tmp.142 %tmp.145 = load sbyte** %tmp.101 - %tmp.146 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 5 + %tmp.146 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, uint 5 %tmp.147 = load uint* %tmp.146 %tmp.149 = load int* %tmp.114 %tmp.154 = load uint* %full_stats %tmp.155 = load uint* %verify_binary_search - %tmp.156 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, ubyte 0 + %tmp.156 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, uint 0 %tmp.157 = load uint* %tmp.156 - %tmp.158 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, ubyte 1 + %tmp.158 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, uint 1 %tmp.159 = load float* %tmp.158 - %tmp.160 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, ubyte 2 + %tmp.160 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, uint 2 %tmp.161 = load float* %tmp.160 - %tmp.162 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, ubyte 3 + %tmp.162 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, uint 3 %tmp.163 = load float* %tmp.162 - %tmp.164 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, ubyte 4 + %tmp.164 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, uint 4 %tmp.165 = load float* %tmp.164 - %tmp.166 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 0 + %tmp.166 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 0 %tmp.167 = load float* %tmp.166 - %tmp.168 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 1 + %tmp.168 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 1 %tmp.169 = load float* %tmp.168 - %tmp.170 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 2 + %tmp.170 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 2 %tmp.171 = load float* %tmp.170 - %tmp.172 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 3 + %tmp.172 = getelementptr %struct..s_router_opts* %router_opts, long 0, uint 3 %tmp.173 = load float* %tmp.172 - %tmp.174 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 4 + %tmp.174 = getelementptr %struct..s_router_opts* % |