llvm.org GIT mirror llvm / 7c9c6ed
[opaque pointer type] Add textual IR support for explicit type parameter to load instruction Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230794 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 4 years ago
3931 changed file(s) with 30051 addition(s) and 30027 deletion(s). Raw diff Collapse all Expand all
52405240 Lex.Lex();
52415241 }
52425242
5243 if (ParseTypeAndValue(Val, Loc, PFS) ||
5243 Type *Ty = nullptr;
5244 LocTy ExplicitTypeLoc = Lex.getLoc();
5245 if (ParseType(Ty) ||
5246 ParseToken(lltok::comma, "expected comma after load's type") ||
5247 ParseTypeAndValue(Val, Loc, PFS) ||
52445248 ParseScopeAndOrdering(isAtomic, Scope, Ordering) ||
52455249 ParseOptionalCommaAlign(Alignment, AteExtraComma))
52465250 return true;
52525256 return Error(Loc, "atomic load must have explicit non-zero alignment");
52535257 if (Ordering == Release || Ordering == AcquireRelease)
52545258 return Error(Loc, "atomic load cannot use Release ordering");
5259
5260 if (Ty != cast(Val->getType())->getElementType())
5261 return Error(ExplicitTypeLoc,
5262 "explicit pointee type doesn't match operand's pointee type");
52555263
52565264 Inst = new LoadInst(Val, "", isVolatile, Alignment, Ordering, Scope);
52575265 return AteExtraComma ? InstExtraComma : InstNormal;
28972897 Out << ", ";
28982898 TypePrinter.print(I.getType(), Out);
28992899 } else if (Operand) { // Print the normal way.
2900 if (const GetElementPtrInst *GEP = dyn_cast(&I)) {
2900 if (const auto *GEP = dyn_cast(&I)) {
29012901 Out << ' ';
29022902 TypePrinter.print(GEP->getSourceElementType(), Out);
29032903 Out << ',';
2904 } else if (const auto *LI = dyn_cast(&I)) {
2905 Out << ' ';
2906 TypePrinter.print(LI->getType(), Out);
2907 Out << ", ";
29042908 }
29052909
29062910 // PrintAllTypes - Instructions who have operands of all the same type
44 ; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s
55
66 define i32 @test() {
7 ; CHECK: %Y.DONOTREMOVE = load i32* %A
7 ; CHECK: %Y.DONOTREMOVE = load i32, i32* %A
88 ; CHECK: %Z = sub i32 0, %Y.DONOTREMOVE
99 %A = alloca i32
1010 store i32 0, i32* %A
11 %X = load i32* %A
11 %X = load i32, i32* %A
1212 %B = bitcast i32* %A to i8*
1313 %C = getelementptr i8, i8* %B, i64 1
1414 store i8 1, i8* %C ; Aliases %A
15 %Y.DONOTREMOVE = load i32* %A
15 %Y.DONOTREMOVE = load i32, i32* %A
1616 %Z = sub i32 %X, %Y.DONOTREMOVE
1717 ret i32 %Z
1818 }
55 ; CHECK: sub i32 %X, %Y
66 %P2 = getelementptr i32, i32* %Ptr, i64 1
77 %P1 = getelementptr i32, i32* %Ptr, i64 %V
8 %X = load i32* %P1
8 %X = load i32, i32* %P1
99 store i32 5, i32* %P2
10 %Y = load i32* %P1
10 %Y = load i32, i32* %P1
1111 %Z = sub i32 %X, %Y
1212 ret i32 %Z
1313 }
66
77 loopentry: ; preds = %0, %no_exit
88 %tmp.101 = getelementptr %struct..apr_table_t, %struct..apr_table_t* %t.1, i64 0, i32 0, i32 2
9 %tmp.11 = load i32* %tmp.101 ; [#uses=0]
9 %tmp.11 = load i32, i32* %tmp.101 ; [#uses=0]
1010 br i1 false, label %no_exit, label %UnifiedExitNode
1111
1212 no_exit: ; preds = %loopentry
11
22 define i32 @MTConcat([3 x i32]* %a.1) {
33 %tmp.961 = getelementptr [3 x i32], [3 x i32]* %a.1, i64 0, i64 4
4 %tmp.97 = load i32* %tmp.961
4 %tmp.97 = load i32, i32* %tmp.961
55 %tmp.119 = getelementptr [3 x i32], [3 x i32]* %a.1, i64 1, i64 0
6 %tmp.120 = load i32* %tmp.119
6 %tmp.120 = load i32, i32* %tmp.119
77 %tmp.1541 = getelementptr [3 x i32], [3 x i32]* %a.1, i64 0, i64 4
8 %tmp.155 = load i32* %tmp.1541
8 %tmp.155 = load i32, i32* %tmp.1541
99 ret i32 0
1010 }
66
77 define i32 @test(i32* %P) {
88 %X = alloca i32
9 %V1 = load i32* %P
9 %V1 = load i32, i32* %P
1010 store i32 0, i32* %X
11 %V2 = load i32* %P
11 %V2 = load i32, i32* %P
1212 %Diff = sub i32 %V1, %V2
1313 ret i32 %Diff
1414 }
1414 %tmp.6 = getelementptr [3 x [3 x i32]], [3 x [3 x i32]]* %X, i32 0, i32 0, i32 %i.0.0 ; [#uses=1]
1515 store i32 1, i32* %tmp.6
1616 %tmp.8 = getelementptr [3 x [3 x i32]], [3 x [3 x i32]]* %X, i32 0, i32 0, i32 0 ; [#uses=1]
17 %tmp.9 = load i32* %tmp.8 ; [#uses=1]
17 %tmp.9 = load i32, i32* %tmp.8 ; [#uses=1]
1818 %tmp.11 = getelementptr [3 x [3 x i32]], [3 x [3 x i32]]* %X, i32 0, i32 1, i32 0 ; [#uses=1]
19 %tmp.12 = load i32* %tmp.11 ; [#uses=1]
19 %tmp.12 = load i32, i32* %tmp.11 ; [#uses=1]
2020 %tmp.13 = add i32 %tmp.12, %tmp.9 ; [#uses=1]
2121 %inc = add i32 %i.0.0, 1 ; [#uses=2]
2222 %tmp.2 = icmp slt i32 %inc, %N ; [#uses=1]
2222 define i32 @test(%struct.closure_type* %tmp18169) {
2323 %tmp18174 = getelementptr %struct.closure_type, %struct.closure_type* %tmp18169, i32 0, i32 4, i32 0, i32 0 ; [#uses=2]
2424 %tmp18269 = bitcast i32* %tmp18174 to %struct.STYLE* ; <%struct.STYLE*> [#uses=1]
25 %A = load i32* %tmp18174 ; [#uses=1]
25 %A = load i32, i32* %tmp18174 ; [#uses=1]
2626
2727 %tmp18272 = getelementptr %struct.STYLE, %struct.STYLE* %tmp18269, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
2828 store i16 123, i16* %tmp18272
2929
30 %Q = load i32* %tmp18174 ; [#uses=1]
30 %Q = load i32, i32* %tmp18174 ; [#uses=1]
3131 %Z = sub i32 %A, %Q ; [#uses=1]
3232 ret i32 %Z
3333 }
44
55 define i32 @test(i32* %P, i16* %Q) {
66 ; CHECK: ret i32 0
7 %A = load i16* %Q ; [#uses=1]
8 %x = load i32* %P ; > [#uses=1]
7 %A = load i16, i16* %Q ; > [#uses=1]
8 %x = load i32, i32* %P ; [#uses=1]
99 %B = call i16 @llvm.cttz.i16( i16 %A, i1 true ) ; [#uses=1]
10 %y = load i32* %P ; [#uses=1]
10 %y = load i32, i32* %P ; [#uses=1]
1111 store i16 %B, i16* %Q
1212 %z = sub i32 %x, %y ; [#uses=1]
1313 ret i32 %z
1010 store i32 1, i32* getelementptr (%struct.B* @a, i32 0, i32 0, i32 0), align 8
1111 %tmp4 = getelementptr %struct.A, %struct.A* %b, i32 0, i32 0 ; [#uses=1]
1212 store i32 0, i32* %tmp4, align 4
13 %tmp7 = load i32* getelementptr (%struct.B* @a, i32 0, i32 0, i32 0), align 8 ; [#uses=1]
13 %tmp7 = load i32, i32* getelementptr (%struct.B* @a, i32 0, i32 0, i32 0), align 8 ; [#uses=1]
1414 ret i32 %tmp7
1515 }
1616 %tmp17 = getelementptr %struct.usb_hcd, %struct.usb_hcd* %hcd, i32 0, i32 2, i64 1
1717 ; [#uses=1]
1818 %tmp1718 = bitcast i64* %tmp17 to i32* ; [#uses=1]
19 %tmp19 = load i32* %tmp1718, align 4 ; [#uses=0]
19 %tmp19 = load i32, i32* %tmp1718, align 4 ; [#uses=0]
2020 br i1 false, label %cond_true34, label %done_okay
2121
2222 cond_true34: ; preds = %entry
2424 2305843009213693950 ; [#uses=1]
2525 %tmp70 = bitcast i64* %tmp631 to %struct.device**
2626
27 %tmp71 = load %struct.device** %tmp70, align 8
27 %tmp71 = load %struct.device*, %struct.device** %tmp70, align 8
2828
2929 ret i32 undef
3030
1313 define i32 @ehci_pci_setup(%struct.usb_hcd* %hcd) {
1414 entry:
1515 %tmp14 = getelementptr %struct.usb_hcd, %struct.usb_hcd* %hcd, i32 0, i32 0, i32 0 ; <%struct.device**> [#uses=1]
16 %tmp15 = load %struct.device** %tmp14, align 8 ; <%struct.device*> [#uses=0]
16 %tmp15 = load %struct.device*, %struct.device** %tmp14, align 8 ; <%struct.device*> [#uses=0]
1717 br i1 false, label %bb25, label %return
1818
1919 bb25: ; preds = %entry
2222 cond_true: ; preds = %bb25
2323 %tmp601 = getelementptr %struct.usb_hcd, %struct.usb_hcd* %hcd, i32 0, i32 1, i64 2305843009213693951 ; [#uses=1]
2424 %tmp67 = bitcast i64* %tmp601 to %struct.device** ; <%struct.device**> [#uses=1]
25 %tmp68 = load %struct.device** %tmp67, align 8 ; <%struct.device*> [#uses=0]
25 %tmp68 = load %struct.device*, %struct.device** %tmp67, align 8 ; <%struct.device*> [#uses=0]
2626 ret i32 undef
2727
2828 return: ; preds = %bb25, %entry
99 define void @test291() nounwind {
1010 entry:
1111 store i32 1138410269, i32* getelementptr ([5 x %struct.S291]* @a291, i32 0, i32 2, i32 1)
12 %tmp54 = load i32* bitcast (%struct.S291* getelementptr ([5 x %struct.S291]* @a291, i32 0, i32 2) to i32*), align 4 ; [#uses=0]
12 %tmp54 = load i32, i32* bitcast (%struct.S291* getelementptr ([5 x %struct.S291]* @a291, i32 0, i32 2) to i32*), align 4 ; [#uses=0]
1313 unreachable
1414 }
88 %B = call i32* @_Znwj(i32 4)
99 store i32 1, i32* %A
1010 store i32 2, i32* %B
11 %C = load i32* %A
11 %C = load i32, i32* %A
1212 ret i32 %C
1313 }
22 declare noalias i32* @noalias()
33
44 define i32 @test(i32 %x) {
5 ; CHECK: load i32* %a
5 ; CHECK: load i32, i32* %a
66 %a = call i32* @noalias()
77 store i32 1, i32* %a
88 %b = getelementptr i32, i32* %a, i32 %x
99 store i32 2, i32* %b
1010
11 %c = load i32* %a
11 %c = load i32, i32* %a
1212 ret i32 %c
1313 }
44 %P = getelementptr i8, i8* %ptr, i32 0
55 %Q = getelementptr i8, i8* %ptr, i32 1
66 ; CHECK: getelementptr
7 %X = load i8* %P
7 %X = load i8, i8* %P
88 %Y = atomicrmw add i8* %Q, i8 1 monotonic
9 %Z = load i8* %P
9 %Z = load i8, i8* %P
1010 ; CHECK-NOT: = load
1111 %A = sub i8 %X, %Z
1212 ret i8 %A
2222
2323 bb2:
2424 %P = phi i32* [ %b, %bb ], [ @Y, %bb1 ]
25 %tmp1 = load i32* @Z, align 4
25 %tmp1 = load i32, i32* @Z, align 4
2626 store i32 123, i32* %P, align 4
27 %tmp2 = load i32* @Z, align 4
27 %tmp2 = load i32, i32* @Z, align 4
2828 br label %return
2929
3030 return:
88 %tmp31 = mul i32 %indvar, -2
99 %tmp32 = add i32 %tmp31, 30
1010 %t.5 = getelementptr i32, i32* %tab, i32 %tmp32
11 %loada = load i32* %tab
11 %loada = load i32, i32* %tab
1212 store i32 0, i32* %t.5
13 %loadb = load i32* %tab
13 %loadb = load i32, i32* %tab
1414 %rval = add i32 %loada, %loadb
1515 ret i32 %rval
1616 }
2929 store i8 0, i8* %10
3030 %11 = getelementptr inbounds i8, i8* %10, i32 -1
3131 store i8 0, i8* %11
32 %12 = load i32* %1, align 4
32 %12 = load i32, i32* %1, align 4
3333 ret i32 %12
3434 ; CHECK: ret i32 %12
3535 }
88
99 define i32 @main() nounwind uwtable ssp {
1010 entry:
11 %tmp = load i8* getelementptr inbounds ({ i8, i8, i8, i8, i8 }* @a, i64 0, i32 4), align 4
11 %tmp = load i8, i8* getelementptr inbounds ({ i8, i8, i8, i8, i8 }* @a, i64 0, i32 4), align 4
1212 %tmp1 = or i8 %tmp, -128
1313 store i8 %tmp1, i8* getelementptr inbounds ({ i8, i8, i8, i8, i8 }* @a, i64 0, i32 4), align 4
14 %tmp2 = load i64* bitcast ({ i8, i8, i8, i8, i8 }* @a to i64*), align 8
14 %tmp2 = load i64, i64* bitcast ({ i8, i8, i8, i8, i8 }* @a to i64*), align 8
1515 store i8 11, i8* getelementptr inbounds ({ i8, i8, i8, i8, i8 }* @a, i64 0, i32 4), align 4
1616 %tmp3 = trunc i64 %tmp2 to i32
1717 ret i32 %tmp3
2121 %noalias_ret_a0 = call double* @noalias_returner()
2222 %noalias_ret_a1 = call double* @noalias_returner()
2323
24 %loaded_a0 = load double** %indirect_a0
25 %loaded_a1 = load double** %indirect_a1
24 %loaded_a0 = load double*, double** %indirect_a0
25 %loaded_a1 = load double*, double** %indirect_a1
2626
2727 call void @callee(double* %escape_alloca_a0)
2828 call void @callee(double* %escape_alloca_a1)
99 %tmp2 = getelementptr %struct.x, %struct.x* %a, i32 0, i32 0 ; [#uses=2]
1010 store i32 1, i32* %tmp2, align 4
1111 store i32 2, i32* @g, align 4
12 %tmp4 = load i32* %tmp2, align 4 ; [#uses=1]
12 %tmp4 = load i32, i32* %tmp2, align 4 ; [#uses=1]
1313 ret i32 %tmp4
1414 }
1515
55 ; CHECK: ret i32 0
66
77 define i32 @main() {
8 %a = load i32* @flag0
8 %a = load i32, i32* @flag0
99 %b = atomicrmw xchg i32* @turn, i32 1 monotonic
10 %c = load i32* @flag0
10 %c = load i32, i32* @flag0
1111 %d = sub i32 %a, %c
1212 ret i32 %d
1313 }
3535 %bigbase = bitcast i8* %base to i16*
3636 store i16 -1, i16* %bigbase
3737
38 %loaded = load i8* %phi
38 %loaded = load i8, i8* %phi
3939 ret i8 %loaded
4040 }
1818 call void @external(i32* %Array2)
1919
2020 %pointer = getelementptr i32, i32* %Array1, i64 %A
21 %val = load i32* %pointer
21 %val = load i32, i32* %pointer
2222
2323 %pointer2 = getelementptr i32, i32* %Array2, i64 %B
2424 store i32 7, i32* %pointer2
2525
26 %REMOVE = load i32* %pointer ; redundant with above load
26 %REMOVE = load i32, i32* %pointer ; redundant with above load
2727 %retval = sub i32 %REMOVE, %val
2828 ret i32 %retval
2929 ; CHECK: @different_array_test
4040 %P1 = getelementptr i32, i32* %Array, i64 7
4141 %P2 = getelementptr i32, i32* %Array, i64 6
4242
43 %A = load i32* %P1
43 %A = load i32, i32* %P1
4444 store i32 1, i32* %P2 ; Should not invalidate load
45 %BREMOVE = load i32* %P1
45 %BREMOVE = load i32, i32* %P1
4646 %Val = sub i32 %A, %BREMOVE
4747 ret i32 %Val
4848 ; CHECK: @constant_array_index_test
5252 ; Test that if two pointers are spaced out by a constant getelementptr, that
5353 ; they cannot alias.
5454 define i32 @gep_distance_test(i32* %A) {
55 %REMOVEu = load i32* %A
55 %REMOVEu = load i32, i32* %A
5656 %B = getelementptr i32, i32* %A, i64 2 ; Cannot alias A
5757 store i32 7, i32* %B
58 %REMOVEv = load i32* %A
58 %REMOVEv = load i32, i32* %A
5959 %r = sub i32 %REMOVEu, %REMOVEv
6060 ret i32 %r
6161 ; CHECK: @gep_distance_test
6666 ; cannot alias, even if there is a variable offset between them...
6767 define i32 @gep_distance_test2({i32,i32}* %A, i64 %distance) {
6868 %A1 = getelementptr {i32,i32}, {i32,i32}* %A, i64 0, i32 0
69 %REMOVEu = load i32* %A1
69 %REMOVEu = load i32, i32* %A1
7070 %B = getelementptr {i32,i32}, {i32,i32}* %A, i64 %distance, i32 1
7171 store i32 7, i32* %B ; B cannot alias A, it's at least 4 bytes away
72 %REMOVEv = load i32* %A1
72 %REMOVEv = load i32, i32* %A1
7373 %r = sub i32 %REMOVEu, %REMOVEv
7474 ret i32 %r
7575 ; CHECK: @gep_distance_test2
7979 ; Test that we can do funny pointer things and that distance calc will still
8080 ; work.
8181 define i32 @gep_distance_test3(i32 * %A) {
82 %X = load i32* %A
82 %X = load i32, i32* %A
8383 %B = bitcast i32* %A to i8*
8484 %C = getelementptr i8, i8* %B, i64 4
8585 store i8 42, i8* %C
86 %Y = load i32* %A
86 %Y = load i32, i32* %A
8787 %R = sub i32 %X, %Y
8888 ret i32 %R
8989 ; CHECK: @gep_distance_test3
9595 %X = alloca i32
9696 call void @external(i32* %X)
9797
98 %Y = load i32* %X
98 %Y = load i32, i32* %X
9999 store i32 5, i32* getelementptr ({ i32 }* @Global, i64 0, i32 0)
100 %REMOVE = load i32* %X
100 %REMOVE = load i32, i32* %X
101101 %retval = sub i32 %Y, %REMOVE
102102 ret i32 %retval
103103 ; CHECK: @constexpr_test
112112 entry:
113113 %sum5.cast = zext i5 %j to i64 ; [#uses=1]
114114 %P1 = getelementptr i16, i16* %row2col, i64 %sum5.cast
115 %row2col.load.1.2 = load i16* %P1, align 1 ; [#uses=1]
115 %row2col.load.1.2 = load i16, i16* %P1, align 1 ; [#uses=1]
116116
117117 %sum13.cast31 = sext i5 %j to i6 ; [#uses=1]
118118 %sum13.cast = zext i6 %sum13.cast31 to i64 ; [#uses=1]
119119 %P2 = getelementptr i16, i16* %row2col, i64 %sum13.cast
120 %row2col.load.1.6 = load i16* %P2, align 1 ; [#uses=1]
120 %row2col.load.1.6 = load i16, i16* %P2, align 1 ; [#uses=1]
121121
122122 %.ret = sub i16 %row2col.load.1.6, %row2col.load.1.2 ; [#uses=1]
123123 ret i16 %.ret
1919 %u = alloca %union.anon, align 8
2020 %tmp9 = getelementptr inbounds %union.anon, %union.anon* %u, i64 0, i32 0
2121 store double %x, double* %tmp9, align 8, !tbaa !0
22 %tmp2 = load i32* bitcast (i64* @endianness_test to i32*), align 8, !tbaa !3
22 %tmp2 = load i32, i32* bitcast (i64* @endianness_test to i32*), align 8, !tbaa !3
2323 %idxprom = sext i32 %tmp2 to i64
2424 %tmp4 = bitcast %union.anon* %u to [2 x i32]*
2525 %arrayidx = getelementptr inbounds [2 x i32], [2 x i32]* %tmp4, i64 0, i64 %idxprom
26 %tmp5 = load i32* %arrayidx, align 4, !tbaa !3
26 %tmp5 = load i32, i32* %arrayidx, align 4, !tbaa !3
2727 %tmp5.lobit = lshr i32 %tmp5, 31
2828 ret i32 %tmp5.lobit
2929 }
1111 ; CHECK-NEXT: ret i32 0
1212
1313 define i32 @test() {
14 %A1 = load i32* @A
14 %A1 = load i32, i32* @A
1515
1616 store i32 123, i32* @B ; Store cannot alias @A
1717
18 %A2 = load i32* @A
18 %A2 = load i32, i32* @A
1919 %X = sub i32 %A1, %A2
2020 ret i32 %X
2121 }
2929 ; CHECK-NEXT: ret i32 0
3030
3131 define i32 @test2() {
32 %A1 = load i32* @A
32 %A1 = load i32, i32* @A
3333 br label %Loop
3434 Loop:
3535 %AP = phi i32 [0, %0], [%X, %Loop]
3636 store i32 %AP, i32* @B ; Store cannot alias @A
3737
38 %A2 = load i32* @A
38 %A2 = load i32, i32* @A
3939 %X = sub i32 %A1, %A2
4040 %c = icmp eq i32 %X, 0
4141 br i1 %c, label %out, label %Loop
5454 %X = alloca i32
5555 store i32 7, i32* %X
5656 call void @external()
57 %V = load i32* %X
57 %V = load i32, i32* %X
5858 ret i32 %V
5959 }
6060
66 entry:
77 %Q = bitcast i8* %P to {i32, i32}*
88 %R = getelementptr {i32, i32}, {i32, i32}* %Q, i32 0, i32 1
9 %S = load i32* %R
9 %S = load i32, i32* %R
1010
1111 %q = bitcast i8* %P to {i32, i32}*
1212 %r = getelementptr {i32, i32}, {i32, i32}* %q, i32 0, i32 1
13 %s = load i32* %r
13 %s = load i32, i32* %r
1414
1515 %t = sub i32 %S, %s
1616 ret i32 %t
2222 entry:
2323 %Q = bitcast i8* %P to {i32, i32, i32}*
2424 %R = getelementptr {i32, i32, i32}, {i32, i32, i32}* %Q, i32 0, i32 1
25 %S = load i32* %R
25 %S = load i32, i32* %R
2626
2727 %r = getelementptr {i32, i32, i32}, {i32, i32, i32}* %Q, i32 0, i32 2
2828 store i32 42, i32* %r
2929
30 %s = load i32* %R
30 %s = load i32, i32* %R
3131
3232 %t = sub i32 %S, %s
3333 ret i32 %t
4141 entry:
4242 %P2 = getelementptr {float, {i32, i32, i32}}, {float, {i32, i32, i32}}* %P, i32 0, i32 1
4343 %R = getelementptr {i32, i32, i32}, {i32, i32, i32}* %P2, i32 0, i32 1
44 %S = load i32* %R
44 %S = load i32, i32* %R
4545
4646 %r = getelementptr {i32, i32, i32}, {i32, i32, i32}* %P2, i32 0, i32 2
4747 store i32 42, i32* %r
4848
49 %s = load i32* %R
49 %s = load i32, i32* %R
5050
5151 %t = sub i32 %S, %s
5252 ret i32 %t
6565 store i32 64, i32* %tmp2, align 8
6666 %tmp3 = getelementptr inbounds %SmallPtrSet64, %SmallPtrSet64* %P, i64 0, i32 0, i32 4, i64 64
6767 store i8* null, i8** %tmp3, align 8
68 %tmp4 = load i32* %tmp2, align 8
68 %tmp4 = load i32, i32* %tmp2, align 8
6969 ret i32 %tmp4
7070 ; CHECK-LABEL: @test4(
7171 ; CHECK: ret i32 64
7676 %pi = getelementptr i32, i32* %p, i64 %i
7777 %i.next = add i64 %i, 1
7878 %pi.next = getelementptr i32, i32* %p, i64 %i.next
79 %x = load i32* %pi
80 store i32 42, i32* %pi.next
81 %y = load i32* %pi
79 %x = load i32, i32* %pi
80 store i32 42, i32* %pi.next
81 %y = load i32, i32* %pi
8282 %z = sub i32 %x, %y
8383 ret i32 %z
8484 ; CHECK-LABEL: @test5(
8989 %pi = getelementptr i32, i32 addrspace(1)* %p, i8 %i
9090 %i.next = add i8 %i, 1
9191 %pi.next = getelementptr i32, i32 addrspace(1)* %p, i8 %i.next
92 %x = load i32 addrspace(1)* %pi
92 %x = load i32, i32 addrspace(1)* %pi
9393 store i32 42, i32 addrspace(1)* %pi.next
94 %y = load i32 addrspace(1)* %pi
94 %y = load i32, i32 addrspace(1)* %pi
9595 %z = sub i32 %x, %y
9696 ret i32 %z
9797 ; CHECK-LABEL: @test5_as1_smaller_size(
103103 %pi = getelementptr i32, i32 addrspace(1)* %p, i16 %i
104104 %i.next = add i16 %i, 1
105105 %pi.next = getelementptr i32, i32 addrspace(1)* %p, i16 %i.next
106 %x = load i32 addrspace(1)* %pi
106 %x = load i32, i32 addrspace(1)* %pi
107107 store i32 42, i32 addrspace(1)* %pi.next
108 %y = load i32 addrspace(1)* %pi
108 %y = load i32, i32 addrspace(1)* %pi
109109 %z = sub i32 %x, %y
110110 ret i32 %z
111111 ; CHECK-LABEL: @test5_as1_same_size(
118118 %pi = getelementptr i32, i32* %p, i64 %i
119119 %i.next = or i64 %i, 1
120120 %pi.next = getelementptr i32, i32* %p, i64 %i.next
121 %x = load i32* %pi
122 store i32 42, i32* %pi.next
123 %y = load i32* %pi
121 %x = load i32, i32* %pi
122 store i32 42, i32* %pi.next
123 %y = load i32, i32* %pi
124124 %z = sub i32 %x, %y
125125 ret i32 %z
126126 ; CHECK-LABEL: @test6(
132132 %pi = getelementptr i32, i32* %p, i64 1
133133 %i.next = shl i64 %i, 2
134134 %pi.next = getelementptr i32, i32* %p, i64 %i.next
135 %x = load i32* %pi
136 store i32 42, i32* %pi.next
137 %y = load i32* %pi
135 %x = load i32, i32* %pi
136 store i32 42, i32* %pi.next
137 %y = load i32, i32* %pi
138138 %z = sub i32 %x, %y
139139 ret i32 %z
140140 ; CHECK-LABEL: @test7(
149149 %i.next = add i16 %i, 1
150150 %i.next2 = zext i16 %i.next to i32
151151 %pi.next = getelementptr i32, i32* %p, i32 %i.next2
152 %x = load i32* %pi
153 store i32 42, i32* %pi.next
154 %y = load i32* %pi
152 %x = load i32, i32* %pi
153 store i32 42, i32* %pi.next
154 %y = load i32, i32* %pi
155155 %z = sub i32 %x, %y
156156 ret i32 %z
157157 ; CHECK-LABEL: @test8(
169169 ; P4 = P + 4*j
170170 %P4 = getelementptr [4 x i8], [4 x i8]* %P, i32 0, i32 %j2
171171
172 %x = load i8* %P2
172 %x = load i8, i8* %P2
173173 store i8 42, i8* %P4
174 %y = load i8* %P2
174 %y = load i8, i8* %P2
175175 %z = sub i8 %x, %y
176176 ret i8 %z
177177 ; CHECK-LABEL: @test9(
187187 ; P4 = P + 4*i
188188 %P4 = getelementptr [4 x i8], [4 x i8]* %P, i32 0, i32 %i2
189189
190 %x = load i8* %P2
190 %x = load i8, i8* %P2
191191 store i8 42, i8* %P4
192 %y = load i8* %P2
192 %y = load i8, i8* %P2
193193 %z = sub i8 %x, %y
194194 ret i8 %z
195195 ; CHECK-LABEL: @test10(
206206 %y29 = getelementptr inbounds [2 x float], [2 x float]* %arrayidx28, i32 0, i32 1
207207 store float 1.0, float* %y29, align 4
208208 store i64 0, i64* %scevgep35, align 4
209 %tmp30 = load float* %y29, align 4
209 %tmp30 = load float, float* %y29, align 4
210210 ret float %tmp30
211211 ; CHECK-LABEL: @test11(
212212 ; CHECK: ret float %tmp30
222222 %castp = bitcast i8* %p to i32*
223223 store i32 1, i32* %castp
224224 store i32 0, i32* %castd
225 %r = load i32* %castp
225 %r = load i32, i32* %castp
226226 ret i32 %r
227227 ; CHECK-LABEL: @test12(
228228 ; CHECK: ret i32 %r
77
88 ; CHECK-LABEL: @test1(
99 define i16 @test1(i32* %P) {
10 %X = load i16* @B
10 %X = load i16, i16* @B
1111 store i32 7, i32* %P
12 %Y = load i16* @B
12 %Y = load i16, i16* @B
1313 %Z = sub i16 %Y, %X
1414 ret i16 %Z
1515 ; CHECK: ret i16 0
2020 define i16 @test1_as1(i32 addrspace(1)* %P) {
2121 ; CHECK-LABEL: @test1_as1(
2222 ; CHECK: ret i16 0
23 %X = load i16 addrspace(1)* @B_as1
23 %X = load i16, i16 addrspace(1)* @B_as1
2424 store i32 7, i32 addrspace(1)* %P
25 %Y = load i16 addrspace(1)* @B_as1
25 %Y = load i16, i16 addrspace(1)* @B_as1
2626 %Z = sub i16 %Y, %X
2727 ret i16 %Z
2828 }
3838 %tmp93 = add i32 %w.2, %indvar89
3939 %arrayidx416 = getelementptr [0 x i8], [0 x i8]* @window, i32 0, i32 %tmp93
4040
41 %A = load i8* %arrayidx412, align 1
41 %A = load i8, i8* %arrayidx412, align 1
4242 store i8 4, i8* %arrayidx416, align 1
4343
44 %B = load i8* %arrayidx412, align 1
44 %B = load i8, i8* %arrayidx412, align 1
4545 %C = sub i8 %A, %B
4646 ret i8 %C
4747
99
1010 define i32 @foo(i32* nocapture %p, i8* nocapture %q) {
1111 entry:
12 %0 = load i32* %p, align 4, !invariant.load !3
12 %0 = load i32, i32* %p, align 4, !invariant.load !3
1313 %conv = trunc i32 %0 to i8
1414 store i8 %conv, i8* %q, align 1
15 %1 = load i32* %p, align 4, !invariant.load !3
15 %1 = load i32, i32* %p, align 4, !invariant.load !3
1616 %add = add nsw i32 %1, 1
1717 ret i32 %add
1818
1919 ; CHECK: foo
20 ; CHECK: %0 = load i32* %p
20 ; CHECK: %0 = load i32, i32* %p
2121 ; CHECK: store i8 %conv, i8* %q,
2222 ; CHECK: %add = add nsw i32 %0, 1
2323 }
1212 store i32 1, i32* @z
1313 tail call void @memset_pattern16(i8* bitcast (i32* @y to i8*), i8* bitcast (i32* @x to i8*), i64 4) nounwind
1414 ; CHECK-NOT: load
15 %l = load i32* @z
15 %l = load i32, i32* @z
1616 ; CHECK: ret i32 1
1717 ret i32 %l
1818 }
1212
1313 call void @llvm.memset.p0i8.i32(i8* %P, i8 0, i32 42, i32 1, i1 false)
1414
15 %B = load i32* %A
15 %B = load i32, i32* %A
1616 ret i32 %B
1717
1818 ; CHECK-LABEL: @test0
2828
2929 call void @llvm.memcpy.p0i8.p0i8.i8(i8* %A, i8* %B, i8 -1, i32 0, i1 false)
3030
31 %C = load i8* %B
31 %C = load i8, i8* %B
3232 ret i8 %C
3333 ; CHECK: ret i8 2
3434 }
3838 %P2 = getelementptr i8, i8* %P, i32 127
3939 store i8 1, i8* %P2 ;; Not dead across memset
4040 call void @llvm.memset.p0i8.i8(i8* %P, i8 2, i8 127, i32 0, i1 false)
41 %A = load i8* %P2
41 %A = load i8, i8* %P2
4242 ret i8 %A
4343 ; CHECK: ret i8 1
4444 }
5151 store i8 1, i8* %P2 ;; Dead, clobbered by memset.
5252
5353 call void @llvm.memset.p0i8.i8(i8* %P, i8 2, i8 127, i32 0, i1 false)
54 %A = load i8* %P2
54 %A = load i8, i8* %P2
5555 ret i8 %A
5656 ; CHECK-NOT: load
5757 ; CHECK: ret i8 2
8989 @G2 = external global [4000 x i32]
9090
9191 define i32 @test4(i8* %P) {
92 %tmp = load i32* @G1
92 %tmp = load i32, i32* @G1
9393 call void @llvm.memset.p0i8.i32(i8* bitcast ([4000 x i32]* @G2 to i8*), i8 0, i32 4000, i32 1, i1 false)
94 %tmp2 = load i32* @G1
94 %tmp2 = load i32, i32* @G1
9595 %sub = sub i32 %tmp2, %tmp
9696 ret i32 %sub
9797 ; CHECK-LABEL: @test4
104104 ; Verify that basicaa is handling variable length memcpy, knowing it doesn't
105105 ; write to G1.
106106 define i32 @test5(i8* %P, i32 %Len) {
107 %tmp = load i32* @G1
107 %tmp = load i32, i32* @G1
108108 call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([4000 x i32]* @G2 to i8*), i8* bitcast (i32* @G1 to i8*), i32 %Len, i32 1, i1 false)
109 %tmp2 = load i32* @G1
109 %tmp2 = load i32, i32* @G1
110110 %sub = sub i32 %tmp2, %tmp
111111 ret i32 %sub
112112 ; CHECK: @test5
117117 }
118118
119119 define i8 @test6(i8* %p, i8* noalias %a) {
120 %x = load i8* %a
120 %x = load i8, i8* %a
121121 %t = va_arg i8* %p, float
122 %y = load i8* %a
122 %y = load i8, i8* %a
123123 %z = add i8 %x, %y
124124 ret i8 %z
125125 ; CHECK-LABEL: @test6
126 ; CHECK: load i8* %a
126 ; CHECK: load i8, i8* %a
127127 ; CHECK-NOT: load
128128 ; CHECK: ret
129129 }
136136 store i32 0, i32* %x, align 4
137137 %add.ptr = getelementptr inbounds i32, i32* %x, i64 1
138138 call void @test7decl(i32* %add.ptr)
139 %tmp = load i32* %x, align 4
139 %tmp = load i32, i32* %x, align 4
140140 ret i32 %tmp
141141 ; CHECK-LABEL: @test7(
142142 ; CHECK: store i32 0
143143 ; CHECK: call void @test7decl
144 ; CHECK: load i32*
144 ; CHECK: load i32, i32*
145145 }
146146
147147 declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
1919 %bigbase0 = bitcast i8* %base to i16*
2020 store i16 -1, i16* %bigbase0
2121
22 %loaded = load i8* %phi
22 %loaded = load i8, i8* %phi
2323 ret i8 %loaded
2424 }
2525
3333 %bigbase1 = bitcast i8* %base to i16*
3434 store i16 -1, i16* %bigbase1
3535
36 %loaded = load i8* %sel
36 %loaded = load i8, i8* %sel
3737 ret i8 %loaded
3838 }
1111 store i8* %tmp2, i8** %tmp4, align 4
1212 %tmp10 = getelementptr i8, i8* %tmp2, i32 10 ; [#uses=1]
1313 store i8 42, i8* %tmp10, align 1
14 %tmp14 = load i8** %tmp4, align 4 ; [#uses=1]
14 %tmp14 = load i8*, i8** %tmp4, align 4 ; [#uses=1]
1515 %tmp16 = getelementptr i8, i8* %tmp14, i32 10 ; [#uses=1]
16 %tmp17 = load i8* %tmp16, align 1 ; [#uses=1]
16 %tmp17 = load i8, i8* %tmp16, align 1 ; [#uses=1]
1717 %tmp19 = icmp eq i8 %tmp17, 42 ; [#uses=1]
1818 ret i1 %tmp19
1919 }
2626 ; CHECK; store i64 1
2727
2828 store i64 2, i64* %ptr.64, align 8
29 %r = load i64* %either_ptr.64, align 8
29 %r = load i64, i64* %either_ptr.64, align 8
3030 store i64 1, i64* %ptr.64, align 8
3131 ret i64 %r
3232 }
55 entry:
66 store i32 1, i32* %a
77 %cap = call i32* @captures(i32* %a) nounwind readonly
8 %l = load i32* %b
8 %l = load i32, i32* %b
99 ret void
1010 }
1111
1515 entry:
1616 store i32 1, i32* %c
1717 %cap = call i32* @captures(i32* %c) nounwind readonly
18 %l = load i32* %d
18 %l = load i32, i32* %d
1919 ret void
2020 }
2121
55 ; CHECK: ret i32 0
66 %P = alloca i32
77 %Q = call i32* @test(i32* %P)
8 %a = load i32* %P
8 %a = load i32, i32* %P
99 store i32 4, i32* %Q ;; cannot clobber P since it is nocapture.
10 %b = load i32* %P
10 %b = load i32, i32* %P
1111 %c = sub i32 %a, %b
1212 ret i32 %c
1313 }
1818 ; CHECK: call void @test3
1919 ; CHECK: store i32 0, i32* %p
2020 ; CHECK: store i32 1, i32* %x
21 ; CHECK: %y = load i32* %p
21 ; CHECK: %y = load i32, i32* %p
2222 ; CHECK: ret i32 %y
2323 entry:
2424 %q = alloca i32*
2626 ; attribute since the copy doesn't outlive the function.
2727 call void @test3(i32** %q, i32* %p) nounwind
2828 store i32 0, i32* %p
29 %x = load i32** %q
29 %x = load i32*, i32** %q
3030 ; This store might write to %p and so we can't eliminate the subsequent
3131 ; load
3232 store i32 1, i32* %x
33 %y = load i32* %p
33 %y = load i32, i32* %p
3434 ret i32 %y
3535 }
2424
2525 bb2:
2626 %P = phi i32* [ @X, %bb ], [ @Y, %bb1 ]
27 %tmp1 = load i32* @Z, align 4
27 %tmp1 = load i32, i32* @Z, align 4
2828 store i32 123, i32* %P, align 4
29 %tmp2 = load i32* @Z, align 4
29 %tmp2 = load i32, i32* @Z, align 4
3030 br label %return
3131
3232 return:
5151 br i1 %targetBlock, label %for.body, label %bye
5252
5353 for.body:
54 %1 = load i32* %jj7, align 4
54 %1 = load i32, i32* %jj7, align 4
5555 %idxprom4 = zext i32 %1 to i64
5656 %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %oa5, i64 0, i64 %idxprom4
57 %2 = load i32* %arrayidx5, align 4
57 %2 = load i32, i32* %arrayidx5, align 4
5858 %sub6 = sub i32 %2, 6
5959 store i32 %sub6, i32* %arrayidx5, align 4
6060 ; %0 and %arrayidx5 can alias! It is not safe to DSE the above store.
61 %3 = load i32* %0, align 4
61 %3 = load i32, i32* %0, align 4
6262 store i32 %3, i32* %arrayidx5, align 4
6363 %sub11 = add i32 %1, -1
6464 %idxprom12 = zext i32 %sub11 to i64
6767 br label %codeRepl
6868
6969 bye:
70 %.reload = load i32* %jj7, align 4
70 %.reload = load i32, i32* %jj7, align 4
7171 ret i32 %.reload
7272 }
7373
2323 %lsr.iv46 = bitcast [16000 x double]* %lsr.iv4 to <4 x double>*
2424 %lsr.iv12 = bitcast [16000 x double]* %lsr.iv1 to <4 x double>*
2525 %scevgep11 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 -2
26 %i6 = load <4 x double>* %scevgep11, align 32
26 %i6 = load <4 x double>, <4 x double>* %scevgep11, align 32
2727 %add = fadd <4 x double> %i6,
2828 store <4 x double> %add, <4 x double>* %lsr.iv12, align 32
2929 %scevgep10 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 -1
30 %i7 = load <4 x double>* %scevgep10, align 32
30 %i7 = load <4 x double>, <4 x double>* %scevgep10, align 32
3131 %add.4 = fadd <4 x double> %i7,
3232 %scevgep9 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 1
3333 store <4 x double> %add.4, <4 x double>* %scevgep9, align 32
34 %i8 = load <4 x double>* %lsr.iv46, align 32
34 %i8 = load <4 x double>, <4 x double>* %lsr.iv46, align 32
3535 %add.8 = fadd <4 x double> %i8,
3636 %scevgep8 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 2
3737 store <4 x double> %add.8, <4 x double>* %scevgep8, align 32
3838 %scevgep7 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 1
39 %i9 = load <4 x double>* %scevgep7, align 32
39 %i9 = load <4 x double>, <4 x double>* %scevgep7, align 32
4040 %add.12 = fadd <4 x double> %i9,
4141 %scevgep3 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 3
4242 store <4 x double> %add.12, <4 x double>* %scevgep3, align 32
1616 %ptr2_phi = phi i32* [ %ptr2, %entry ], [ %ptr2_inc, %while.body ]
1717 %result.09 = phi i32 [ 0 , %entry ], [ %add, %while.body ]
1818 %dec = add nsw i32 %num, -1
19 %0 = load i32* %ptr_phi, align 4
19 %0 = load i32, i32* %ptr_phi, align 4
2020 store i32 %0, i32* %ptr2_phi, align 4
21 %1 = load i32* %coeff, align 4
22 %2 = load i32* %ptr_phi, align 4
21 %1 = load i32, i32* %coeff, align 4
22 %2 = load i32, i32* %ptr_phi, align 4
2323 %mul = mul nsw i32 %1, %2
2424 %add = add nsw i32 %mul, %result.09
2525 %tobool = icmp eq i32 %dec, 0
5151 %ptr2_phi = phi i32* [ %ptr_outer_phi2, %outer.while.header ], [ %ptr2_inc, %while.body ]
5252 %result.09 = phi i32 [ 0 , %outer.while.header ], [ %add, %while.body ]
5353 %dec = add nsw i32 %num, -1
54 %0 = load i32* %ptr_phi, align 4
54 %0 = load i32, i32* %ptr_phi, align 4
5555 store i32 %0, i32* %ptr2_phi, align 4
56 %1 = load i32* %coeff, align 4
57 %2 = load i32* %ptr_phi, align 4
56 %1 = load i32, i32* %coeff, align 4
57 %2 = load i32, i32* %ptr_phi, align 4
5858 %mul = mul nsw i32 %1, %2
5959 %add = add nsw i32 %mul, %result.09
6060 %tobool = icmp eq i32 %dec, 0
99 ; Function Attrs: nounwind
1010 define <8 x float> @foo1(i8* noalias readonly %arr.ptr, <8 x i32>* noalias readonly %vix.ptr, i8* noalias %t2.ptr) #1 {
1111 allocas:
12 %vix = load <8 x i32>* %vix.ptr, align 4
12 %vix = load <8 x i32>, <8 x i32>* %vix.ptr, align 4
1313 %t1.ptr = getelementptr i8, i8* %arr.ptr, i8 4
1414
1515 %v1 = tail call <8 x float> @llvm.x86.avx2.gather.d.ps.256(<8 x float> undef, i8* %arr.ptr, <8 x i32> %vix, <8 x float> , i8 1) #2
3030 ; Function Attrs: nounwind
3131 define <8 x float> @foo2(i8* noalias readonly %arr.ptr, <8 x i32>* noalias readonly %vix.ptr, i8* noalias %t2.ptr) #1 {
3232 allocas:
33 %vix = load <8 x i32>* %vix.ptr, align 4
33 %vix = load <8 x i32>, <8 x i32>* %vix.ptr, align 4
3434 %t1.ptr = getelementptr i8, i8* %arr.ptr, i8 4
3535
3636 %v1 = tail call <8 x float> @llvm.x86.avx2.gather.d.ps.256(<8 x float> undef, i8* %arr.ptr, <8 x i32> %vix, <8 x float> , i8 1) #2
99 @C = global [2 x i32] [ i32 4, i32 8 ] ; <[2 x i32]*> [#uses=2]
1010
1111 define i32 @test1(i1 %c) {
12 %Atmp = load i32* @A ; [#uses=2]
12 %Atmp = load i32, i32* @A ; [#uses=2]
1313 br label %Loop
1414
1515 Loop: ; preds = %Loop, %0
16 %ToRemove = load i32* @A ; [#uses=1]
16 %ToRemove = load i32, i32* @A ; [#uses=1]
1717 store i32 %Atmp, i32* @B
1818 br i1 %c, label %Out, label %Loop
1919
2323
2424 ; The Loop block should be empty after the load/store are promoted.
2525 ; CHECK: @test1
26 ; CHECK: load i32* @A
26 ; CHECK: load i32, i32* @A
2727 ; CHECK: Loop:
2828 ; CHECK-NEXT: br i1 %c, label %Out, label %Loop
2929 ; CHECK: Out:
3434 br label %Loop
3535
3636 Loop: ; preds = %Loop, %0
37 %AVal = load i32* @A ; [#uses=2]
37 %AVal = load i32, i32* @A ; [#uses=2]
3838 %C0 = getelementptr [2 x i32], [2 x i32]* @C, i64 0, i64 0 ; [#uses=1]
3939 store i32 %AVal, i32* %C0
40 %BVal = load i32* @B ; [#uses=2]
40 %BVal = load i32, i32* @B ; [#uses=2]
4141 %C1 = getelementptr [2 x i32], [2 x i32]* @C, i64 0, i64 1 ; [#uses=1]
4242 store i32 %BVal, i32* %C1
4343 br i1 %c, label %Out, label %Loop
33 ; CHECK: ret i32 0
44 %A = alloca i32 ; [#uses=3]
55 call void @foo( i32* %A )
6 %X = load i32* %A ; [#uses=1]
6 %X = load i32, i32* %A ; [#uses=1]
77 tail call void @bar( )
8 %Y = load i32* %A ; [#uses=1]
8 %Y = load i32, i32* %A ; [#uses=1]
99 %Z = sub i32 %X, %Y ; [#uses=1]
1010 ret i32 %Z
1111 }
1414
1515 for.body5: ; preds = %for.cond2
1616 %arrayidx = getelementptr inbounds [2 x i64], [2 x i64]* undef, i32 0, i64 0
17 %tmp7 = load i64* %arrayidx, align 8
17 %tmp7 = load i64, i64* %arrayidx, align 8
1818 %arrayidx9 = getelementptr inbounds [2 x i64], [2 x i64]* undef, i32 0, i64 undef
19 %tmp10 = load i64* %arrayidx9, align 8
19 %tmp10 = load i64, i64* %arrayidx9, align 8
2020 br label %for.cond2
2121
2222 for.end22: ; preds = %for.cond
111111
112112 define void @test_spec2006() {
113113 %h = alloca [1 x [2 x i32*]], align 16
114 %d.val = load i32* @d, align 4
114 %d.val = load i32, i32* @d, align 4
115115 %d.promoted = sext i32 %d.val to i64
116116 %1 = icmp slt i32 %d.val, 2
117117 br i1 %1, label %.lr.ph, label %3
167167
168168 define void @test_modulo_analysis_with_global() {
169169 %h = alloca [1 x [2 x i32*]], align 16
170 %b = load i32* @b, align 4
170 %b = load i32, i32* @b, align 4
171171 %b.promoted = sext i32 %b to i64
172172 br label %for.loop
173173
1212 %iv = phi i32 [ 0, %entry ], [ %next, %body ]
1313 %base = phi i32 [ 0, %entry ], [ %sum, %body ]
1414 %arrayidx = getelementptr inbounds i32, i32* %a, i32 %iv
15 %0 = load i32* %arrayidx
15 %0 = load i32, i32* %arrayidx
1616 %sum = add nsw i32 %0, %base
1717 %next = add i32 %iv, 1
1818 %exitcond = icmp eq i32 %next, %i
99 %iv = phi i32 [ 0, %entry ], [ %next, %body ]
1010 %base = phi i32 [ 0, %entry ], [ %sum, %body ]
1111 %arrayidx = getelementptr inbounds i32, i32* %a, i32 %iv
12 %0 = load i32* %arrayidx
12 %0 = load i32, i32* %arrayidx
1313 %sum = add nsw i32 %0, %base
1414 %next = add i32 %iv, 1
1515 %exitcond = icmp eq i32 %next, %i
153153
154154 entry:
155155 %gep1 = getelementptr i32, i32* %a, i32 1
156 %val1 = load i32* %gep1
156 %val1 = load i32, i32* %gep1
157157 %cond1 = icmp ugt i32 %val1, 1
158158 br i1 %cond1, label %then, label %else
159159
164164
165165 else:
166166 %gep2 = getelementptr i32, i32* %a, i32 2
167 %val2 = load i32* %gep2
167 %val2 = load i32, i32* %gep2
168168 %val3 = call i32 @regular_function(i32 %val2)
169169 br label %exit
170170
8787 do.body:
8888 %i.0 = phi i32 [ 0, %entry ], [ %inc4, %if.end ]
8989 call void @g1()
90 %0 = load i32* %c, align 4
90 %0 = load i32, i32* %c, align 4
9191 %cmp = icmp slt i32 %0, 42
9292 br i1 %cmp, label %do.body1, label %if.end
9393 ; CHECK: edge do.body -> do.body1 probability is 16 / 32 = 50%
123123 do.body:
124124 %i.0 = phi i32 [ 0, %entry ], [ %inc4, %do.end ]
125125 call void @g1()
126 %0 = load i32* %c, align 4
126 %0 = load i32, i32* %c, align 4
127127 %cmp = icmp slt i32 %0, 42
128128 br i1 %cmp, label %return, label %do.body1
129129 ; CHECK: edge do.body -> return probability is 4 / 128
168168
169169 do.body1:
170170 %j.0 = phi i32 [ 0, %do.body ], [ %inc, %if.end ]
171 %0 = load i32* %c, align 4
171 %0 = load i32, i32* %c, align 4
172172 %cmp = icmp slt i32 %0, 42
173173 br i1 %cmp, label %return, label %if.end
174174 ; CHECK: edge do.body1 -> return probability is 4 / 128
213213 do.body1:
214214 %j.0 = phi i32 [ 0, %do.body ], [ %inc, %do.cond ]
215215 call void @g2()
216 %0 = load i32* %c, align 4
216 %0 = load i32, i32* %c, align 4
217217 %cmp = icmp slt i32 %0, 42
218218 br i1 %cmp, label %return, label %do.cond
219219 ; CHECK: edge do.body1 -> return probability is 4 / 128
257257
258258 for.body:
259259 %i.011 = phi i32 [ 0, %for.body.lr.ph ], [ %inc6, %for.inc5 ]
260 %0 = load i32* %c, align 4
260 %0 = load i32, i32* %c, align 4
261261 %cmp1 = icmp eq i32 %0, %i.011
262262 br i1 %cmp1, label %for.inc5, label %if.end
263263 ; CHECK: edge for.body -> for.inc5 probability is 16 / 32 = 50%
318318
319319 for.body3:
320320 %j.017 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]
321 %0 = load i32* %c, align 4
321 %0 = load i32, i32* %c, align 4
322322 %cmp4 = icmp eq i32 %0, %j.017
323323 br i1 %cmp4, label %for.inc, label %if.end
324324 ; CHECK: edge for.body3 -> for.inc probability is 16 / 32 = 50%
325325 ; CHECK: edge for.body3 -> if.end probability is 16 / 32 = 50%
326326
327327 if.end:
328 %1 = load i32* %arrayidx5, align 4
328 %1 = load i32, i32* %arrayidx5, align 4
329329 %cmp6 = icmp eq i32 %1, %j.017
330330 br i1 %cmp6, label %for.inc, label %if.end8
331331 ; CHECK: edge if.end -> for.inc probability is 16 / 32 = 50%
332332 ; CHECK: edge if.end -> if.end8 probability is 16 / 32 = 50%
333333
334334 if.end8:
335 %2 = load i32* %arrayidx9, align 4
335 %2 = load i32, i32* %arrayidx9, align 4
336336 %cmp10 = icmp eq i32 %2, %j.017
337337 br i1 %cmp10, label %for.inc, label %if.end12
338338 ; CHECK: edge if.end8 -> for.inc probability is 16 / 32 = 50%
2222 %c.addr.09 = phi i32* [ %c, %while.body.lr.ph ], [ %c.addr.1, %if.end ]
2323 %indvars.iv.next = add nsw i64 %indvars.iv, -1
2424 %arrayidx = getelementptr inbounds float, float* %f0, i64 %indvars.iv.next
25 %1 = load float* %arrayidx, align 4
25 %1 = load float, float* %arrayidx, align 4
2626 %arrayidx2 = getelementptr inbounds float, float* %f1, i64 %indvars.iv.next
27 %2 = load float* %arrayidx2, align 4
27 %2 = load float, float* %arrayidx2, align 4
2828 %cmp = fcmp une float %1, %2
2929 br i1 %cmp, label %if.then, label %if.else
3030
3131 if.then:
3232 %incdec.ptr = getelementptr inbounds i32, i32* %b.addr.011, i64 1
33 %3 = load i32* %b.addr.011, align 4
33 %3 = load i32, i32* %b.addr.011, align 4
3434 %add = add nsw i32 %3, 12
3535 store i32 %add, i32* %b.addr.011, align 4
3636 br label %if.end
3737
3838 if.else:
3939 %incdec.ptr3 = getelementptr inbounds i32, i32* %c.addr.09, i64 1
40 %4 = load i32* %c.addr.09, align 4
40 %4 = load i32, i32* %c.addr.09, align 4
4141 %sub = add nsw i32 %4, -13
4242 store i32 %sub, i32* %c.addr.09, align 4
4343 br label %if.end
2121 %u = alloca %union.anon, align 8
2222 %tmp9 = getelementptr inbounds %union.anon, %union.anon* %u, i64 0, i32 0
2323 store double %x, double* %tmp9, align 8, !tbaa !0
24 %tmp2 = load i32* bitcast (i64* @endianness_test to i32*), align 8, !tbaa !3
24 %tmp2 = load i32, i32* bitcast (i64* @endianness_test to i32*), align 8, !tbaa !3
2525 %idxprom = sext i32 %tmp2 to i64
2626 %tmp4 = bitcast %union.anon* %u to [2 x i32]*
2727 %arrayidx = getelementptr inbounds [2 x i32], [2 x i32]* %tmp4, i64 0, i64 %idxprom
28 %tmp5 = load i32* %arrayidx, align 4, !tbaa !3
28 %tmp5 = load i32, i32* %arrayidx, align 4, !tbaa !3
2929 %tmp5.lobit = lshr i32 %tmp5, 31
3030 ret i32 %tmp5.lobit
3131 }
1010 %tmp31 = mul i32 %indvar, -2
1111 %tmp32 = add i32 %tmp31, 30
1212 %t.5 = getelementptr i32, i32* %tab, i32 %tmp32
13 %loada = load i32* %tab
13 %loada = load i32, i32* %tab
1414 store i32 0, i32* %t.5
15 %loadb = load i32* %tab
15 %loadb = load i32, i32* %tab
1616 %rval = add i32 %loada, %loadb
1717 ret i32 %rval
1818 }
2424
2525 store %T* %MS, %T** %M
2626
27 %AP = load %T** %M ; PartialAlias with %A, %B
27 %AP = load %T*, %T** %M ; PartialAlias with %A, %B
2828
2929 ret void
3030 }
2222 store %T* %A, %T** %M
2323 store %T* %B, %T** %N
2424
25 %AP = load %T** %M ; PartialAlias with %A
26 %BP = load %T** %N ; PartialAlias with %B
25 %AP = load %T*, %T** %M ; PartialAlias with %A
26 %BP = load %T*, %T** %N ; PartialAlias with %B
2727
2828 ret void
2929 }
2020 %bigbase0 = bitcast i8* %base to i16*
2121 store i16 -1, i16* %bigbase0
2222
23 %loaded = load i8* %phi
23 %loaded = load i8, i8* %phi
2424 ret i8 %loaded
2525 }
2626
3636 %bigbase1 = bitcast i8* %base to i16*
3737 store i16 -1, i16* %bigbase1
3838
39 %loaded = load i8* %sel
39 %loaded = load i8, i8* %sel
4040 ret i8 %loaded
4141 }
4242
4545 ; CHECK: MayAlias: double* %A, double* %Index
4646 define void @testr2(double* nocapture readonly %A, double* nocapture readonly %Index) {
4747 %arrayidx22 = getelementptr inbounds double, double* %Index, i64 2
48 %1 = load double* %arrayidx22
48 %1 = load double, double* %arrayidx22
4949 %arrayidx25 = getelementptr inbounds double, double* %A, i64 2
50 %2 = load double* %arrayidx25
50 %2 = load double, double* %arrayidx25
5151 %mul26 = fmul double %1, %2
5252 ret void
5353 }
1313 ; CHECK: cost of 64 {{.*}} store
1414 store <4 x i8> undef, <4 x i8> * undef
1515 ; CHECK: cost of 16 {{.*}} load
16 load <2 x i8> * undef
16 load <2 x i8> , <2 x i8> * undef
1717 ; CHECK: cost of 64 {{.*}} load
18 load <4 x i8> * undef
18 load <4 x i8> , <4 x i8> * undef
1919
2020 ret void
2121 }
99 ; CHECK: insertelement_i8
1010 define void @insertelement_i8(%T_i8* %saddr,
1111 %T_i8v* %vaddr) {
12 %v0 = load %T_i8v* %vaddr
13 %v1 = load %T_i8* %saddr
12 %v0 = load %T_i8v, %T_i8v* %vaddr
13 %v1 = load %T_i8, %T_i8* %saddr
1414 ;CHECK: estimated cost of 3 for {{.*}} insertelement <8 x i8>
1515 %v2 = insertelement %T_i8v %v0, %T_i8 %v1, i32 1
1616 store %T_i8v %v2, %T_i8v* %vaddr
2323 ; CHECK: insertelement_i16
2424 define void @insertelement_i16(%T_i16* %saddr,
2525 %T_i16v* %vaddr) {
26 %v0 = load %T_i16v* %vaddr
27 %v1 = load %T_i16* %saddr
26 %v0 = load %T_i16v, %T_i16v* %vaddr
27 %v1 = load %T_i16, %T_i16* %saddr
2828 ;CHECK: estimated cost of 3 for {{.*}} insertelement <4 x i16>
2929 %v2 = insertelement %T_i16v %v0, %T_i16 %v1, i32 1
3030 store %T_i16v %v2, %T_i16v* %vaddr
3636 ; CHECK: insertelement_i32
3737 define void @insertelement_i32(%T_i32* %saddr,
3838 %T_i32v* %vaddr) {
39 %v0 = load %T_i32v* %vaddr
40 %v1 = load %T_i32* %saddr
39 %v0 = load %T_i32v, %T_i32v* %vaddr
40 %v1 = load %T_i32, %T_i32* %saddr
4141 ;CHECK: estimated cost of 3 for {{.*}} insertelement <2 x i32>
4242 %v2 = insertelement %T_i32v %v0, %T_i32 %v1, i32 1
4343 store %T_i32v %v2, %T_i32v* %vaddr
1818 }
1919 define i32 @loads(i32 %arg) {
2020 ; CHECK: cost of 1 {{.*}} load
21 load i8* undef, align 4
21 load i8, i8* undef, align 4
2222 ; CHECK: cost of 1 {{.*}} load
23 load i16* undef, align 4
23 load i16, i16* undef, align 4
2424 ; CHECK: cost of 1 {{.*}} load
25 load i32* undef, align 4
25 load i32, i32* undef, align 4
2626 ; CHECK: cost of 2 {{.*}} load
27 load i64* undef, align 4
27 load i64, i64* undef, align 4
2828 ; CHECK: cost of 4 {{.*}} load
29 load i128* undef, align 4
29 load i128, i128* undef, align 4
3030
3131 ; FIXME: There actually are sub-vector Altivec loads, and so we could handle
3232 ; this with a small expense, but we don't currently.
3333 ; CHECK: cost of 48 {{.*}} load
34 load <4 x i16>* undef, align 2
34 load <4 x i16>, <4 x i16>* undef, align 2
3535
3636 ; CHECK: cost of 1 {{.*}} load
37 load <4 x i32>* undef, align 4
37 load <4 x i32>, <4 x i32>* undef, align 4
3838
3939 ; CHECK: cost of 46 {{.*}} load
40 load <3 x float>* undef, align 1
40 load <3 x float>, <3 x float>* undef, align 1
4141
4242 ret i32 undef
4343 }
1010 %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
1111 %0 = getelementptr inbounds float, float* %f, i64 %index
1212 %1 = bitcast float* %0 to <4 x float>*
13 %wide.load = load <4 x float>* %1, align 4
13 %wide.load = load <4 x float>, <4 x float>* %1, align 4
1414 %2 = call <4 x float> @llvm.ceil.v4f32(<4 x float> %wide.load)
1515 store <4 x float> %2, <4 x float>* %1, align 4
1616 %index.next = add i64 %index, 4
3838 %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
3939 %0 = getelementptr inbounds float, float* %f, i64 %index
4040 %1 = bitcast float* %0 to <4 x float>*
41 %wide.load = load <4 x float>* %1, align 4
41 %wide.load = load <4 x float>, <4 x float>* %1, align 4
4242 %2 = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %wide.load)
4343 store <4 x float> %2, <4 x float>* %1, align 4
4444 %index.next = add i64 %index, 4
6666 %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
6767 %0 = getelementptr inbounds float, float* %f, i64 %index
6868 %1 = bitcast float* %0 to <4 x float>*
69 %wide.load = load <4 x float>* %1, align 4
69 %wide.load = load <4 x float>, <4 x float>* %1, align 4
7070 %2 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %wide.load, <4 x float> %b, <4 x float> %c)
7171 store <4 x float> %2, <4 x float>* %1, align 4
7272 %index.next = add i64 %index, 4
3333 }
3434 define i32 @loads(i32 %arg) {
3535 ;CHECK: cost of 1 {{.*}} load
36 load i8* undef, align 4
36 load i8, i8* undef, align 4
3737 ;CHECK: cost of 1 {{.*}} load
38 load i16* undef, align 4
38 load i16, i16* undef, align 4
3939 ;CHECK: cost of 1 {{.*}} load
40 load i32* undef, align 4
40 load i32, i32* undef, align 4
4141 ;CHECK: cost of 1 {{.*}} load
42 load i64* undef, align 4
42 load i64, i64* undef, align 4
4343 ;CHECK: cost of 2 {{.*}} load
44 load i128* undef, align 4
44 load i128, i128* undef, align 4
4545
4646 ;CHECK: cost of 1 {{.*}} load
47 load <2 x i32>* undef, align 4
47 load <2 x i32>, <2 x i32>* undef, align 4
4848 ;CHECK: cost of 1 {{.*}} load
49 load <4 x i32>* undef, align 4
49 load <4 x i32>, <4 x i32>* undef, align 4
5050 ;CHECK: cost of 2 {{.*}} load
51 load <8 x i32>* undef, align 4
51 load <8 x i32>, <8 x i32>* undef, align 4
5252
5353
5454 ;CHECK: cost of 1 {{.*}} load
55 load <2 x i64>* undef, align 4
55 load <2 x i64>, <2 x i64>* undef, align 4
5656 ;CHECK: cost of 2 {{.*}} load
57 load <4 x i64>* undef, align 4
57 load <4 x i64>, <4 x i64>* undef, align 4
5858 ;CHECK: cost of 4 {{.*}} load
59 load <8 x i64>* undef, align 4
59 load <8 x i64>, <8 x i64>* undef, align 4
6060
6161
6262 ;CHECK: cost of 3 {{.*}} load
63 load <3 x float>* undef, align 4
63 load <3 x float>, <3 x float>* undef, align 4
6464
6565 ;CHECK: cost of 3 {{.*}} load
66 load <3 x double>* undef, align 4
66 load <3 x double>, <3 x double>* undef, align 4
6767
6868 ;CHECK: cost of 3 {{.*}} load
69 load <3 x i32>* undef, align 4
69 load <3 x i32>, <3 x i32>* undef, align 4
7070
7171 ;CHECK: cost of 3 {{.*}} load
72 load <3 x i64>* undef, align 4
72 load <3 x i64>, <3 x i64>* undef, align 4
7373
7474 ;CHECK: cost of 10 {{.*}} load
75 load <5 x i32>* undef, align 4
75 load <5 x i32>, <5 x i32>* undef, align 4
7676
7777 ;CHECK: cost of 10 {{.*}} load
78 load <5 x i64>* undef, align 4
78 load <5 x i64>, <5 x i64>* undef, align 4
7979
8080 ret i32 undef
8181 }
1111 %vec.phi = phi <2 x i32> [ zeroinitializer, %vector.ph ], [ %12, %vector.body ]
1212 %0 = getelementptr inbounds i32, i32* %A, i64 %index
1313 %1 = bitcast i32* %0 to <2 x i32>*
14 %2 = load <2 x i32>* %1, align 4
14 %2 = load <2 x i32>, <2 x i32>* %1, align 4
1515 %3 = sext <2 x i32> %2 to <2 x i64>
1616 ;CHECK: cost of 1 {{.*}} extract
1717 %4 = extractelement <2 x i64> %3, i32 0
1919 ;CHECK: cost of 1 {{.*}} extract
2020 %6 = extractelement <2 x i64> %3, i32 1
2121 %7 = getelementptr inbounds i32, i32* %A, i64 %6
22 %8 = load i32* %5, align 4
22 %8 = load i32, i32* %5, align 4
2323 ;CHECK: cost of 1 {{.*}} insert
2424 %9 = insertelement <2 x i32> undef, i32 %8, i32 0
25 %10 = load i32* %7, align 4
25 %10 = load i32, i32* %7, align 4
2626 ;CHECK: cost of 1 {{.*}} insert
2727 %11 = insertelement <2 x i32> %9, i32 %10, i32 1
2828 %12 = add nsw <2 x i32> %11, %vec.phi
2828 ;CHECK: cost of 0 {{.*}} bitcast
2929 %5 = bitcast i32* %4 to <8 x i32>*
3030 ;CHECK: cost of 2 {{.*}} load
31 %6 = load <8 x i32>* %5, align 4
31 %6 = load <8 x i32>, <8 x i32>* %5, align 4
3232 ;CHECK: cost of 4 {{.*}} mul
3333 %7 = mul nsw <8 x i32> %6,
3434 %8 = getelementptr inbounds i32, i32* %A, i64 %index
3535 %9 = bitcast i32* %8 to <8 x i32>*
3636 ;CHECK: cost of 2 {{.*}} load
37 %10 = load <8 x i32>* %9, align 4
37 %10 = load <8 x i32>, <8 x i32>* %9, align 4
3838 ;CHECK: cost of 4 {{.*}} add
3939 %11 = add nsw <8 x i32> %10, %7
4040 ;CHECK: cost of 2 {{.*}} store
5353 %13 = add nsw i64 %indvars.iv, 2
5454 %arrayidx = getelementptr inbounds i32, i32* %B, i64 %13
5555 ;CHECK: cost of 1 {{.*}} load
56 %14 = load i32* %arrayidx, align 4
56 %14 = load i32, i32* %arrayidx, align 4
5757 ;CHECK: cost of 1 {{.*}} mul
5858 %mul = mul nsw i32 %14, 5
5959 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
6060 ;CHECK: cost of 1 {{.*}} load
61 %15 = load i32* %arrayidx2, align 4
61 %15 = load i32, i32* %arrayidx2, align 4
6262 %add3 = add nsw i32 %15, %mul
6363 store i32 %add3, i32* %arrayidx2, align 4
6464 %indvars.iv.next = add i64 %indvars.iv, 1
2626
2727 define i32 @fn2() {
2828 entry:
29 %.pr = load i32* @d, align 4
29 %.pr = load i32, i32* @d, align 4
3030 %phitmp = icmp eq i32 %.pr, 0
3131 br label %for.cond
3232
3535 br i1 %0, label %for.cond, label %for.cond2thread-pre-split.preheader.i
3636
3737 for.cond2thread-pre-split.preheader.i:
38 %1 = load i32* @g, align 4
39 %2 = load i32* @h, align 4
38 %1 = load i32, i32* @g, align 4
39 %2 = load i32, i32* @h, align 4
4040 %mul = mul nsw i32 %2, %1
41 %3 = load i8** @f, align 4
42 %.pr.pre.i = load i32* @b, align 4
41 %3 = load i8*, i8** @f, align 4
42 %.pr.pre.i = load i32, i32* @b, align 4
4343 br label %for.cond2thread-pre-split.i
4444
4545 for.cond2thread-pre-split.i:
6464 %8 = phi i32 [ %inc.7.i, %for.body4.i ], [ %.pr.i, %for.body4.i.preheader ]
6565 %arrayidx.sum1 = add i32 %add.i, %8
6666 %arrayidx.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum1
67 %9 = load i8* %arrayidx.i, align 1
67 %9 = load i8, i8* %arrayidx.i, align 1
6868 %conv.i = sext i8 %9 to i32
6969 store i32 %conv.i, i32* @c, align 4
7070 %inc.i = add nsw i32 %8, 1
7171 store i32 %inc.i, i32* @b, align 4
7272 %arrayidx.sum2 = add i32 %add.i, %inc.i
7373 %arrayidx.1.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum2
74 %10 = load i8* %arrayidx.1.i, align 1
74 %10 = load i8, i8* %arrayidx.1.i, align 1
7575 %conv.1.i = sext i8 %10 to i32
7676 store i32 %conv.1.i, i32* @c, align 4
7777 %inc.1.i = add nsw i32 %8, 2
7878 store i32 %inc.1.i, i32* @b, align 4
7979 %arrayidx.sum3 = add i32 %add.i, %inc.1.i
8080 %arrayidx.2.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum3
81 %11 = load i8* %arrayidx.2.i, align 1
81 %11 = load i8, i8* %arrayidx.2.i, align 1
8282 %conv.2.i = sext i8 %11 to i32
8383 store i32 %conv.2.i, i32* @c, align 4
8484 %inc.2.i = add nsw i32 %8, 3
8585 store i32 %inc.2.i, i32* @b, align 4
8686 %arrayidx.sum4 = add i32 %add.i, %inc.2.i
8787 %arrayidx.3.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum4
88 %12 = load i8* %arrayidx.3.i, align 1
88 %12 = load i8, i8* %arrayidx.3.i, align 1
8989 %conv.3.i = sext i8 %12 to i32
9090 store i32 %conv.3.i, i32* @c, align 4
9191 %inc.3.i = add nsw i32 %8, 4
9292 store i32 %inc.3.i, i32* @b, align 4
9393 %arrayidx.sum5 = add i32 %add.i, %inc.3.i
9494 %arrayidx.4.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum5
95 %13 = load i8* %arrayidx.4.i, align 1
95 %13 = load i8, i8* %arrayidx.4.i, align 1
9696 %conv.4.i = sext i8 %13 to i32
9797 store i32 %conv.4.i, i32* @c, align 4
9898 %inc.4.i = add nsw i32 %8, 5
9999 store i32 %inc.4.i, i32* @b, align 4
100100 %arrayidx.sum6 = add i32 %add.i, %inc.4.i
101101 %arrayidx.5.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum6
102 %14 = load i8* %arrayidx.5.i, align 1
102 %14 = load i8, i8* %arrayidx.5.i, align 1
103103 %conv.5.i = sext i8 %14 to i32
104104 store i32 %conv.5.i, i32* @c, align 4
105105 %inc.5.i = add nsw i32 %8, 6
106106 store i32 %inc.5.i, i32* @b, align 4
107107 %arrayidx.sum7 = add i32 %add.i, %inc.5.i
108108 %arrayidx.6.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum7
109 %15 = load i8* %arrayidx.6.i, align 1
109 %15 = load i8, i8* %arrayidx.6.i, align 1
110110 %conv.6.i = sext i8 %15 to i32
111111 store i32 %conv.6.i, i32* @c, align 4
112112 %inc.6.i = add nsw i32 %8, 7
113113 store i32 %inc.6.i, i32* @b, align 4
114114 %arrayidx.sum8 = add i32 %add.i, %inc.6.i
115115 %arrayidx.7.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum8
116 %16 = load i8* %arrayidx.7.i, align 1
116 %16 = load i8, i8* %arrayidx.7.i, align 1
117117 %conv.7.i = sext i8 %16 to i32
118118 store i32 %conv.7.i, i32* @c, align 4
119119 %inc.7.i = add nsw i32 %8, 8
135135 %20 = phi i32 [ %inc.ur.i, %for.body4.ur.i ], [ %.ph, %for.body4.ur.i.preheader ]
136136 %arrayidx.sum = add i32 %add.i, %20
137137 %arrayidx.ur.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum
138 %21 = load i8* %arrayidx.ur.i, align 1
138 %21 = load i8, i8* %arrayidx.ur.i, align 1
139139 %conv.ur.i = sext i8 %21 to i32
140140 store i32 %conv.ur.i, i32* @c, align 4
141141 %inc.ur.i = add nsw i32 %20, 1
3535 define void @jacobi(i32 %nn, %struct.Mat* nocapture %a, %struct.Mat* nocapture %p) nounwind uwtable {
3636 entry:
3737 %p.rows.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 2
38 %p.rows = load i32* %p.rows.ptr
38 %p.rows = load i32, i32* %p.rows.ptr
3939 %p.rows.sub = add i32 %p.rows, -1
4040 %p.rows.sext = sext i32 %p.rows.sub to i64
4141 %p.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 3
42 %p.cols = load i32* %p.cols.ptr
42 %p.cols = load i32, i32* %p.cols.ptr
4343 %p.cols.sub = add i32 %p.cols, -1
4444 %p.cols.sext = sext i32 %p.cols.sub to i64
4545 %p.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 4
46 %p.deps = load i32* %p.deps.ptr
46 %p.deps = load i32, i32* %p.deps.ptr
4747 %p.deps.sub = add i32 %p.deps, -1
4848 %p.deps.sext = sext i32 %p.deps.sub to i64
4949 %a.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 3
50 %a.cols = load i32* %a.cols.ptr
50 %a.cols = load i32, i32* %a.cols.ptr
5151 %a.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 4
52 %a.deps = load i32* %a.deps.ptr
52 %a.deps = load i32, i32* %a.deps.ptr
5353 %a.base.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 0
54 %a.base = load float** %a.base.ptr, align 8
54 %a.base = load float*, float** %a.base.ptr, align 8
5555 br label %for.i
5656
5757 for.i: ; preds = %for.i.inc, %entry
3535 define void @jacobi(i32 %nn, %struct.Mat* nocapture %a, %struct.Mat* nocapture %p) nounwind uwtable {
3636 entry:
3737 %p.rows.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 2
38 %p.rows = load i32* %p.rows.ptr
38 %p.rows = load i32, i32* %p.rows.ptr
3939 %p.rows.sub = add i32 %p.rows, -1
4040 %p.rows.sext = sext i32 %p.rows.sub to i64
4141 %p.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 3
42 %p.cols = load i32* %p.cols.ptr
42 %p.cols = load i32, i32* %p.cols.ptr
4343 %p.cols.sub = add i32 %p.cols, -1
4444 %p.cols.sext = sext i32 %p.cols.sub to i64
4545 %p.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 4
46 %p.deps = load i32* %p.deps.ptr
46 %p.deps = load i32, i32* %p.deps.ptr
4747 %p.deps.sub = add i32 %p.deps, -1
4848 %p.deps.sext = sext i32 %p.deps.sub to i64
4949 %a.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 3
50 %a.cols = load i32* %a.cols.ptr
50 %a.cols = load i32, i32* %a.cols.ptr
5151 %a.cols.sext = sext i32 %a.cols to i64
5252 %a.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 4
53 %a.deps = load i32* %a.deps.ptr
53 %a.deps = load i32, i32* %a.deps.ptr
5454 %a.deps.sext = sext i32 %a.deps to i64
5555 %a.base.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 0
56 %a.base = load float** %a.base.ptr, align 8
56 %a.base = load float*, float** %a.base.ptr, align 8
5757 br label %for.i
5858
5959 for.i: ; preds = %for.i.inc, %entry
77 ; A[i][j] = 1.0;
88 ; }
99
10 ; Inst: %val = load double* %arrayidx
10 ; Inst: %val = load double, double* %arrayidx
1111 ; In Loop with Header: for.j
1212 ; AddRec: {{0,+,(%m * sizeof(double))}<%for.i>,+,sizeof(double)}<%for.j>
1313 ; Base offset: %A
3434 %j = phi i64 [ 0, %for.i ], [ %j.inc, %for.j ]
3535 %vlaarrayidx.sum = add i64 %j, %tmp
3636 %arrayidx = getelementptr inbounds double, double* %A, i64 %vlaarrayidx.sum
37 %val = load double* %arrayidx
37 %val = load double, double* %arrayidx
3838 store double %val, double* %arrayidx
3939 %j.inc = add nsw i64 %j, 1
4040 %j.exitcond = icmp eq i64 %j.inc, %m
2020 %tmp6 = mul i64 %tmp5, undef
2121 %arrayidx69.sum = add i64 undef, %tmp6
2222 %arrayidx70 = getelementptr inbounds double, double* %Ey, i64 %arrayidx69.sum
23 %1 = load double* %arrayidx70, align 8
23 %1 = load double, double* %arrayidx70, align 8
2424 %inc = add nsw i64 %ix.062, 1
2525 br i1 false, label %for.body60, label %for.end
2626
4545 %add5 = add nsw i64 %mul4, %j.02
4646 %sub = add nsw i64 %add5, -1
4747 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub
48 %0 = load i64* %arrayidx6, align 8
48 %0 = load i64, i64* %arrayidx6, align 8
4949 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
5050 store i64 %0, i64* %B.addr.11, align 8
5151 %inc = add nsw i64 %j.02, 1
114114 %add5 = add nsw i64 %mul4, %j.03
115115 %sub = add nsw i64 %add5, -1
116116 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub
117 %2 = load i64* %arrayidx6, align 8
117 %2 = load i64, i64* %arrayidx6, align 8
118118 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.12, i64 1
119119 store i64 %2, i64* %B.addr.12, align 8
120120 %inc = add nsw i64 %j.03, 1
180180 %add5 = add nsw i64 %mul4, %j.02
181181 %add6 = add nsw i64 %add5, 100
182182 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
183 %0 = load i64* %arrayidx7, align 8
183 %0 = load i64, i64* %arrayidx7, align 8
184184 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
185185 store i64 %0, i64* %B.addr.11, align 8
186186 %inc = add nsw i64 %j.02, 1
239239 %add5 = add nsw i64 %mul4, %j.02
240240 %add6 = add nsw i64 %add5, 99
241241 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
242 %0 = load i64* %arrayidx7, align 8
242 %0 = load i64, i64* %arrayidx7, align 8
243243 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
244244 store i64 %0, i64* %B.addr.11, align 8
245245 %inc = add nsw i64 %j.02, 1
298298 %add5 = add nsw i64 %mul4, %j.02
299299 %sub = add nsw i64 %add5, -100
300300 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub
301 %0 = load i64* %arrayidx6, align 8
301 %0 = load i64, i64* %arrayidx6, align 8
302302 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
303303 store i64 %0, i64* %B.addr.11, align 8
304304 %inc = add nsw i64 %j.02, 1
357357 %add5 = add nsw i64 %mul4, %j.02
358358 %sub = add nsw i64 %add5, -99
359359 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub
360 %0 = load i64* %arrayidx6, align 8
360 %0 = load i64, i64* %arrayidx6, align 8
361361 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
362362 store i64 %0, i64* %B.addr.11, align 8
363363 %inc = add nsw i64 %j.02, 1
416416 %add5 = add nsw i64 %mul4, %j.02
417417 %add6 = add nsw i64 %add5, 9
418418 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
419 %0 = load i64* %arrayidx7, align 8
419 %0 = load i64, i64* %arrayidx7, align 8
420420 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
421421 store i64 %0, i64* %B.addr.11, align 8
422422 %inc = add nsw i64 %j.02, 1
475475 %add5 = add nsw i64 %mul4, %j.02
476476 %add6 = add nsw i64 %add5, 10
477477 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
478 %0 = load i64* %arrayidx7, align 8
478 %0 = load i64, i64* %arrayidx7, align 8
479479 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
480480 store i64 %0, i64* %B.addr.11, align 8
481481 %inc = add nsw i64 %j.02, 1
534534 %add5 = add nsw i64 %mul4, %j.02
535535 %add6 = add nsw i64 %add5, 11
536536 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
537 %0 = load i64* %arrayidx7, align 8
537 %0 = load i64, i64* %arrayidx7, align 8
538538 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
539539 store i64 %0, i64* %B.addr.11, align 8
540540 %inc = add nsw i64 %j.02, 1
594594 %sub = add i64 %i.03, %0
595595 %add6 = add nsw i64 %sub, 11
596596 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
597 %1 = load i64* %arrayidx7, align 8
597 %1 = load i64, i64* %arrayidx7, align 8
598598 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
599599 store i64 %1, i64* %B.addr.11, align 8
600600 %inc = add nsw i64 %j.02, 1
653653 %sub = add i64 %i.03, %0
654654 %add5 = add nsw i64 %sub, 11
655655 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %add5
656 %1 = load i64* %arrayidx6, align 8
656 %1 = load i64, i64* %arrayidx6, align 8
657657 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
658658 store i64 %1, i64* %B.addr.11, align 8
659659 %inc = add nsw i64 %j.02, 1
712712 %sub = sub nsw i64 %mul4, %j.02
713713 %add5 = add nsw i64 %sub, 11
714714 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %add5
715 %0 = load i64* %arrayidx6, align 8
715 %0 = load i64, i64* %arrayidx6, align 8
716716 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
717717 store i64 %0, i64* %B.addr.11, align 8
718718 %inc = add nsw i64 %j.02, 1
771771 %sub = sub nsw i64 %mul4, %j.02
772772 %add5 = add nsw i64 %sub, 11
773773 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %add5
774 %0 = load i64* %arrayidx6, align 8
774 %0 = load i64, i64* %arrayidx6, align 8
775775 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1
776776 store i64 %0, i64* %B.addr.11, align 8
777777 %inc = add nsw i64 %j.02, 1
2828 %add = add nsw i64 %i.02, 9
2929 %add2 = add nsw i64 %i.02, 10
3030 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add2, i64 %add
31 %0 = load i32* %arrayidx4, align 4
31 %0 = load i32, i32* %arrayidx4, align 4
3232 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
3333 store i32 %0, i32* %B.addr.01, align 4
3434 %inc = add nsw i64 %i.02, 1
6464 %add = add nsw i64 %i.02, 9
6565 %add2 = add nsw i64 %i.02, 9
6666 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add2, i64 %add
67 %0 = load i32* %arrayidx4, align 4
67 %0 = load i32, i32* %arrayidx4, align 4
6868 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
6969 store i32 %0, i32* %B.addr.01, align 4
7070 %inc = add nsw i64 %i.02, 1
102102 %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub2, i64 %sub
103103 store i32 %conv, i32* %arrayidx3, align 4
104104 %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
105 %0 = load i32* %arrayidx5, align 4
105 %0 = load i32, i32* %arrayidx5, align 4
106106 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
107107 store i32 %0, i32* %B.addr.01, align 4
108108 %inc = add nsw i64 %i.02, 1
140140 %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub2, i64 %sub
141141 store i32 %conv, i32* %arrayidx3, align 4
142142 %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
143 %0 = load i32* %arrayidx5, align 4
143 %0 = load i32, i32* %arrayidx5, align 4
144144 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
145145 store i32 %0, i32* %B.addr.01, align 4
146146 %inc = add nsw i64 %i.02, 1
179179 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub3, i64 %sub
180180 store i32 %conv, i32* %arrayidx4, align 4
181181 %arrayidx6 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
182 %0 = load i32* %arrayidx6, align 4
182 %0 = load i32, i32* %arrayidx6, align 4
183183 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
184184 store i32 %0, i32* %B.addr.01, align 4
185185 %inc = add nsw i64 %i.02, 1
220220 %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add, i64 %sub
221221 store i32 %conv, i32* %arrayidx5, align 4
222222 %arrayidx7 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
223 %0 = load i32* %arrayidx7, align 4
223 %0 = load i32, i32* %arrayidx7, align 4
224224 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
225225 store i32 %0, i32* %B.addr.01, align 4
226226 %inc = add nsw i64 %i.02, 1
256256 %arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %sub
257257 store i32 %conv, i32* %arrayidx1, align 4
258258 %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
259 %0 = load i32* %arrayidx3, align 4
259 %0 = load i32, i32* %arrayidx3, align 4
260260 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
261261 store i32 %0, i32* %B.addr.01, align 4
262262 %inc = add nsw i64 %i.02, 1
292292 %arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %sub
293293 store i32 %conv, i32* %arrayidx1, align 4
294294 %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
295 %0 = load i32* %arrayidx3, align 4
295 %0 = load i32, i32* %arrayidx3, align 4
296296 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
297297 store i32 %0, i32* %B.addr.01, align 4
298298 %inc = add nsw i64 %i.02, 1
329329 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
330330 store i32 %conv, i32* %arrayidx2, align 4
331331 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
332 %0 = load i32* %arrayidx4, align 4
332 %0 = load i32, i32* %arrayidx4, align 4
333333 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
334334 store i32 %0, i32* %B.addr.01, align 4
335335 %inc = add nsw i64 %i.02, 1
366366 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
367367 store i32 %conv, i32* %arrayidx2, align 4
368368 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
369 %0 = load i32* %arrayidx4, align 4
369 %0 = load i32, i32* %arrayidx4, align 4
370370 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
371371 store i32 %0, i32* %B.addr.01, align 4
372372 %inc = add nsw i64 %i.02, 1
404404 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
405405 store i32 %conv, i32* %arrayidx2, align 4
406406 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
407 %0 = load i32* %arrayidx4, align 4
407 %0 = load i32, i32* %arrayidx4, align 4
408408 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
409409 store i32 %0, i32* %B.addr.01, align 4
410410 %inc = add nsw i64 %i.02, 1
442442 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
443443 store i32 %conv, i32* %arrayidx2, align 4
444444 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
445 %0 = load i32* %arrayidx4, align 4
445 %0 = load i32, i32* %arrayidx4, align 4
446446 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
447447 store i32 %0, i32* %B.addr.01, align 4
448448 %inc = add nsw i64 %i.02, 1
480480 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
481481 store i32 %conv, i32* %arrayidx2, align 4
482482 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
483 %0 = load i32* %arrayidx4, align 4
483 %0 = load i32, i32* %arrayidx4, align 4
484484 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
485485 store i32 %0, i32* %B.addr.01, align 4
486486 %inc = add nsw i64 %i.02, 1
517517 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
518518 store i32 %conv, i32* %arrayidx2, align 4
519519 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
520 %0 = load i32* %arrayidx4, align 4
520 %0 = load i32, i32* %arrayidx4, align 4
521521 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
522522 store i32 %0, i32* %B.addr.01, align 4
523523 %inc = add nsw i64 %i.02, 1
554554 %arrayidx3 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %sub1, i64 %sub, i64 %i.02
555555 store i32 %conv, i32* %arrayidx3, align 4
556556 %arrayidx6 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %i.02, i64 %i.02, i64 %i.02
557 %0 = load i32* %arrayidx6, align 4
557 %0 = load i32, i32* %arrayidx6, align 4
558558 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
559559 store i32 %0, i32* %B.addr.01, align 4
560560 %inc = add nsw i64 %i.02, 1
591591 %arrayidx3 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %sub1, i64 %sub, i64 %i.02
592592 store i32 %conv, i32* %arrayidx3, align 4
593593 %arrayidx6 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %i.02, i64 %i.02, i64 %i.02
594 %0 = load i32* %arrayidx6, align 4
594 %0 = load i32, i32* %arrayidx6, align 4
595595 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
596596 store i32 %0, i32* %B.addr.01, align 4
597597 %inc = add nsw i64 %i.02, 1
4040 %mul5 = shl nsw i64 %j.02, 1
4141 %add64 = or i64 %mul5, 1
4242 %arrayidx7 = getelementptr inbounds i32, i32* %A, i64 %add64
43 %0 = load i32* %arrayidx7, align 4
43 %0 = load i32, i32* %arrayidx7, align 4
4444 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
4545 store i32 %0, i32* %B.addr.01, align 4
4646 %inc9 = add nsw i64 %j.02, 1
8686 %j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
8787 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
8888 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
89 %0 = load i32* %arrayidx5, align 4
89 %0 = load i32, i32* %arrayidx5, align 4
9090 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
9191 store i32 %0, i32* %B.addr.01, align 4
9292 %inc7 = add nsw i64 %j.02, 1
132132 %j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
133133 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
134134 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
135 %0 = load i32* %arrayidx5, align 4
135 %0 = load i32, i32* %arrayidx5, align 4
136136 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
137137 store i32 %0, i32* %B.addr.01, align 4
138138 %inc7 = add nsw i64 %j.02, 1
178178 %j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
179179 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
180180 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
181 %0 = load i32* %arrayidx5, align 4
181 %0 = load i32, i32* %arrayidx5, align 4
182182 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
183183 store i32 %0, i32* %B.addr.01, align 4
184184 %inc7 = add nsw i64 %j.02, 1
224224 %j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
225225 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
226226 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
227 %0 = load i32* %arrayidx5, align 4
227 %0 = load i32, i32* %arrayidx5, align 4
228228 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
229229 store i32 %0, i32* %B.addr.01, align 4
230230 %inc7 = add nsw i64 %j.02, 1
271271 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
272272 %sub = sub nsw i64 0, %j.02
273273 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
274 %0 = load i32* %arrayidx5, align 4
274 %0 = load i32, i32* %arrayidx5, align 4
275275 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
276276 store i32 %0, i32* %B.addr.01, align 4
277277 %inc7 = add nsw i64 %j.02, 1
318318 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
319319 %sub = sub nsw i64 0, %j.02
320320 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
321 %0 = load i32* %arrayidx5, align 4
321 %0 = load i32, i32* %arrayidx5, align 4
322322 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
323323 store i32 %0, i32* %B.addr.01, align 4
324324 %inc7 = add nsw i64 %j.02, 1
365365 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
366366 %sub = sub nsw i64 0, %j.02
367367 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
368 %0 = load i32* %arrayidx5, align 4
368 %0 = load i32, i32* %arrayidx5, align 4
369369 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
370370 store i32 %0, i32* %B.addr.01, align 4
371371 %inc7 = add nsw i64 %j.02, 1
412412 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
413413 %sub = sub nsw i64 0, %j.02
414414 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
415 %0 = load i32* %arrayidx5, align 4
415 %0 = load i32, i32* %arrayidx5, align 4
416416 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
417417 store i32 %0, i32* %B.addr.01, align 4
418418 %inc7 = add nsw i64 %j.02, 1
454454 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
455455 store i32 %conv, i32* %arrayidx, align 4
456456 %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
457 %0 = load i32* %arrayidx4, align 4
457 %0 = load i32, i32* %arrayidx4, align 4
458458 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
459459 store i32 %0, i32* %B.addr.11, align 4
460460 %inc = add nsw i64 %j.02, 1
503503 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
504504 store i32 %conv, i32* %arrayidx, align 4
505505 %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
506 %0 = load i32* %arrayidx4, align 4
506 %0 = load i32, i32* %arrayidx4, align 4
507507 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
508508 store i32 %0, i32* %B.addr.11, align 4
509509 %inc = add nsw i64 %j.02, 1
551551 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
552552 store i32 %conv, i32* %arrayidx, align 4
553553 %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
554 %0 = load i32* %arrayidx4, align 4
554 %0 = load i32, i32* %arrayidx4, align 4
555555 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
556556 store i32 %0, i32* %B.addr.11, align 4
557557 %inc = add nsw i64 %j.02, 1
599599 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
600600 store i32 %conv, i32* %arrayidx, align 4
601601 %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
602 %0 = load i32* %arrayidx4, align 4
602 %0 = load i32, i32* %arrayidx4, align 4
603603 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
604604 store i32 %0, i32* %B.addr.11, align 4
605605 %inc = add nsw i64 %j.02, 1
2929 %mul = shl i64 %i.02, 1
3030 %add13 = or i64 %mul, 1
3131 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %add13
32 %0 = load i32* %arrayidx2, align 4
32 %0 = load i32, i32* %arrayidx2, align 4
3333 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
3434 store i32 %0, i32* %B.addr.01, align 4
3535 %inc = add i64 %i.02, 1
6767 %mul1 = shl i64 %i.02, 1
6868 %add23 = or i64 %mul1, 1
6969 %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %add23
70 %0 = load i32* %arrayidx3, align 4
70 %0 = load i32, i32* %arrayidx3, align 4
7171 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
7272 store i32 %0, i32* %B.addr.01, align 4
7373 %inc = add i64 %i.02, 1
103103 store i32 %conv, i32* %arrayidx, align 4
104104 %add = add i64 %i.02, 60
105105 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
106 %0 = load i32* %arrayidx1, align 4
106 %0 = load i32, i32* %arrayidx1, align 4
107107 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
108108 store i32 %0, i32* %B.addr.01, align 4
109109 %inc = add i64 %i.02, 1
139139 store i32 %conv, i32* %arrayidx, align 4
140140 %add = add i64 %i.02, 60
141141 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
142 %0 = load i32* %arrayidx1, align 4
142 %0 = load i32, i32* %arrayidx1, align 4
143143 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
144144 store i32 %0, i32* %B.addr.01, align 4
145145 %inc = add i64 %i.02, 1
175175 store i32 %conv, i32* %arrayidx, align 4
176176 %add = add i64 %i.02, 60
177177 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
178 %0 = load i32* %arrayidx1, align 4
178 %0 = load i32, i32* %arrayidx1, align 4
179179 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
180180 store i32 %0, i32* %B.addr.01, align 4
181181 %inc = add i64 %i.02, 1
211211 store i32 %conv, i32* %arrayidx, align 4
212212 %add = add i64 %i.02, 60
213213 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
214 %0 = load i32* %arrayidx1, align 4
214 %0 = load i32, i32* %arrayidx1, align 4
215215 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
216216 store i32 %0, i32* %B.addr.01, align 4
217217 %inc = add i64 %i.02, 1
247247 store i32 %conv, i32* %arrayidx, align 4
248248 %add = add i64 %i.02, 60
249249 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
250 %0 = load i32* %arrayidx1, align 4
250 %0 = load i32, i32* %arrayidx1, align 4
251251 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
252252 store i32 %0, i32* %B.addr.01, align 4
253253 %inc = add i64 %i.02, 1
283283 store i32 %conv, i32* %arrayidx, align 4
284284 %add = add i64 %i.02, 60
285285 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
286 %0 = load i32* %arrayidx1, align 4
286 %0 = load i32, i32* %arrayidx1, align 4
287287 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
288288 store i32 %0, i32* %B.addr.01, align 4
289289 %inc = add i64 %i.02, 1
319319 store i32 %conv, i32* %arrayidx, align 4
320320 %sub1 = sub i64 -60, %i.02
321321 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub1
322 %0 = load i32* %arrayidx2, align 4
322 %0 = load i32, i32* %arrayidx2, align 4
323323 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
324324 store i32 %0, i32* %B.addr.01, align 4
325325 %inc = add i64 %i.02, 1
355355 store i32 %conv, i32* %arrayidx, align 4
356356 %sub1 = sub i64 -60, %i.02
357357 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub1
358 %0 = load i32* %arrayidx2, align 4
358 %0 = load i32, i32* %arrayidx2, align 4
359359 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
360360 store i32 %0, i32* %B.addr.01, align 4
361361 %inc = add i64 %i.02, 1
391391 store i32 %conv, i32* %arrayidx, align 4
392392 %sub1 = sub i64 -60, %i.02
393393 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub1
394 %0 = load i32* %arrayidx2, align 4
394 %0 = load i32, i32* %arrayidx2, align 4
395395 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
396396 store i32 %0, i32* %B.addr.01, align 4
397397 %inc = add i64 %i.02, 1
427427 store i32 %conv, i32* %arrayidx, align 4
428428 %sub1 = sub i64 -60, %i.02
429429 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub1
430 %0 = load i32* %arrayidx2, align 4
430 %0 = load i32, i32* %arrayidx2, align 4
431431 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
432432 store i32 %0, i32* %B.addr.01, align 4
433433 %inc = add i64 %i.02, 1
463463 store i32 %conv, i32* %arrayidx, align 4
464464 %sub1 = sub i64 -60, %i.02
465465 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub1
466 %0 = load i32* %arrayidx2, align 4
466 %0 = load i32, i32* %arrayidx2, align 4
467467 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
468468 store i32 %0, i32* %B.addr.01, align 4
469469 %inc = add i64 %i.02, 1
499499 store i32 %conv, i32* %arrayidx, align 4
500500 %sub1 = sub i64 -60, %i.02
501501 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub1
502 %0 = load i32* %arrayidx2, align 4
502 %0 = load i32, i32* %arrayidx2, align 4
503503 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
504504 store i32 %0, i32* %B.addr.01, align 4
505505 %inc = add i64 %i.02, 1
4848 %mul6 = shl nsw i64 %j.02, 3
4949 %add = add nsw i64 %mul5, %mul6
5050 %arrayidx7 = getelementptr inbounds i32, i32* %A, i64 %add
51 %0 = load i32* %arrayidx7, align 4
51 %0 = load i32, i32* %arrayidx7, align 4
5252 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
5353 store i32 %0, i32* %B.addr.11, align 4
5454 %inc = add nsw i64 %j.02, 1
110110 %add = add nsw i64 %mul5, %mul6
111111 %add7 = or i64 %add, 1
112112 %arrayidx8 = getelementptr inbounds i32, i32* %A, i64 %add7
113 %0 = load i32* %arrayidx8, align 4
113 %0 = load i32, i32* %arrayidx8, align 4
114114 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
115115 store i32 %0, i32* %B.addr.11, align 4
116116 %inc = add nsw i64 %j.02, 1
172172 %mul6 = shl nsw i64 %j.02, 3
173173 %add7 = add nsw i64 %mul5, %mul6
174174 %arrayidx8 = getelementptr inbounds i32, i32* %A, i64 %add7
175 %0 = load i32* %arrayidx8, align 4
175 %0 = load i32, i32* %arrayidx8, align 4
176176 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
177177 store i32 %0, i32* %B.addr.11, align 4
178178 %inc = add nsw i64 %j.02, 1
232232 %add5 = add nsw i64 %i.03, %mul4
233233 %sub = add nsw i64 %add5, -1
234234 %arrayidx6 = getelementptr inbounds i32, i32* %A, i64 %sub
235 %0 = load i32* %arrayidx6, align 4
235 %0 = load i32, i32* %arrayidx6, align 4
236236 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
237237 store i32 %0, i32* %B.addr.11, align 4
238238 %inc = add nsw i64 %j.02, 1
302302 %sub = sub nsw i64 %add12, %mul14
303303 %add15 = add nsw i64 %sub, 4
304304 %arrayidx16 = getelementptr inbounds i32, i32* %A, i64 %add15
305 %0 = load i32* %arrayidx16, align 4
305 %0 = load i32, i32* %arrayidx16, align 4
306306 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
307307 store i32 %0, i32* %B.addr.11, align 4
308308 %inc = add nsw i64 %j.02, 1
372372 %sub = sub nsw i64 %add12, %mul14
373373 %add15 = add nsw i64 %sub, 5
374374 %arrayidx16 = getelementptr inbounds i32, i32* %A, i64 %add15
375 %0 = load i32* %arrayidx16, align 4
375 %0 = load i32, i32* %arrayidx16, align 4
376376 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
377377 store i32 %0, i32* %B.addr.11, align 4
378378 %inc = add nsw i64 %j.02, 1
444444 %1 = mul nsw i64 %mul7, %n
445445 %arrayidx8.sum = add i64 %1, %add7
446446 %arrayidx9 = getelementptr inbounds i32, i32* %A, i64 %arrayidx8.sum
447 %2 = load i32* %arrayidx9, align 4
447 %2 = load i32, i32* %arrayidx9, align 4
448448 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.12, i64 1
449449 store i32 %2, i32* %B.addr.12, align 4
450450 %inc = add nsw i64 %j.03, 1
535535 %10 = mul nsw i64 %idxprom10, %0
536536 %arrayidx11.sum = add i64 %10, %idxprom8
537537 %arrayidx12 = getelementptr inbounds i32, i32* %A, i64 %arrayidx11.sum
538 %11 = load i32* %arrayidx12, align 4
538 %11 = load i32, i32* %arrayidx12, align 4
539539 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.12, i64 1
540540 store i32 %11, i32* %B.addr.12, align 4
541541 %indvars.iv.next = add i64 %indvars.iv, 1
622622 %add10 = or i32 %add9, 1
623623 %idxprom11 = sext i32 %add10 to i64
624624 %arrayidx12 = getelementptr inbounds i32, i32* %A, i64 %idxprom11
625 %5 = load i32* %arrayidx12, align 4
625 %5 = load i32, i32* %arrayidx12, align 4
626626 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.12, i64 1
627627 store i32 %5, i32* %B.addr.12, align 4
628628 %indvars.iv.next = add i64 %indvars.iv, 1
714714 %10 = mul nsw i64 %idxprom10, %0
715715 %arrayidx11.sum = add i64 %10, %idxprom8
716716 %arrayidx12 = getelementptr inbounds i32, i32* %A, i64 %arrayidx11.sum
717 %11 = load i32* %arrayidx12, align 4
717 %11 = load i32, i32* %arrayidx12, align 4
718718 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.12, i64 1
719719 store i32 %11, i32* %B.addr.12, align 4
720720 %indvars.iv.next = add i64 %indvars.iv, 1
1919 %j.02 = phi i32 [ 0, %for.cond1.preheader ], [ %add8, %for.body3 ]
2020 %res.11 = phi float [ %res.03, %for.cond1.preheader ], [ %add.res.1, %for.body3 ]
2121 %arrayidx4 = getelementptr inbounds [40 x float], [40 x float]* %rr, i32 %j.02, i32 %j.02
22 %0 = load float* %arrayidx4, align 4
22 %0 = load float, float* %arrayidx4, align 4
2323 %arrayidx6 = getelementptr inbounds [40 x float], [40 x float]* %rr, i32 %i.04, i32 %j.02
24 %1 = load float* %arrayidx6, align 4
24 %1 = load float, float* %arrayidx6, align 4
2525 %add = fadd float %0, %1
2626 %cmp7 = fcmp ogt float %add, %g
2727 %add.res.1 = select i1 %cmp7, float %add, float %res.11
2727 %i = phi i64 [ 0, %entry ], [ %i.inc, %for.body ]
2828 %a.addr = getelementptr [100 x [100 x i32]], [100 x [100 x i32]]* %a, i64 0, i64 %i, i64 %i
2929 %a.addr.2 = getelementptr [100 x [100 x i32]], [100 x [100 x i32]]* %a, i64 0, i64 %i, i32 5
30 %0 = load i32* %a.addr, align 4
30 %0 = load i32, i32* %a.addr, align 4
3131 %1 = add i32 %0, 1
3232 store i32 %1, i32* %a.addr.2, align 4
3333 %i.inc = add nsw i64 %i, 1
1717 ; CHECK: da analyze - none!
1818
1919 %arrayidx1 = getelementptr inbounds i32, i32* %B, i64 1
20 %0 = load i32* %arrayidx1, align 4
20 %0 = load i32, i32* %arrayidx1, align 4
2121 ret i32 %0
2222 }
2323
3535 ; CHECK: da analyze - none!
3636
3737 %arrayidx1 = getelementptr inbounds i32, i32* %B, i64 1
38 %0 = load i32* %arrayidx1, align 4
38 %0 = load i32, i32* %arrayidx1, align 4
3939 ret i32 %0
4040 }
4141
106106 %add13 = add nsw i64 %j.07, 2
107107 %add14 = add nsw i64 %i.011, 3
108108 %arrayidx17 = getelementptr inbounds [100 x [100 x i64]], [100 x [100 x i64]]* %A, i64 %add14, i64 %add13, i64 %add
109 %0 = load i64* %arrayidx17, align 8
109 %0 = load i64, i64* %arrayidx17, align 8
110110 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.24, i64 1
111111 store i64 %0, i64* %B.addr.24, align 8
112112 %inc19 = add nsw i64 %k9.05, 1
289289 %sub48 = sub nsw i64 1, %k.037
290290 %add49 = add nsw i64 %i.045, 3
291291 %arrayidx57 = getelementptr inbounds [100 x [100 x [100 x [100 x [100 x [100 x [100 x i64]]]]]]], [100 x [100 x [100 x [100 x [100 x [100 x [100 x i64]]]]]]]* %A, i64 %add49, i64 2, i64 %u.06, i64 %sub48, i64 %sub47, i64 %o.025, i64 %add45, i64 %add44
292 %0 = load i64* %arrayidx57, align 8
292 %0 = load i64, i64* %arrayidx57, align 8
293293 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.112, i64 1
294294 store i64 %0, i64* %B.addr.112, align 8
295295 %inc = add nsw i64 %t.03, 1
444444 store i32 %conv2, i32* %arrayidx, align 4
445445 %idxprom4 = sext i8 %i.03 to i64
446446 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %idxprom4
447 %0 = load i32* %arrayidx5, align 4
447 %0 = load i32, i32* %arrayidx5, align 4
448448 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
449449 store i32 %0, i32* %B.addr.02, align 4
450450 %inc = add i8 %i.03, 1
490490 store i32 %conv2, i32* %arrayidx, align 4
491491 %idxprom4 = sext i16 %i.03 to i64
492492 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %idxprom4
493 %0 = load i32* %arrayidx5, align 4
493 %0 = load i32, i32* %arrayidx5, align 4
494494 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
495495 store i32 %0, i32* %B.addr.02, align 4
496496 %inc = add i16 %i.03, 1
534534 %1 = trunc i64 %indvars.iv to i32
535535 store i32 %1, i32* %arrayidx, align 4
536536 %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
537 %2 = load i32* %arrayidx3, align 4
537 %2 = load i32, i32* %arrayidx3, align 4
538538 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
539539 store i32 %2, i32* %B.addr.02, align 4
540540 %indvars.iv.next = add i64 %indvars.iv, 1
569569 %conv = sext i8 %n to i64
570570 %add = add i64 %conv, 1
571571 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %add
572 %0 = load i32* %arrayidx2, align 4
572 %0 = load i32, i32* %arrayidx2, align 4
573573 store i32 %0, i32* %B, align 4
574574 ret void
575575 }
595595 %conv = sext i16 %n to i64
596596 %add = add i64 %conv, 1
597597 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %add
598 %0 = load i32* %arrayidx2, align 4
598 %0 = load i32, i32* %arrayidx2, align 4
599599 store i32 %0, i32* %B, align 4
600600 ret void
601601 }
621621 %add = add nsw i32 %n, 1
622622 %idxprom1 = sext i32 %add to i64
623623 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %idxprom1
624 %0 = load i32* %arrayidx2, align 4
624 %0 = load i32, i32* %arrayidx2, align 4
625625 store i32 %0, i32* %B, align 4
626626 ret void
627627 }
647647 %add = add i32 %n, 1
648648 %idxprom1 = zext i32 %add to i64
649649 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %idxprom1
650 %0 = load i32* %arrayidx2, align 4
650 %0 = load i32, i32* %arrayidx2, align 4
651651 store i32 %0, i32* %B, align 4
652652 ret void
653653 }
681681 while.body: ; preds = %while.body.preheader, %while.body
682682 %i.02 = phi %struct.S* [ %incdec.ptr, %while.body ], [ %s, %while.body.preheader ]
683683 %0 = getelementptr inbounds %struct.S, %struct.S* %i.02, i64 1, i32 0
684 %1 = load i32* %0, align 4
684 %1 = load i32, i32* %0, align 4
685685 %2 = getelementptr inbounds %struct.S, %struct.S* %i.02, i64 0, i32 0
686686 store i32 %1, i32* %2, align 4
687687 %incdec.ptr = getelementptr inbounds %struct.S, %struct.S* %i.02, i64 1
3535 store i32 %conv, i32* %arrayidx5, align 4
3636 %add6 = add nsw i64 %i.03, %j.02
3737 %arrayidx8 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.03, i64 %add6
38 %0 = load i32* %arrayidx8, align 4
38 %0 = load i32, i32* %arrayidx8, align 4
3939 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
4040 store i32 %0, i32* %B.addr.11, align 4
4141 %inc = add nsw i64 %j.02, 1
9292 %add10 = add nsw i64 %j.03, %k.02
9393 %sub11 = sub nsw i64 %j.03, %i.05
9494 %arrayidx14 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %sub11, i64 %i.05, i64 %add10
95 %0 = load i32* %arrayidx14, align 4
95 %0 = load i32, i32* %arrayidx14, align 4
9696 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.21, i64 1
9797 store i32 %0, i32* %B.addr.21, align 4
9898 %inc = add nsw i64 %k.02, 1
148148 %add = add nsw i64 %i.03, %j.02
149149 %add5 = add nsw i64 %add, 110
150150 %arrayidx7 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.03, i64 %add5
151 %0 = load i32* %arrayidx7, align 4
151 %0 = load i32, i32* %arrayidx7, align 4
152152 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
153153 store i32 %0, i32* %B.addr.11, align 4
154154 %inc = add nsw i64 %j.02, 1
199199 %sub = sub nsw i64 %mul5, %i.03
200200 %add6 = add nsw i64 %sub, 5
201201 %arrayidx8 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.03, i64 %add6
202 %0 = load i32* %arrayidx8, align 4
202 %0 = load i32, i32* %arrayidx8, align 4
203203 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
204204 store i32 %0, i32* %B.addr.11, align 4
205205 %inc = add nsw i64 %j.02, 1
251251 %mul7 = shl nsw i64 %i.03, 1
252252 %add8 = add nsw i64 %mul7, %j.02
253253 %arrayidx10 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.03, i64 %add8
254 %0 = load i32* %arrayidx10, align 4
254 %0 = load i32, i32* %arrayidx10, align 4
255255 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
256256 store i32 %0, i32* %B.addr.11, align 4
257257 %inc = add nsw i64 %j.02, 1
305305 %mul8 = mul nsw i64 %i.03, 3
306306 %add9 = add nsw i64 %mul8, %j.02
307307 %arrayidx12 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %i.03, i64 %i.03, i64 %add9
308 %0 = load i32* %arrayidx12, align 4
308 %0 = load i32, i32* %arrayidx12, align 4
309309 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
310310 store i32 %0, i32* %B.addr.11, align 4
311311 %inc = add nsw i64 %j.02, 1
358358 %add8 = add nsw i64 %mul7, %j.02
359359 %mul9 = shl nsw i64 %i.03, 1
360360 %arrayidx11 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %mul9, i64 %add8
361 %0 = load i32* %arrayidx11, align 4
361 %0 = load i32, i32* %arrayidx11, align 4
362362 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
363363 store i32 %0, i32* %B.addr.11, align 4
364364 %inc = add nsw i64 %j.02, 1
414414 %mul10 = mul nsw i64 %i.03, -2
415415 %add11 = add nsw i64 %mul10, 20
416416 %arrayidx13 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add11, i64 %add9
417 %0 = load i32* %arrayidx13, align 4
417 %0 = load i32, i32* %arrayidx13, align 4
418418 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
419419 store i32 %0, i32* %B.addr.11, align 4
420420 %inc = add nsw i64 %j.02, 1
465465 %mul6 = mul nsw i64 %i.03, -2
466466 %add7 = add nsw i64 %mul6, 4
467467 %arrayidx9 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add7, i64 %add5
468 %0 = load i32* %arrayidx9, align 4
468 %0 = load i32, i32* %arrayidx9, align 4
469469 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
470470 store i32 %0, i32* %B.addr.11, align 4
471471 %inc = add nsw i64 %j.02, 1
516516 %arrayidx7 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add6, i64 %add4
517517 store i32 %conv, i32* %arrayidx7, align 4
518518 %arrayidx9 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 4, i64 %j.02
519 %0 = load i32* %arrayidx9, align 4
519 %0 = load i32, i32* %arrayidx9, align 4
520520 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
521521 store i32 %0, i32* %B.addr.11, align 4
522522 %inc = add nsw i64 %j.02, 1
4949 %sub = sub nsw i64 %mul, %l.02
5050 %add12 = add nsw i64 %i.07, 10
5151 %arrayidx15 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 10, i64 %add12, i64 %sub
52 %0 = load i32* %arrayidx15, align 4
52 %0 = load i32, i32* %arrayidx15, align 4
5353 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.31, i64 1
5454 store i32 %0, i32* %B.addr.31, align 4
5555 %inc = add nsw i64 %l.02, 1
123123 %sub = sub nsw i64 %mul, %l.02
124124 %add12 = add nsw i64 %i.07, 10
125125 %arrayidx15 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 10, i64 %add12, i64 %sub
126 %0 = load i32* %arrayidx15, align 4
126 %0 = load i32, i32* %arrayidx15, align 4
127127 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.31, i64 1
128128 store i32 %0, i32* %B.addr.31, align 4
129129 %inc = add nsw i64 %l.02, 1
197197 %add14 = add nsw i64 %j.05, %k.03
198198 %add15 = add nsw i64 %i.07, 10
199199 %arrayidx19 = getelementptr inbounds [100 x [100 x [100 x i32]]], [100 x [100 x [100 x i32]]]* %A, i64 10, i64 %add15, i64 %add14, i64 %add13
200 %0 = load i32* %arrayidx19, align 4
200 %0 = load i32, i32* %arrayidx19, align 4
201201 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.31, i64 1
202202 store i32 %0, i32* %B.addr.31, align 4
203203 %inc = add nsw i64 %l.02, 1
272272 %add15 = add nsw i64 %j.05, %k.03
273273 %add16 = add nsw i64 %i.07, 10
274274 %arrayidx20 = getelementptr inbounds [100 x [100 x [100 x i32]]], [100 x [100 x [100 x i32]]]* %A, i64 10, i64 %add16, i64 %add15, i64 %add14
275 %0 = load i32* %arrayidx20, align 4
275 %0 = load i32, i32* %arrayidx20, align 4
276276 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.31, i64 1
277277 store i32 %0, i32* %B.addr.31, align 4
278278 %inc = add nsw i64 %l.02, 1
3131 %1 = trunc i64 %indvars.iv to i32
3232 store i32 %1, i32* %arrayidx, align 4
3333 %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
34 %2 = load i32* %arrayidx3, align 4
34 %2 = load i32, i32* %arrayidx3, align 4
3535 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
3636 store i32 %2, i32* %B.addr.02, align 4
3737 %indvars.iv.next = add i64 %indvars.iv, 1
7474 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
7575 store i32 %conv2, i32* %arrayidx, align 4
7676 %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %i.03
77 %1 = load i32* %arrayidx3, align 4
77 %1 = load i32, i32* %arrayidx3, align 4
7878 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
7979 store i32 %1, i32* %B.addr.02, align 4
8080 %inc = add nsw i64 %i.03, 1
116116 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
117117 store i32 %conv, i32* %arrayidx, align 4
118118 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %i.03
119 %0 = load i32* %arrayidx1, align 4
119 %0 = load i32, i32* %arrayidx1, align 4
120120 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
121121 store i32 %0, i32* %B.addr.02, align 4
122122 %inc = add i64 %i.03, 1
158158 %1 = trunc i64 %indvars.iv to i32
159159 store i32 %1, i32* %arrayidx, align 4
160160 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
161 %2 = load i32* %arrayidx2, align 4
161 %2 = load i32, i32* %arrayidx2, align 4
162162 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
163163 store i32 %2, i32* %B.addr.02, align 4
164164 %indvars.iv.next = add i64 %indvars.iv, 1
197197 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
198198 store i32 %conv, i32* %arrayidx, align 4
199199 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %i.02
200 %0 = load i32* %arrayidx1, align 4
200 %0 = load i32, i32* %arrayidx1, align 4
201201 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
202202 store i32 %0, i32* %B.addr.01, align 4
203203 %inc = add i64 %i.02, 1
232232 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
233233 store i32 %conv, i32* %arrayidx, align 4
234234 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %i.02
235 %0 = load i32* %arrayidx1, align 4
235 %0 = load i32, i32* %arrayidx1, align 4
236236 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
237237 store i32 %0, i32* %B.addr.01, align 4
238238 %inc = add i64 %i.02, 1
269269 store i32 %conv, i32* %arrayidx, align 4
270270 %mul1 = shl i64 %i.02, 1
271271 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %mul1
272 %0 = load i32* %arrayidx2, align 4
272 %0 = load i32, i32* %arrayidx2, align 4
273273 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
274274 store i32 %0, i32* %B.addr.01, align 4
275275 %inc = add i64 %i.02, 1
306306 store i32 %conv, i32* %arrayidx, align 4
307307 %mul1 = shl i64 %i.02, 1
308308 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %mul1
309 %0 = load i32* %arrayidx2, align 4
309 %0 = load i32, i32* %arrayidx2, align 4
310310 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
311311 store i32 %0, i32* %B.addr.01, align 4
312312 %inc = add i64 %i.02, 1
341341 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
342342 store i32 %conv, i32* %arrayidx, align 4
343343 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %i.02
344 %0 = load i32* %arrayidx1, align 4
344 %0 = load i32, i32* %arrayidx1, align 4
345345 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
346346 store i32 %0, i32* %B.addr.01, align 4
347347 %inc = add i64 %i.02, 1
382382 %mul = shl i64 %n, 1
383383 %add1 = add i64 %i.03, %mul
384384 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %add1
385 %0 = load i32* %arrayidx2, align 4
385 %0 = load i32, i32* %arrayidx2, align 4
386386 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
387387 store i32 %0, i32* %B.addr.02, align 4
388388 %inc = add i64 %i.03, 1
423423 %mul1 = mul i64 %i.02, %n
424424 %add2 = add i64 %mul1, 5
425425 %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %add2
426 %0 = load i32* %arrayidx3, align 4
426 %0 = load i32, i32* %arrayidx3, align 4
427427 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
428428 store i32 %0, i32* %B.addr.01, align 4
429429 %inc = add i64 %i.02, 1
5252 %mul56 = add i64 %j.03, %n1
5353 %add7 = mul i64 %mul56, 3
5454 %arrayidx8 = getelementptr inbounds i32, i32* %A, i64 %add7
55 %0 = load i32* %arrayidx8, align 4
55 %0 = load i32, i32* %arrayidx8, align 4
5656 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
5757 store i32 %0, i32* %B.addr.02, align 4
5858 %inc10 = add nsw i64 %j.03, 1
117117 %mul7 = shl i64 %n2, 1
118118 %add8 = add i64 %mul6, %mul7
119119 %arrayidx9 = getelementptr inbounds i32, i32* %A, i64 %add8
120 %0 = load i32* %arrayidx9, align 4
120 %0 = load i32, i32* %arrayidx9, align 4
121121 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
122122 store i32 %0, i32* %B.addr.02, align 4
123123 %inc11 = add nsw i64 %j.03, 1
180180 %mul6 = shl i64 %n1, 1
181181 %add = sub i64 %mul6, %j.03
182182 %arrayidx7 = getelementptr inbounds i32, i32* %A, i64 %add
183 %0 = load i32* %arrayidx7, align 4
183 %0 = load i32, i32* %arrayidx7, align 4
184184 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
185185 store i32 %0, i32* %B.addr.02, align 4
186186 %inc9 = add nsw i64 %j.03, 1
241241 %B.addr.02 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
242242 %sub5 = sub i64 %j.03, %n1
243243 %arrayidx6 = getelementptr inbounds i32, i32* %A, i64 %sub5
244 %0 = load i32* %arrayidx6, align 4
244 %0 = load i32, i32* %arrayidx6, align 4
245245 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
246246 store i32 %0, i32* %B.addr.02, align 4
247247 %inc8 = add nsw i64 %j.03, 1
303303 %B.addr.02 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
304304 %add6 = sub i64 %n1, %j.03
305305 %arrayidx7 = getelementptr inbounds i32, i32* %A, i64 %add6
306 %0 = load i32* %arrayidx7, align 4
306 %0 = load i32, i32* %arrayidx7, align 4
307307 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
308308 store i32 %0, i32* %B.addr.02, align 4
309309 %inc9 = add nsw i64 %j.03, 1
365365 %mul = shl i64 %n2, 1
366366 %add6 = sub i64 %mul, %j.03
367367 %arrayidx7 = getelementptr inbounds i32, i32* %A, i64 %add6
368 %0 = load i32* %arrayidx7, align 4
368 %0 = load i32, i32* %arrayidx7, align 4
369369 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
370370 store i32 %0, i32* %B.addr.02, align 4
371371 %inc9 = add nsw i64 %j.03, 1
420420 store i32 %conv, i32* %arrayidx, align 4
421421 %mul = shl i64 %n2, 1
422422 %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 %mul
423 %0 = load i32* %arrayidx4, align 4
423 %0 = load i32, i32* %arrayidx4, align 4
424424 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.12, i64 1
425425 store i32 %0, i32* %B.addr.12, align 4
426426 %inc = add nsw i64 %j.03, 1
3434 %mul14 = add i64 %i.03, %n
3535 %add3 = mul i64 %mul14, 3
3636 %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 %add3
37 %0 = load i32* %arrayidx4, align 4
37 %0 = load i32, i32* %arrayidx4, align 4
3838 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
3939 store i32 %0, i32* %B.addr.02, align 4
4040 %inc = add nsw i64 %i.03, 1
8181 %mul3 = shl i64 %n, 1
8282 %add4 = add i64 %mul2, %mul3
8383 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %add4
84 %0 = load i32* %arrayidx5, align 4
84 %0 = load i32, i32* %arrayidx5, align 4
8585 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
8686 store i32 %0, i32* %B.addr.02, align 4
8787 %inc = add nsw i64 %i.03, 1
126126 %mul2 = shl i64 %n, 1
127127 %add = sub i64 %mul2, %i.03
128128 %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %add
129 %0 = load i32* %arrayidx3, align 4
129 %0 = load i32, i32* %arrayidx3, align 4
130130 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
131131 store i32 %0, i32* %B.addr.02, align 4
132132 %inc = add nsw i64 %i.03, 1
172172 %mul2 = shl i64 %n, 1
173173 %sub = sub i64 %i.03, %mul2
174174 %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %sub
175 %0 = load i32* %arrayidx3, align 4
175 %0 = load i32, i32* %arrayidx3, align 4
176176 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
177177 store i32 %0, i32* %B.addr.02, align 4
178178 %inc = add nsw i64 %i.03, 1
217217 store i32 %conv, i32* %arrayidx, align 4
218218 %add2 = sub i64 %n, %i.03
219219 %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %add2
220 %0 = load i32* %arrayidx3, align 4
220 %0 = load i32, i32* %arrayidx3, align 4
221221 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
222222 store i32 %0, i32* %B.addr.02, align 4
223223 %inc = add nsw i64 %i.03, 1
263263 %sub2 = sub nsw i64 0, %i.03
264264 %sub3 = sub i64 %sub2, %n
265265 %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 %sub3
266 %0 = load i32* %arrayidx4, align 4
266 %0 = load i32, i32* %arrayidx4, align 4
267267 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
268268 store i32 %0, i32* %B.addr.02, align 4
269269 %inc = add nsw i64 %i.03, 1
309309 store i32 %conv, i32* %arrayidx, align 4
310310 %sub = sub i64 0, %i.03
311311 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub
312 %0 = load i32* %arrayidx2, align 4
312 %0 = load i32, i32* %arrayidx2, align 4
313313 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
314314 store i32 %0, i32* %B.addr.02, align 4
315315 %inc = add i64 %i.03, 1
358358 %add5 = add i64 %mul3, %mul4
359359 %add6 = add i64 %add5, 1
360360 %arrayidx7 = getelementptr inbounds i32, i32* %A, i64 %add6
361 %0 = load i32* %arrayidx7, align 4
361 %0 = load i32, i32* %arrayidx7, align 4
362362 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
363363 store i32 %0, i32* %B.addr.02, align 4
364364 %inc = add nsw i64 %i.03, 1
407407 %sub = add i64 %mul3, %0
408408 %add5 = add i64 %sub, 2
409409 %arrayidx6 = getelementptr inbounds i32, i32* %A, i64 %add5
410 %1 = load i32* %arrayidx6, align 4
410 %1 = load i32, i32* %arrayidx6, align 4
411411 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
412412 store i32 %1, i32* %B.addr.02, align 4
413413 %inc = add nsw i64 %i.03, 1
3434 %mul1 = mul i64 %i.03, %n
3535 %sub = sub i64 1, %mul1
3636 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub
37 %0 = load i32* %arrayidx2, align 4
37 %0 = load i32, i32* %arrayidx2, align 4
3838 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
3939 store i32 %0, i32* %B.addr.02, align 4
4040 %inc = add i64 %i.03, 1
7979 %add1 = add i64 %n, 1
8080 %sub = sub i64 %add1, %i.03
8181 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub
82 %0 = load i32* %arrayidx2, align 4
82 %0 = load i32, i32* %arrayidx2, align 4
8383 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
8484 store i32 %0, i32* %B.addr.02, align 4
8585 %inc = add i64 %i.03, 1
117117 store i32 %conv, i32* %arrayidx, align 4
118118 %sub = sub i64 6, %i.02
119119 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %sub
120 %0 = load i32* %arrayidx1, align 4
120 %0 = load i32, i32* %arrayidx1, align 4
121121 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
122122 store i32 %0, i32* %B.addr.01, align 4
123123 %inc = add i64 %i.02, 1
152152 store i32 %conv, i32* %arrayidx, align 4
153153 %sub = sub i64 6, %i.02
154154 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %sub
155 %0 = load i32* %arrayidx1, align 4
155 %0 = load i32, i32* %arrayidx1, align 4
156156 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
157157 store i32 %0, i32* %B.addr.01, align 4
158158 %inc = add i64 %i.02, 1
187187 store i32 %conv, i32* %arrayidx, align 4
188188 %sub = sub i64 -6, %i.02
189189 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %sub
190 %0 = load i32* %arrayidx1, align 4
190 %0 = load i32, i32* %arrayidx1, align 4
191191 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
192192 store i32 %0, i32* %B.addr.01, align 4
193193 %inc = add i64 %i.02, 1
228228 %0 = mul i64 %i.03, -3
229229 %sub = add i64 %0, 5
230230 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub
231 %1 = load i32* %arrayidx2, align 4
231 %1 = load i32, i32* %arrayidx2, align 4
232232 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
233233 store i32 %1, i32* %B.addr.02, align 4
234234 %inc = add i64 %i.03, 1
267267 store i32 %conv, i32* %arrayidx, align 4
268268 %sub = sub i64 5, %i.02
269269 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %sub
270 %0 = load i32* %arrayidx1, align 4
270 %0 = load i32, i32* %arrayidx1, align 4
271271 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
272272 store i32 %0, i32* %B.addr.01, align 4
273273 %inc = add i64 %i.02, 1
2828 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
2929 store i32 %conv, i32* %arrayidx, align 4
3030 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 10
31 %0 = load i32* %arrayidx1, align 4
31 %0 = load i32, i32* %arrayidx1, align 4
3232 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
3333 store i32 %0, i32* %B.addr.01, align 4
3434 %inc = add i64 %i.02, 1
6868 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
6969 store i32 %conv, i32* %arrayidx, align 4
7070 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 10
71 %0 = load i32* %arrayidx1, align 4
71 %0 = load i32, i32* %arrayidx1, align 4
7272 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
7373 store i32 %0, i32* %B.addr.02, align 4
7474 %inc = add i64 %i.03, 1
106106 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
107107 store i32 %conv, i32* %arrayidx, align 4
108108 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 10
109 %0 = load i32* %arrayidx1, align 4
109 %0 = load i32, i32* %arrayidx1, align 4
110110 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
111111 store i32 %0, i32* %B.addr.01, align 4
112112 %inc = add i64 %i.02, 1
141141 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
142142 store i32 %conv, i32* %arrayidx, align 4
143143 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 10
144 %0 = load i32* %arrayidx1, align 4
144 %0 = load i32, i32* %arrayidx1, align 4
145145 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
146146 store i32 %0, i32* %B.addr.01, align 4
147147 %inc = add i64 %i.02, 1
176176 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
177177 store i32 %conv, i32* %arrayidx, align 4
178178 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 10
179 %0 = load i32* %arrayidx1, align 4
179 %0 = load i32, i32* %arrayidx1, align 4
180180 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
181181 store i32 %0, i32* %B.addr.01, align 4
182182 %inc = add i64 %i.02, 1
211211 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
212212 store i32 %conv, i32* %arrayidx, align 4
213213 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 -10
214 %0 = load i32* %arrayidx1, align 4
214 %0 = load i32, i32* %arrayidx1, align 4
215215 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
216216 store i32 %0, i32* %B.addr.01, align 4
217217 %inc = add i64 %i.02, 1
250250 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
251251 store i32 %conv, i32* %arrayidx, align 4
252252 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 10
253 %0 = load i32* %arrayidx1, align 4
253 %0 = load i32, i32* %arrayidx1, align 4
254254 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
255255 store i32 %0, i32* %B.addr.02, align 4
256256 %inc = add i64 %i.03, 1
2828 %mul = shl i64 %i.02, 1
2929 %add = add i64 %mul, 10
3030 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
31 %0 = load i32* %arrayidx1, align 4
31 %0 = load i32, i32* %arrayidx1, align 4
3232 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
3333 store i32 %0, i32* %B.addr.01, align 4
3434 %inc = add i64 %i.02, 1
6868 %mul = mul i64 %i.03, %n
6969 %add = add i64 %mul, 10
7070 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
71 %0 = load i32* %arrayidx1, align 4
71 %0 = load i32, i32* %arrayidx1, align 4
7272 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
7373 store i32 %0, i32* %B.addr.02, align 4
7474 %inc = add i64 %i.03, 1
106106 store i32 %conv, i32* %arrayidx, align 4
107107 %mul = shl i64 %i.02, 1
108108 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %mul
109 %0 = load i32* %arrayidx1, align 4
109 %0 = load i32, i32* %arrayidx1, align 4
110110 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
111111 store i32 %0, i32* %B.addr.01, align 4
112112 %inc = add i64 %i.02, 1
141141 store i32 %conv, i32* %arrayidx, align 4
142142 %mul = shl i64 %i.02, 1
143143 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %mul
144 %0 = load i32* %arrayidx1, align 4
144 %0 = load i32, i32* %arrayidx1, align 4
145145 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
146146 store i32 %0, i32* %B.addr.01, align 4
147147 %inc = add i64 %i.02, 1
176176 store i32 %conv, i32* %arrayidx, align 4
177177 %mul = shl i64 %i.02, 1
178178 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %mul
179 %0 = load i32* %arrayidx1, align 4
179 %0 = load i32, i32* %arrayidx1, align 4
180180 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
181181 store i32 %0, i32* %B.addr.01, align 4
182182 %inc = add i64 %i.02, 1
211211 store i32 %conv, i32* %arrayidx, align 4
212212 %mul = shl i64 %i.02, 1
213213 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %mul
214 %0 = load i32* %arrayidx1, align 4
214 %0 = load i32, i32* %arrayidx1, align 4
215215 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
216216 store i32 %0, i32* %B.addr.01, align 4
217217 %inc = add i64 %i.02, 1
250250 store i32 %conv, i32* %arrayidx, align 4
251251 %mul = mul i64 %i.03, 3
252252 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %mul
253 %0 = load i32* %arrayidx1, align 4
253 %0 = load i32, i32* %arrayidx1, align 4
254254 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.02, i64 1
255255 store i32 %0, i32* %B.addr.02, align 4
256256 %inc = add i64 %i.03, 1
2222
2323 %add1 = add i64 %n, 1
2424 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %add1
25 %0 = load i32* %arrayidx2, align 4
25 %0 = load i32, i32* %arrayidx2, align 4
2626 store i32 %0, i32* %B, align 4
2727 ret void
2828 }
4545
4646 %add = add i64 %n, 1
4747 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
48 %0 = load i32* %arrayidx1, align 4
48 %0 = load i32, i32* %arrayidx1, align 4
4949 store i32 %0, i32* %B, align 4
5050 ret void
5151 }
6767 ; CHECK: da analyze - none!
6868
6969 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %m
70 %0 = load i32* %arrayidx1, align 4
70 %0 = load i32, i32* %arrayidx1, align 4
7171 store i32 %0, i32* %B, align 4
7272 ret void
7373 }
22 @g = internal global i32 0 ; [#uses=2]
33
44 define i32 @r() {
5 %tmp = load i32* @g ; [#uses=1]
5 %tmp = load i32, i32* @g ; [#uses=1]
66 ret i32 %tmp
77 }
88
88 ; CHECK-NEXT: ret i32 7
99 store i32 7, i32* %P
1010 store i32 12, i32* @X
11 %V = load i32* %P ; [#uses=1]
11 %V = load i32, i32* %P ; [#uses=1]
1212 ret i32 %V
1313 }
1313 ; CHECK-NEXT: ret i32 12
1414 store i32 12, i32* @X
1515 call double @doesnotmodX( double 1.000000e+00 ) ; :1 [#uses=0]
16 %V = load i32* @X ; [#uses=1]
16 %V = load i32, i32* @X ; [#uses=1]
1717 ret i32 %V
1818 }
1919
1111
1212 define i32 @test1(i32* %P) {
1313 ; CHECK: ret i32 0
14 %g1 = load i32** @G ; [#uses=2]
15 %h1 = load i32* %g1 ; [#uses=1]
14 %g1 = load i32*, i32** @G ; [#uses=2]
15 %h1 = load i32, i32* %g1 ; [#uses=1]
1616 store i32 123, i32* %P
17 %g2 = load i32** @G ; [#uses=0]
18 %h2 = load i32* %g1 ; [#uses=1]
17 %g2 = load i32*, i32** @G ; [#uses=0]
18 %h2 = load i32, i32* %g1 ; [#uses=1]
1919 %X = sub i32 %h1, %h2 ; [#uses=1]
2020 ret i32 %X
2121 }
88 ; CHECK-NEXT: ret i32 12
99 store i32 12, i32* @X
1010 call void @doesnotmodX( )
11 %V = load i32* @X ; [#uses=1]
11 %V = load i32, i32* @X ; [#uses=1]
1212 ret i32 %V
1313 }
1414
88 define void @bar(i8* %y, i8* %z) {
99 %x = alloca i8
1010 call void @foo(i8* %x, i8* %y)
11 %t = load i8* %x
11 %t = load i8, i8* %x
1212 store i8 %t, i8* %y
1313 ; CHECK: store i8 %t, i8* %y
1414 ret void
1818 define i32 @foo2() {
1919 %foo = alloca i32
2020 call void @bar2(i32* %foo)
21 %t0 = load i32* %foo, align 4
22 ; CHECK: %t0 = load i32* %foo, align 4
21 %t0 = load i32, i32* %foo, align 4
22 ; CHECK: %t0 = load i32, i32* %foo, align 4
2323 ret i32 %t0
2424 }
2525
2121 define i32 @main() nounwind uwtable ssp {
2222 main_entry:
2323 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* bitcast (%struct.anon* @b to i8*), i8* bitcast (%struct.anon* @a to i8*), i64 12, i32 4, i1 false)
24 %0 = load volatile i32* getelementptr inbounds (%struct.anon* @b, i64 0, i32 0), align 4
24 %0 = load volatile i32, i32* getelementptr inbounds (%struct.anon* @b, i64 0, i32 0), align 4
2525 store i32 %0, i32* @c, align 4
2626 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* bitcast (%struct.anon* @b to i8*), i8* bitcast (%struct.anon* @a to i8*), i64 12, i32 4, i1 false) nounwind
2727 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i32 %0) nounwind