mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-02 10:33:53 +00:00
Covnert tests to not use indexed load/stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3454 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
abfb0b5e70
commit
6458c31c67
@ -12,7 +12,8 @@ implementation
|
||||
int "foo"(int %blah)
|
||||
begin
|
||||
store int 5, int *%MyVar
|
||||
store int 12, { \2 *, int } * %MyIntList, uint 0, ubyte 1
|
||||
%idx = getelementptr { \2 *, int } * %MyIntList, uint 0, ubyte 1
|
||||
store int 12, int* %idx
|
||||
ret int %blah
|
||||
end
|
||||
|
||||
|
@ -88,7 +88,8 @@ bb3:
|
||||
ret %list* null
|
||||
|
||||
bb4:
|
||||
%reg111 = load %list* %reg115, uint 0, ubyte 1 ;;<int>
|
||||
%idx = getelementptr %list* %reg115, uint 0, ubyte 1 ;;<int>
|
||||
%reg111 = load int* %idx
|
||||
%cond1013 = setne int %reg111, %Data ;;<bool>
|
||||
br bool %cond1013, label %bb6, label %bb5
|
||||
|
||||
@ -96,6 +97,7 @@ bb5:
|
||||
ret %list* %reg115
|
||||
|
||||
bb6:
|
||||
%reg116 = load %list* %reg115, uint 0, ubyte 0 ;;<%list*>
|
||||
%idx2 = getelementptr %list* %reg115, uint 0, ubyte 0 ;;<%list*>
|
||||
%reg116 = load %list** %idx2
|
||||
br label %bb2
|
||||
end
|
||||
|
@ -13,7 +13,8 @@ begin
|
||||
%sptr = alloca %struct ; yields {%struct*}:sptr
|
||||
%nsptr = getelementptr %struct * %sptr, uint 0, ubyte 1 ; yields {inners*}:nsptr
|
||||
%ubsptr = getelementptr %inners * %nsptr, uint 0, ubyte 1 ; yields {{ubyte}*}:ubsptr
|
||||
store ubyte 4, {ubyte} * %ubsptr, uint 0, ubyte 0
|
||||
%idx = getelementptr {ubyte} * %ubsptr, uint 0, ubyte 0
|
||||
store ubyte 4, ubyte* %idx
|
||||
|
||||
%fptr = getelementptr %struct * %sptr, uint 0, ubyte 1, ubyte 0 ; yields {float*}:fptr
|
||||
store float 4.0, float * %fptr
|
||||
|
@ -16,14 +16,16 @@ begin
|
||||
%array1 = malloc ubyte, uint 4 ; yields {ubyte*}:array1
|
||||
%array2 = malloc ubyte, uint %size ; yields {ubyte*}:array2
|
||||
|
||||
store ubyte 123, [4 x ubyte]* %array0, uint 0, uint 2
|
||||
%idx = getelementptr [4 x ubyte]* %array0, uint 0, uint 2
|
||||
store ubyte 123, ubyte* %idx
|
||||
free [4x ubyte]* %array0
|
||||
free ubyte* %array1
|
||||
free ubyte* %array2
|
||||
|
||||
|
||||
%aa = alloca %complexty, uint 5
|
||||
store sbyte *null, %complexty* %aa, uint %i0, ubyte 1, ubyte 0, uint %j0
|
||||
%idx2 = getelementptr %complexty* %aa, uint %i0, ubyte 1, ubyte 0, uint %j0
|
||||
store sbyte *null, sbyte** %idx2
|
||||
|
||||
%ptr = alloca int ; yields {int*}:ptr
|
||||
store int 3, int* %ptr ; yields {void}
|
||||
@ -31,7 +33,8 @@ begin
|
||||
|
||||
%sptr = alloca %struct ; yields {%struct*}:sptr
|
||||
%ubsptr = getelementptr %struct * %sptr, uint 0, ubyte 1, ubyte 1 ; yields {{ubyte}*}:ubsptr
|
||||
store ubyte 4, {ubyte} * %ubsptr, uint 0, ubyte 0
|
||||
%idx3 = getelementptr {ubyte} * %ubsptr, uint 0, ubyte 0
|
||||
store ubyte 4, ubyte* %idx3
|
||||
|
||||
ret int 3
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user