llvm.org GIT mirror llvm / 6458c31
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 Chris Lattner 18 years ago
4 changed file(s) with 14 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
1111 int "foo"(int %blah)
1212 begin
1313 store int 5, int *%MyVar
14 store int 12, { \2 *, int } * %MyIntList, uint 0, ubyte 1
14 %idx = getelementptr { \2 *, int } * %MyIntList, uint 0, ubyte 1
15 store int 12, int* %idx
1516 ret int %blah
1617 end
1718
8787 ret %list* null
8888
8989 bb4:
90 %reg111 = load %list* %reg115, uint 0, ubyte 1 ;;
90 %idx = getelementptr %list* %reg115, uint 0, ubyte 1 ;;
91 %reg111 = load int* %idx
9192 %cond1013 = setne int %reg111, %Data ;;
9293 br bool %cond1013, label %bb6, label %bb5
9394
9596 ret %list* %reg115
9697
9798 bb6:
98 %reg116 = load %list* %reg115, uint 0, ubyte 0 ;;<%list*>
99 %idx2 = getelementptr %list* %reg115, uint 0, ubyte 0 ;;<%list*>
100 %reg116 = load %list** %idx2
99101 br label %bb2
100102 end
1212 %sptr = alloca %struct ; yields {%struct*}:sptr
1313 %nsptr = getelementptr %struct * %sptr, uint 0, ubyte 1 ; yields {inners*}:nsptr
1414 %ubsptr = getelementptr %inners * %nsptr, uint 0, ubyte 1 ; yields {{ubyte}*}:ubsptr
15 store ubyte 4, {ubyte} * %ubsptr, uint 0, ubyte 0
15 %idx = getelementptr {ubyte} * %ubsptr, uint 0, ubyte 0
16 store ubyte 4, ubyte* %idx
1617
1718 %fptr = getelementptr %struct * %sptr, uint 0, ubyte 1, ubyte 0 ; yields {float*}:fptr
1819 store float 4.0, float * %fptr
1515 %array1 = malloc ubyte, uint 4 ; yields {ubyte*}:array1
1616 %array2 = malloc ubyte, uint %size ; yields {ubyte*}:array2
1717
18 store ubyte 123, [4 x ubyte]* %array0, uint 0, uint 2
18 %idx = getelementptr [4 x ubyte]* %array0, uint 0, uint 2
19 store ubyte 123, ubyte* %idx
1920 free [4x ubyte]* %array0
2021 free ubyte* %array1
2122 free ubyte* %array2
2223
2324
2425 %aa = alloca %complexty, uint 5
25 store sbyte *null, %complexty* %aa, uint %i0, ubyte 1, ubyte 0, uint %j0
26 %idx2 = getelementptr %complexty* %aa, uint %i0, ubyte 1, ubyte 0, uint %j0
27 store sbyte *null, sbyte** %idx2
2628
2729 %ptr = alloca int ; yields {int*}:ptr
2830 store int 3, int* %ptr ; yields {void}
3032
3133 %sptr = alloca %struct ; yields {%struct*}:sptr
3234 %ubsptr = getelementptr %struct * %sptr, uint 0, ubyte 1, ubyte 1 ; yields {{ubyte}*}:ubsptr
33 store ubyte 4, {ubyte} * %ubsptr, uint 0, ubyte 0
35 %idx3 = getelementptr {ubyte} * %ubsptr, uint 0, ubyte 0
36 store ubyte 4, ubyte* %idx3
3437
3538 ret int 3
3639 end