llvm.org GIT mirror llvm / 198d8ba
[opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction One of several parallel first steps to remove the target type of pointers, replacing them with a single opaque pointer type. This adds an explicit type parameter to the gep instruction so that when the first parameter becomes an opaque pointer type, the type to gep through is still available to the instructions. * This doesn't modify gep operators, only instructions (operators will be handled separately) * Textual IR changes only. Bitcode (including upgrade) and changing the in-memory representation will be in separate changes. * geps of vectors are transformed as: getelementptr <4 x float*> %x, ... ->getelementptr float, <4 x float*> %x, ... Then, once the opaque pointer type is introduced, this will ultimately look like: getelementptr float, <4 x ptr> %x with the unambiguous interpretation that it is a vector of pointers to float. * address spaces remain on the pointer, not the type: getelementptr float addrspace(1)* %x ->getelementptr float, float addrspace(1)* %x Then, eventually: getelementptr float, ptr addrspace(1) %x Importantly, the massive amount of test case churn has been automated by same crappy python code. I had to manually update a few test cases that wouldn't fit the script's model (r228970,r229196,r229197,r229198). The python script just massages stdin and writes the result to stdout, I then wrapped that in a shell script to handle replacing files, then using the usual find+xargs to migrate all the files. update.py: import fileinput import sys import re ibrep = re.compile(r"(^.*?[^%\w]getelementptr inbounds )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") normrep = re.compile( r"(^.*?[^%\w]getelementptr )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") def conv(match, line): if not match: return line line = match.groups()[0] if len(match.groups()[5]) == 0: line += match.groups()[2] line += match.groups()[3] line += ", " line += match.groups()[1] line += "\n" return line for line in sys.stdin: if line.find("getelementptr ") == line.find("getelementptr inbounds"): if line.find("getelementptr inbounds") != line.find("getelementptr inbounds ("): line = conv(re.match(ibrep, line), line) elif line.find("getelementptr ") != line.find("getelementptr ("): line = conv(re.match(normrep, line), line) sys.stdout.write(line) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh After that, check-all (with llvm, clang, clang-tools-extra, lld, compiler-rt, and polly all checked out). The extra 'rm' in the apply.sh script is due to a few files in clang's test suite using interesting unicode stuff that my python script was throwing exceptions on. None of those files needed to be migrated, so it seemed sufficient to ignore those cases. Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7636 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230786 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 4 years ago
2277 changed file(s) with 42263 addition(s) and 42233 deletion(s). Raw diff Collapse all Expand all
54395439
54405440 bool InBounds = EatIfPresent(lltok::kw_inbounds);
54415441
5442 if (ParseTypeAndValue(Ptr, Loc, PFS)) return true;
5442 Type *Ty = nullptr;
5443 LocTy ExplicitTypeLoc = Lex.getLoc();
5444 if (ParseType(Ty) ||
5445 ParseToken(lltok::comma, "expected comma after getelementptr's type") ||
5446 ParseTypeAndValue(Ptr, Loc, PFS))
5447 return true;
5448
5449 Type *PtrTy = Ptr->getType();
5450 if (VectorType *VT = dyn_cast(PtrTy))
5451 PtrTy = VT->getElementType();
5452 if (Ty != cast(PtrTy)->getElementType())
5453 return Error(ExplicitTypeLoc,
5454 "explicit pointee type doesn't match operand's pointee type");
54435455
54445456 Type *BaseType = Ptr->getType();
54455457 PointerType *BasePointerType = dyn_cast(BaseType->getScalarType());
28972897 Out << ", ";
28982898 TypePrinter.print(I.getType(), Out);
28992899 } else if (Operand) { // Print the normal way.
2900 if (const GetElementPtrInst *GEP = dyn_cast(&I)) {
2901 Out << ' ';
2902 TypePrinter.print(GEP->getSourceElementType(), Out);
2903 Out << ',';
2904 }
29002905
29012906 // PrintAllTypes - Instructions who have operands of all the same type
29022907 // omit the type from all but the first operand. If the instruction has
1010 store i32 0, i32* %A
1111 %X = load i32* %A
1212 %B = bitcast i32* %A to i8*
13 %C = getelementptr i8* %B, i64 1
13 %C = getelementptr i8, i8* %B, i64 1
1414 store i8 1, i8* %C ; Aliases %A
1515 %Y.DONOTREMOVE = load i32* %A
1616 %Z = sub i32 %X, %Y.DONOTREMOVE
0 ; RUN: opt < %s -basicaa -aa-eval -disable-output 2>/dev/null
11 ; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
22 define void @test({[2 x i32],[2 x i32]}* %A, i64 %X, i64 %Y) {
3 %P1 = getelementptr {[2 x i32],[2 x i32]}* %A, i64 0, i32 0, i64 %X
4 %P2 = getelementptr {[2 x i32],[2 x i32]}* %A, i64 0, i32 1, i64 %Y
3 %P1 = getelementptr {[2 x i32],[2 x i32]}, {[2 x i32],[2 x i32]}* %A, i64 0, i32 0, i64 %X
4 %P2 = getelementptr {[2 x i32],[2 x i32]}, {[2 x i32],[2 x i32]}* %A, i64 0, i32 1, i64 %Y
55 ret void
66 }
33
44 define i32 @test(i32 *%Ptr, i64 %V) {
55 ; CHECK: sub i32 %X, %Y
6 %P2 = getelementptr i32* %Ptr, i64 1
7 %P1 = getelementptr i32* %Ptr, i64 %V
6 %P2 = getelementptr i32, i32* %Ptr, i64 1
7 %P1 = getelementptr i32, i32* %Ptr, i64 %V
88 %X = load i32* %P1
99 store i32 5, i32* %P2
1010 %Y = load i32* %P1
0 ; RUN: opt < %s -basicaa -aa-eval -disable-output 2>/dev/null
11 ; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
22 define void @test([17 x i16]* %mask_bits) {
3 %P1 = getelementptr [17 x i16]* %mask_bits, i64 0, i64 0
4 %P2 = getelementptr [17 x i16]* %mask_bits, i64 252645134, i64 0
3 %P1 = getelementptr [17 x i16], [17 x i16]* %mask_bits, i64 0, i64 0
4 %P2 = getelementptr [17 x i16], [17 x i16]* %mask_bits, i64 252645134, i64 0
55 ret void
66 }
55 br label %loopentry
66
77 loopentry: ; preds = %0, %no_exit
8 %tmp.101 = getelementptr %struct..apr_table_t* %t.1, i64 0, i32 0, i32 2
8 %tmp.101 = getelementptr %struct..apr_table_t, %struct..apr_table_t* %t.1, i64 0, i32 0, i32 2
99 %tmp.11 = load i32* %tmp.101 ; [#uses=0]
1010 br i1 false, label %no_exit, label %UnifiedExitNode
1111
1212 no_exit: ; preds = %loopentry
1313 %tmp.25 = sext i32 0 to i64 ; [#uses=1]
14 %tmp.261 = getelementptr %struct..apr_table_t* %t.1, i64 0, i32 3, i64 %tmp.25 ; [#uses=1]
14 %tmp.261 = getelementptr %struct..apr_table_t, %struct..apr_table_t* %t.1, i64 0, i32 3, i64 %tmp.25 ; [#uses=1]
1515 store i32 0, i32* %tmp.261
1616 br label %loopentry
1717
0 ; RUN: opt < %s -basicaa -aa-eval -disable-output 2>/dev/null
11
22 define i32 @MTConcat([3 x i32]* %a.1) {
3 %tmp.961 = getelementptr [3 x i32]* %a.1, i64 0, i64 4
3 %tmp.961 = getelementptr [3 x i32], [3 x i32]* %a.1, i64 0, i64 4
44 %tmp.97 = load i32* %tmp.961
5 %tmp.119 = getelementptr [3 x i32]* %a.1, i64 1, i64 0
5 %tmp.119 = getelementptr [3 x i32], [3 x i32]* %a.1, i64 1, i64 0
66 %tmp.120 = load i32* %tmp.119
7 %tmp.1541 = getelementptr [3 x i32]* %a.1, i64 0, i64 4
7 %tmp.1541 = getelementptr [3 x i32], [3 x i32]* %a.1, i64 0, i64 4
88 %tmp.155 = load i32* %tmp.1541
99 ret i32 0
1010 }
33 %struct..RefRect = type { %struct..RefPoint, %struct..RefPoint }
44
55 define i32 @BMT_CommitPartDrawObj() {
6 %tmp.19111 = getelementptr %struct..RefRect* null, i64 0, i32 0, i32 1, i32 2
7 %tmp.20311 = getelementptr %struct..RefRect* null, i64 0, i32 1, i32 1, i32 2
6 %tmp.19111 = getelementptr %struct..RefRect, %struct..RefRect* null, i64 0, i32 0, i32 1, i32 2
7 %tmp.20311 = getelementptr %struct..RefRect, %struct..RefRect* null, i64 0, i32 1, i32 1, i32 2
88 ret i32 0
99 }
1010 ; CHECK-NOT: MayAlias:
1111
1212 define void @test(%T* %P) {
13 %A = getelementptr %T* %P, i64 0
14 %B = getelementptr %T* %P, i64 0, i32 0
15 %C = getelementptr %T* %P, i64 0, i32 1
16 %D = getelementptr %T* %P, i64 0, i32 1, i64 0
17 %E = getelementptr %T* %P, i64 0, i32 1, i64 5
13 %A = getelementptr %T, %T* %P, i64 0
14 %B = getelementptr %T, %T* %P, i64 0, i32 0
15 %C = getelementptr %T, %T* %P, i64 0, i32 1
16 %D = getelementptr %T, %T* %P, i64 0, i32 1, i64 0
17 %E = getelementptr %T, %T* %P, i64 0, i32 1, i64 5
1818 ret void
1919 }
1212 ; CHECK-NOT: MayAlias:
1313
1414 define void @test() {
15 %D = getelementptr %T* @G, i64 0, i32 0
16 %E = getelementptr %T* @G, i64 0, i32 1, i64 5
17 %F = getelementptr i32* getelementptr (%T* @G, i64 0, i32 0), i64 0
18 %X = getelementptr [10 x i8]* getelementptr (%T* @G, i64 0, i32 1), i64 0, i64 5
15 %D = getelementptr %T, %T* @G, i64 0, i32 0
16 %E = getelementptr %T, %T* @G, i64 0, i32 1, i64 5
17 %F = getelementptr i32, i32* getelementptr (%T* @G, i64 0, i32 0), i64 0
18 %X = getelementptr [10 x i8], [10 x i8]* getelementptr (%T* @G, i64 0, i32 1), i64 0, i64 5
1919
2020 ret void
2121 }
11
22 define void @test({i32,i32 }* %P) {
33 ; CHECK: store i32 0, i32* %X
4 %Q = getelementptr {i32,i32}* %P, i32 1
5 %X = getelementptr {i32,i32}* %Q, i32 0, i32 1
6 %Y = getelementptr {i32,i32}* %Q, i32 1, i32 1
4 %Q = getelementptr {i32,i32}, {i32,i32}* %P, i32 1
5 %X = getelementptr {i32,i32}, {i32,i32}* %Q, i32 0, i32 1
6 %Y = getelementptr {i32,i32}, {i32,i32}* %Q, i32 1, i32 1
77 store i32 0, i32* %X
88 store i32 1, i32* %Y
99 ret void
1111
1212 no_exit: ; preds = %no_exit, %entry
1313 %i.0.0 = phi i32 [ 0, %entry ], [ %inc, %no_exit ] ; [#uses=2]
14 %tmp.6 = getelementptr [3 x [3 x i32]]* %X, i32 0, i32 0, i32 %i.0.0 ; [#uses=1]
14 %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
16 %tmp.8 = getelementptr [3 x [3 x i32]]* %X, i32 0, i32 0, i32 0 ; [#uses=1]
16 %tmp.8 = getelementptr [3 x [3 x i32]], [3 x [3 x i32]]* %X, i32 0, i32 0, i32 0 ; [#uses=1]
1717 %tmp.9 = load i32* %tmp.8 ; [#uses=1]
18 %tmp.11 = getelementptr [3 x [3 x i32]]* %X, i32 0, i32 1, i32 0 ; [#uses=1]
18 %tmp.11 = getelementptr [3 x [3 x i32]], [3 x [3 x i32]]* %X, i32 0, i32 1, i32 0 ; [#uses=1]
1919 %tmp.12 = load 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]
2424
2525 loopexit: ; preds = %no_exit, %entry
2626 %Y.0.1 = phi i32 [ 0, %entry ], [ %tmp.13, %no_exit ] ; [#uses=1]
27 %tmp.4 = getelementptr [3 x [3 x i32]]* %X, i32 0, i32 0 ; <[3 x i32]*> [#uses=1]
27 %tmp.4 = getelementptr [3 x [3 x i32]], [3 x [3 x i32]]* %X, i32 0, i32 0 ; <[3 x i32]*> [#uses=1]
2828 %tmp.15 = call i32 (...)* @foo( [3 x i32]* %tmp.4, i32 %Y.0.1 ) ; [#uses=0]
2929 ret void
3030 }
2121 ret void
2222
2323 cond_false277.i: ; preds = %bb239.i
24 %tmp1062.i = getelementptr [2 x <4 x i32>]* null, i32 0, i32 1 ; <<4 x i32>*> [#uses=1]
24 %tmp1062.i = getelementptr [2 x <4 x i32>], [2 x <4 x i32>]* null, i32 0, i32 1 ; <<4 x i32>*> [#uses=1]
2525 store <4 x i32> zeroinitializer, <4 x i32>* %tmp1062.i
2626 br i1 false, label %cond_true1032.i, label %cond_false1063.i85
2727
3232 ret void
3333
3434 cond_true1032.i: ; preds = %cond_false277.i
35 %tmp1187.i = getelementptr [2 x <4 x i32>]* null, i32 0, i32 0, i32 7 ; [#uses=1]
35 %tmp1187.i = getelementptr [2 x <4 x i32>], [2 x <4 x i32>]* null, i32 0, i32 0, i32 7 ; [#uses=1]
3636 store i32 0, i32* %tmp1187.i
3737 br label %bb2037.i
3838
2020 ; CHECK: ret i32 %Z
2121
2222 define i32 @test(%struct.closure_type* %tmp18169) {
23 %tmp18174 = getelementptr %struct.closure_type* %tmp18169, i32 0, i32 4, i32 0, i32 0 ; [#uses=2]
23 %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]
2525 %A = load i32* %tmp18174 ; [#uses=1]
2626
27 %tmp18272 = getelementptr %struct.STYLE* %tmp18269, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
27 %tmp18272 = getelementptr %struct.STYLE, %struct.STYLE* %tmp18269, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
2828 store i16 123, i16* %tmp18272
2929
3030 %Q = load i32* %tmp18174 ; [#uses=1]
77 ; CHECK: 6 partial alias responses
88
99 define void @foo(i32* noalias %p, i32* noalias %q, i32 %i, i32 %j) {
10 %Ipointer = getelementptr i32* %p, i32 %i
11 %qi = getelementptr i32* %q, i32 %i
12 %Jpointer = getelementptr i32* %p, i32 %j
13 %qj = getelementptr i32* %q, i32 %j
10 %Ipointer = getelementptr i32, i32* %p, i32 %i
11 %qi = getelementptr i32, i32* %q, i32 %i
12 %Jpointer = getelementptr i32, i32* %p, i32 %j
13 %qj = getelementptr i32, i32* %q, i32 %j
1414 store i32 0, i32* %p
1515 store i32 0, i32* %Ipointer
1616 store i32 0, i32* %Jpointer
88 ; CHECK: ret i32 %tmp7
99 entry:
1010 store i32 1, i32* getelementptr (%struct.B* @a, i32 0, i32 0, i32 0), align 8
11 %tmp4 = getelementptr %struct.A* %b, i32 0, i32 0 ; [#uses=1]
11 %tmp4 = getelementptr %struct.A, %struct.A* %b, i32 0, i32 0 ; [#uses=1]
1212 store i32 0, i32* %tmp4, align 4
1313 %tmp7 = load i32* getelementptr (%struct.B* @a, i32 0, i32 0, i32 0), align 8 ; [#uses=1]
1414 ret i32 %tmp7
1313
1414 define i32 @uhci_suspend(%struct.usb_hcd* %hcd) {
1515 entry:
16 %tmp17 = getelementptr %struct.usb_hcd* %hcd, i32 0, i32 2, i64 1
16 %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]
1919 %tmp19 = load i32* %tmp1718, align 4 ; [#uses=0]
2020 br i1 false, label %cond_true34, label %done_okay
2121
2222 cond_true34: ; preds = %entry
23 %tmp631 = getelementptr %struct.usb_hcd* %hcd, i32 0, i32 2, i64
23 %tmp631 = getelementptr %struct.usb_hcd, %struct.usb_hcd* %hcd, i32 0, i32 2, i64
2424 2305843009213693950 ; [#uses=1]
2525 %tmp70 = bitcast i64* %tmp631 to %struct.device**
2626
1212
1313 define i32 @ehci_pci_setup(%struct.usb_hcd* %hcd) {
1414 entry:
15 %tmp14 = getelementptr %struct.usb_hcd* %hcd, i32 0, i32 0, i32 0 ; <%struct.device**> [#uses=1]
15 %tmp14 = getelementptr %struct.usb_hcd, %struct.usb_hcd* %hcd, i32 0, i32 0, i32 0 ; <%struct.device**> [#uses=1]
1616 %tmp15 = load %struct.device** %tmp14, align 8 ; <%struct.device*> [#uses=0]
1717 br i1 false, label %bb25, label %return
1818
2020 br i1 false, label %cond_true, label %return
2121
2222 cond_true: ; preds = %bb25
23 %tmp601 = getelementptr %struct.usb_hcd* %hcd, i32 0, i32 1, i64 2305843009213693951 ; [#uses=1]
23 %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]
2525 %tmp68 = load %struct.device** %tmp67, align 8 ; <%struct.device*> [#uses=0]
2626 ret i32 undef
66 define void @foo(%struct.x* byval align 4 %X) nounwind {
77 ; CHECK: store i32 2, i32* %tmp1
88 entry:
9 %tmp = getelementptr %struct.x* %X, i32 0, i32 0 ; <[4 x i32]*> [#uses=1]
10 %tmp1 = getelementptr [4 x i32]* %tmp, i32 0, i32 3 ; *> [#uses=1]
9 %tmp = getelementptr %struct.x, %struct.x* %X, i32 0, i32 0 ; <[4 x i32]*> [#uses=1]
10 %tmp1 = getelementptr [4 x i32], [4 x i32]* %tmp, i32 0, i32 3 ; [#uses=1]
1111 store i32 2, i32* %tmp1, align 4
1212 %tmp2 = call i32 (...)* @bar( %struct.x* byval align 4 %X ) nounwind ; [#uses=0]
1313 br label %return
55 ; CHECK: load i32* %a
66 %a = call i32* @noalias()
77 store i32 1, i32* %a
8 %b = getelementptr i32* %a, i32 %x
8 %b = getelementptr i32, i32* %a, i32 %x
99 store i32 2, i32* %b
1010
1111 %c = load i32* %a
11 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
22
33 define i8 @foo(i8* %ptr) {
4 %P = getelementptr i8* %ptr, i32 0
5 %Q = getelementptr i8* %ptr, i32 1
4 %P = getelementptr i8, i8* %ptr, i32 0
5 %Q = getelementptr i8, i8* %ptr, i32 1
66 ; CHECK: getelementptr
77 %X = load i8* %P
88 %Y = atomicrmw add i8* %Q, i8 1 monotonic
1414 br i1 %tmp, label %bb, label %bb1
1515
1616 bb:
17 %b = getelementptr i32* %a, i32 0
17 %b = getelementptr i32, i32* %a, i32 0
1818 br label %bb2
1919
2020 bb1:
77 define i32 @test(i32* %tab, i32 %indvar) nounwind {
88 %tmp31 = mul i32 %indvar, -2
99 %tmp32 = add i32 %tmp31, 30
10 %t.5 = getelementptr i32* %tab, i32 %tmp32
10 %t.5 = getelementptr i32, i32* %tab, i32 %tmp32
1111 %loada = load i32* %tab
1212 store i32 0, i32* %t.5
1313 %loadb = load i32* %tab
99
1010 define i32 @main() {
1111 %t = alloca %struct.foo, align 4
12 %1 = getelementptr inbounds %struct.foo* %t, i32 0, i32 0
12 %1 = getelementptr inbounds %struct.foo, %struct.foo* %t, i32 0, i32 0
1313 store i32 1, i32* %1, align 4
14 %2 = getelementptr inbounds %struct.foo* %t, i64 1
14 %2 = getelementptr inbounds %struct.foo, %struct.foo* %t, i64 1
1515 %3 = bitcast %struct.foo* %2 to i8*
16 %4 = getelementptr inbounds i8* %3, i32 -1
16 %4 = getelementptr inbounds i8, i8* %3, i32 -1
1717 store i8 0, i8* %4
18 %5 = getelementptr inbounds i8* %4, i32 -1
18 %5 = getelementptr inbounds i8, i8* %4, i32 -1
1919 store i8 0, i8* %5
20 %6 = getelementptr inbounds i8* %5, i32 -1
20 %6 = getelementptr inbounds i8, i8* %5, i32 -1
2121 store i8 0, i8* %6
22 %7 = getelementptr inbounds i8* %6, i32 -1
22 %7 = getelementptr inbounds i8, i8* %6, i32 -1
2323 store i8 0, i8* %7
24 %8 = getelementptr inbounds i8* %7, i32 -1
24 %8 = getelementptr inbounds i8, i8* %7, i32 -1
2525 store i8 0, i8* %8
26 %9 = getelementptr inbounds i8* %8, i32 -1
26 %9 = getelementptr inbounds i8, i8* %8, i32 -1
2727 store i8 0, i8* %9
28 %10 = getelementptr inbounds i8* %9, i32 -1
28 %10 = getelementptr inbounds i8, i8* %9, i32 -1
2929 store i8 0, i8* %10
30 %11 = getelementptr inbounds i8* %10, i32 -1
30 %11 = getelementptr inbounds i8, i8* %10, i32 -1
3131 store i8 0, i8* %11
3232 %12 = load i32* %1, align 4
3333 ret i32 %12
66 define i32 @foo(%struct.x* byval %a) nounwind {
77 ; CHECK: ret i32 1
88 %tmp1 = tail call i32 (...)* @bar( %struct.x* %a ) nounwind ; [#uses=0]
9 %tmp2 = getelementptr %struct.x* %a, i32 0, i32 0 ; [#uses=2]
9 %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
1212 %tmp4 = load i32* %tmp2, align 4 ; [#uses=1]
1010
1111 define void @foo([3 x [3 x double]]* noalias %p) {
1212 entry:
13 %p3 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 0, i64 3
13 %p3 = getelementptr [3 x [3 x double]], [3 x [3 x double]]* %p, i64 0, i64 0, i64 3
1414 br label %loop
1515
1616 loop:
1717 %i = phi i64 [ 0, %entry ], [ %i.next, %loop ]
1818
19 %p.0.i.0 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 %i, i64 0
19 %p.0.i.0 = getelementptr [3 x [3 x double]], [3 x [3 x double]]* %p, i64 0, i64 %i, i64 0
2020
2121 store volatile double 0.0, double* %p3
2222 store volatile double 0.1, double* %p.0.i.0
1111
1212 define <8 x i16> @test1(i8* %p, <8 x i16> %y) {
1313 entry:
14 %q = getelementptr i8* %p, i64 16
14 %q = getelementptr i8, i8* %p, i64 16
1515 %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16(i8* %p, i32 16) nounwind
1616 call void @llvm.arm.neon.vst1.v8i16(i8* %q, <8 x i16> %y, i32 16)
1717 %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16(i8* %p, i32 16) nounwind
6969
7070 define void @test2b(i8* noalias %P, i8* noalias %Q) nounwind ssp {
7171 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
72 %R = getelementptr i8* %P, i64 12
72 %R = getelementptr i8, i8* %P, i64 12
7373 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i32 1, i1 false)
7474 ret void
7575
9090
9191 define void @test2c(i8* noalias %P, i8* noalias %Q) nounwind ssp {
9292 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
93 %R = getelementptr i8* %P, i64 11
93 %R = getelementptr i8, i8* %P, i64 11
9494 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i32 1, i1 false)
9595 ret void
9696
111111
112112 define void @test2d(i8* noalias %P, i8* noalias %Q) nounwind ssp {
113113 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
114 %R = getelementptr i8* %P, i64 -12
114 %R = getelementptr i8, i8* %P, i64 -12
115115 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i32 1, i1 false)
116116 ret void
117117
132132
133133 define void @test2e(i8* noalias %P, i8* noalias %Q) nounwind ssp {
134134 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
135 %R = getelementptr i8* %P, i64 -11
135 %R = getelementptr i8, i8* %P, i64 -11
136136 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i32 1, i1 false)
137137 ret void
138138
1717 call void @external(i32* %Array1)
1818 call void @external(i32* %Array2)
1919
20 %pointer = getelementptr i32* %Array1, i64 %A
20 %pointer = getelementptr i32, i32* %Array1, i64 %A
2121 %val = load i32* %pointer
2222
23 %pointer2 = getelementptr i32* %Array2, i64 %B
23 %pointer2 = getelementptr i32, i32* %Array2, i64 %B
2424 store i32 7, i32* %pointer2
2525
2626 %REMOVE = load i32* %pointer ; redundant with above load
3737 %Array = alloca i32, i32 100
3838 call void @external(i32* %Array)
3939
40 %P1 = getelementptr i32* %Array, i64 7
41 %P2 = getelementptr i32* %Array, i64 6
40 %P1 = getelementptr i32, i32* %Array, i64 7
41 %P2 = getelementptr i32, i32* %Array, i64 6
4242
4343 %A = load i32* %P1
4444 store i32 1, i32* %P2 ; Should not invalidate load
5353 ; they cannot alias.
5454 define i32 @gep_distance_test(i32* %A) {
5555 %REMOVEu = load i32* %A
56 %B = getelementptr i32* %A, i64 2 ; Cannot alias A
56 %B = getelementptr i32, i32* %A, i64 2 ; Cannot alias A
5757 store i32 7, i32* %B
5858 %REMOVEv = load i32* %A
5959 %r = sub i32 %REMOVEu, %REMOVEv
6565 ; Test that if two pointers are spaced out by a constant offset, that they
6666 ; cannot alias, even if there is a variable offset between them...
6767 define i32 @gep_distance_test2({i32,i32}* %A, i64 %distance) {
68 %A1 = getelementptr {i32,i32}* %A, i64 0, i32 0
68 %A1 = getelementptr {i32,i32}, {i32,i32}* %A, i64 0, i32 0
6969 %REMOVEu = load i32* %A1
70 %B = getelementptr {i32,i32}* %A, i64 %distance, i32 1
70 %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
7272 %REMOVEv = load i32* %A1
7373 %r = sub i32 %REMOVEu, %REMOVEv
8181 define i32 @gep_distance_test3(i32 * %A) {
8282 %X = load i32* %A
8383 %B = bitcast i32* %A to i8*
84 %C = getelementptr i8* %B, i64 4
84 %C = getelementptr i8, i8* %B, i64 4
8585 store i8 42, i8* %C
8686 %Y = load i32* %A
8787 %R = sub i32 %X, %Y
111111 define i16 @zext_sext_confusion(i16* %row2col, i5 %j) nounwind{
112112 entry:
113113 %sum5.cast = zext i5 %j to i64 ; [#uses=1]
114 %P1 = getelementptr i16* %row2col, i64 %sum5.cast
114 %P1 = getelementptr i16, i16* %row2col, i64 %sum5.cast
115115 %row2col.load.1.2 = load 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]
119 %P2 = getelementptr i16* %row2col, i64 %sum13.cast
119 %P2 = getelementptr i16, i16* %row2col, i64 %sum13.cast
120120 %row2col.load.1.6 = load i16* %P2, align 1 ; [#uses=1]
121121
122122 %.ret = sub i16 %row2col.load.1.6, %row2col.load.1.2 ; [#uses=1]
1717 ; CHECK: ret i32 0
1818 entry:
1919 %u = alloca %union.anon, align 8
20 %tmp9 = getelementptr inbounds %union.anon* %u, i64 0, i32 0
20 %tmp9 = getelementptr inbounds %union.anon, %union.anon* %u, i64 0, i32 0
2121 store double %x, double* %tmp9, align 8, !tbaa !0
2222 %tmp2 = load 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]*
25 %arrayidx = getelementptr inbounds [2 x i32]* %tmp4, i64 0, i64 %idxprom
25 %arrayidx = getelementptr inbounds [2 x i32], [2 x i32]* %tmp4, i64 0, i64 %idxprom
2626 %tmp5 = load i32* %arrayidx, align 4, !tbaa !3
2727 %tmp5.lobit = lshr i32 %tmp5, 31
2828 ret i32 %tmp5.lobit
55 define i32 @test1(i8 * %P) {
66 entry:
77 %Q = bitcast i8* %P to {i32, i32}*
8 %R = getelementptr {i32, i32}* %Q, i32 0, i32 1
8 %R = getelementptr {i32, i32}, {i32, i32}* %Q, i32 0, i32 1
99 %S = load i32* %R
1010
1111 %q = bitcast i8* %P to {i32, i32}*
12 %r = getelementptr {i32, i32}* %q, i32 0, i32 1
12 %r = getelementptr {i32, i32}, {i32, i32}* %q, i32 0, i32 1
1313 %s = load i32* %r
1414
1515 %t = sub i32 %S, %s
2121 define i32 @test2(i8 * %P) {
2222 entry:
2323 %Q = bitcast i8* %P to {i32, i32, i32}*
24 %R = getelementptr {i32, i32, i32}* %Q, i32 0, i32 1
24 %R = getelementptr {i32, i32, i32}, {i32, i32, i32}* %Q, i32 0, i32 1
2525 %S = load i32* %R
2626
27 %r = getelementptr {i32, i32, i32}* %Q, i32 0, i32 2
27 %r = getelementptr {i32, i32, i32}, {i32, i32, i32}* %Q, i32 0, i32 2
2828 store i32 42, i32* %r
2929
3030 %s = load i32* %R
3939 ; This was a miscompilation.
4040 define i32 @test3({float, {i32, i32, i32}}* %P) {
4141 entry:
42 %P2 = getelementptr {float, {i32, i32, i32}}* %P, i32 0, i32 1
43 %R = getelementptr {i32, i32, i32}* %P2, i32 0, i32 1
42 %P2 = getelementptr {float, {i32, i32, i32}}, {float, {i32, i32, i32}}* %P, i32 0, i32 1
43 %R = getelementptr {i32, i32, i32}, {i32, i32, i32}* %P2, i32 0, i32 1
4444 %S = load i32* %R
4545
46 %r = getelementptr {i32, i32, i32}* %P2, i32 0, i32 2
46 %r = getelementptr {i32, i32, i32}, {i32, i32, i32}* %P2, i32 0, i32 2
4747 store i32 42, i32* %r
4848
4949 %s = load i32* %R
6161
6262 define i32 @test4(%SmallPtrSet64* %P) {
6363 entry:
64 %tmp2 = getelementptr inbounds %SmallPtrSet64* %P, i64 0, i32 0, i32 1
64 %tmp2 = getelementptr inbounds %SmallPtrSet64, %SmallPtrSet64* %P, i64 0, i32 0, i32 1
6565 store i32 64, i32* %tmp2, align 8
66 %tmp3 = getelementptr inbounds %SmallPtrSet64* %P, i64 0, i32 0, i32 4, i64 64
66 %tmp3 = getelementptr inbounds %SmallPtrSet64, %SmallPtrSet64* %P, i64 0, i32 0, i32 4, i64 64
6767 store i8* null, i8** %tmp3, align 8
6868 %tmp4 = load i32* %tmp2, align 8
6969 ret i32 %tmp4
7373
7474 ; P[i] != p[i+1]
7575 define i32 @test5(i32* %p, i64 %i) {
76 %pi = getelementptr i32* %p, i64 %i
76 %pi = getelementptr i32, i32* %p, i64 %i
7777 %i.next = add i64 %i, 1
78 %pi.next = getelementptr i32* %p, i64 %i.next
78 %pi.next = getelementptr i32, i32* %p, i64 %i.next
7979 %x = load i32* %pi
8080 store i32 42, i32* %pi.next
8181 %y = load i32* %pi
8686 }
8787
8888 define i32 @test5_as1_smaller_size(i32 addrspace(1)* %p, i8 %i) {
89 %pi = getelementptr i32 addrspace(1)* %p, i8 %i
89 %pi = getelementptr i32, i32 addrspace(1)* %p, i8 %i
9090 %i.next = add i8 %i, 1
91 %pi.next = getelementptr i32 addrspace(1)* %p, i8 %i.next
91 %pi.next = getelementptr i32, i32 addrspace(1)* %p, i8 %i.next
9292 %x = load i32 addrspace(1)* %pi
9393 store i32 42, i32 addrspace(1)* %pi.next
9494 %y = load i32 addrspace(1)* %pi
100100 }
101101
102102 define i32 @test5_as1_same_size(i32 addrspace(1)* %p, i16 %i) {
103 %pi = getelementptr i32 addrspace(1)* %p, i16 %i
103 %pi = getelementptr i32, i32 addrspace(1)* %p, i16 %i
104104 %i.next = add i16 %i, 1
105 %pi.next = getelementptr i32 addrspace(1)* %p, i16 %i.next
105 %pi.next = getelementptr i32, i32 addrspace(1)* %p, i16 %i.next
106106 %x = load i32 addrspace(1)* %pi
107107 store i32 42, i32 addrspace(1)* %pi.next
108108 %y = load i32 addrspace(1)* %pi
115115 ; P[i] != p[(i*4)|1]
116116 define i32 @test6(i32* %p, i64 %i1) {
117117 %i = shl i64 %i1, 2
118 %pi = getelementptr i32* %p, i64 %i
118 %pi = getelementptr i32, i32* %p, i64 %i
119119 %i.next = or i64 %i, 1
120 %pi.next = getelementptr i32* %p, i64 %i.next
120 %pi.next = getelementptr i32, i32* %p, i64 %i.next
121121 %x = load i32* %pi
122122 store i32 42, i32* %pi.next
123123 %y = load i32* %pi
129129
130130 ; P[1] != P[i*4]
131131 define i32 @test7(i32* %p, i64 %i) {
132 %pi = getelementptr i32* %p, i64 1
132 %pi = getelementptr i32, i32* %p, i64 1
133133 %i.next = shl i64 %i, 2
134 %pi.next = getelementptr i32* %p, i64 %i.next
134 %pi.next = getelementptr i32, i32* %p, i64 %i.next
135135 %x = load i32* %pi
136136 store i32 42, i32* %pi.next
137137 %y = load i32* %pi
145145 ; PR1143
146146 define i32 @test8(i32* %p, i16 %i) {
147147 %i1 = zext i16 %i to i32
148 %pi = getelementptr i32* %p, i32 %i1
148 %pi = getelementptr i32, i32* %p, i32 %i1
149149 %i.next = add i16 %i, 1
150150 %i.next2 = zext i16 %i.next to i32
151 %pi.next = getelementptr i32* %p, i32 %i.next2
151 %pi.next = getelementptr i32, i32* %p, i32 %i.next2
152152 %x = load i32* %pi
153153 store i32 42, i32* %pi.next
154154 %y = load i32* %pi
162162 %i2 = shl i32 %i, 2
163163 %i3 = add i32 %i2, 1
164164 ; P2 = P + 1 + 4*i
165 %P2 = getelementptr [4 x i8] *%P, i32 0, i32 %i3
165 %P2 = getelementptr [4 x i8], [4 x i8] *%P, i32 0, i32 %i3
166166
167167 %j2 = shl i32 %j, 2
168168
169169 ; P4 = P + 4*j
170 %P4 = getelementptr [4 x i8]* %P, i32 0, i32 %j2
170 %P4 = getelementptr [4 x i8], [4 x i8]* %P, i32 0, i32 %j2
171171
172172 %x = load i8* %P2
173173 store i8 42, i8* %P4
182182 %i2 = shl i32 %i, 2
183183 %i3 = add i32 %i2, 4
184184 ; P2 = P + 4 + 4*i
185 %P2 = getelementptr [4 x i8] *%P, i32 0, i32 %i3
185 %P2 = getelementptr [4 x i8], [4 x i8] *%P, i32 0, i32 %i3
186186
187187 ; P4 = P + 4*i
188 %P4 = getelementptr [4 x i8]* %P, i32 0, i32 %i2
188 %P4 = getelementptr [4 x i8], [4 x i8]* %P, i32 0, i32 %i2
189189
190190 %x = load i8* %P2
191191 store i8 42, i8* %P4
200200 define float @test11(i32 %indvar, [4 x [2 x float]]* %q) nounwind ssp {
201201 %tmp = mul i32 %indvar, -1
202202 %dec = add i32 %tmp, 3
203 %scevgep = getelementptr [4 x [2 x float]]* %q, i32 0, i32 %dec
203 %scevgep = getelementptr [4 x [2 x float]], [4 x [2 x float]]* %q, i32 0, i32 %dec
204204 %scevgep35 = bitcast [2 x float]* %scevgep to i64*
205 %arrayidx28 = getelementptr inbounds [4 x [2 x float]]* %q, i32 0, i32 0
206 %y29 = getelementptr inbounds [2 x float]* %arrayidx28, i32 0, i32 1
205 %arrayidx28 = getelementptr inbounds [4 x [2 x float]], [4 x [2 x float]]* %q, i32 0, i32 0
206 %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
209209 %tmp30 = load float* %y29, align 4
215215 ; (This was a miscompilation.)
216216 define i32 @test12(i32 %x, i32 %y, i8* %p) nounwind {
217217 %a = bitcast i8* %p to [13 x i8]*
218 %b = getelementptr [13 x i8]* %a, i32 %x
218 %b = getelementptr [13 x i8], [13 x i8]* %a, i32 %x
219219 %c = bitcast [13 x i8]* %b to [15 x i8]*
220 %d = getelementptr [15 x i8]* %c, i32 %y, i32 8
220 %d = getelementptr [15 x i8], [15 x i8]* %c, i32 %y, i32 8
221221 %castd = bitcast i8* %d to i32*
222222 %castp = bitcast i8* %p to i32*
223223 store i32 1, i32* %castp
3434 ; CHECK-LABEL: @test2(
3535 define i8 @test2(i32 %tmp79, i32 %w.2, i32 %indvar89) nounwind {
3636 %tmp92 = add i32 %tmp79, %indvar89
37 %arrayidx412 = getelementptr [0 x i8]* @window, i32 0, i32 %tmp92
37 %arrayidx412 = getelementptr [0 x i8], [0 x i8]* @window, i32 0, i32 %tmp92
3838 %tmp93 = add i32 %w.2, %indvar89
39 %arrayidx416 = getelementptr [0 x i8]* @window, i32 0, i32 %tmp93
39 %arrayidx416 = getelementptr [0 x i8], [0 x i8]* @window, i32 0, i32 %tmp93
4040
4141 %A = load i8* %arrayidx412, align 1
4242 store i8 4, i8* %arrayidx416, align 1
2020
2121 ; CHECK: define <8 x i16> @test1(i8* %p, <8 x i16> %y) {
2222 ; CHECK-NEXT: entry:
23 ; CHECK-NEXT: %q = getelementptr i8* %p, i64 16
23 ; CHECK-NEXT: %q = getelementptr i8, i8* %p, i64 16
2424 ; CHECK-NEXT: %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16(i8* %p, i32 16) [[ATTR]]
2525 ; CHECK-NEXT: call void @llvm.arm.neon.vst1.v8i16(i8* %q, <8 x i16> %y, i32 16)
2626 ; CHECK-NEXT: %c = add <8 x i16> %a, %a
2727 define <8 x i16> @test1(i8* %p, <8 x i16> %y) {
2828 entry:
29 %q = getelementptr i8* %p, i64 16
29 %q = getelementptr i8, i8* %p, i64 16
3030 %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16(i8* %p, i32 16) nounwind
3131 call void @llvm.arm.neon.vst1.v8i16(i8* %q, <8 x i16> %y, i32 16)
3232 %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16(i8* %p, i32 16) nounwind
3535
3636 define i8 @test2(i8* %P) {
3737 ; CHECK-LABEL: @test2
38 %P2 = getelementptr i8* %P, i32 127
38 %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)
4141 %A = load i8* %P2
4545
4646 define i8 @test2a(i8* %P) {
4747 ; CHECK-LABEL: @test2
48 %P2 = getelementptr i8* %P, i32 126
48 %P2 = getelementptr i8, i8* %P, i32 126
4949
5050 ;; FIXME: DSE isn't zapping this dead store.
5151 store i8 1, i8* %P2 ;; Dead, clobbered by memset.
6363 ; CHECK-NOT: %Y
6464 %Y = add i8 %X, 1 ;; Dead, because the only use (the store) is dead.
6565
66 %P2 = getelementptr i8* %P, i32 2
66 %P2 = getelementptr i8, i8* %P, i32 2
6767 store i8 %Y, i8* %P2 ;; Not read by lifetime.end, should be removed.
6868 ; CHECK: store i8 2, i8* %P2
6969 call void @llvm.lifetime.end(i64 1, i8* %P)
7777 ; CHECK-LABEL: @test3a
7878 %Y = add i8 %X, 1 ;; Dead, because the only use (the store) is dead.
7979
80 %P2 = getelementptr i8* %P, i32 2
80 %P2 = getelementptr i8, i8* %P, i32 2
8181 store i8 %Y, i8* %P2
8282 ; CHECK-NEXT: call void @llvm.lifetime.end
8383 call void @llvm.lifetime.end(i64 10, i8* %P)
134134 entry:
135135 %x = alloca i32, align 4
136136 store i32 0, i32* %x, align 4
137 %add.ptr = getelementptr inbounds i32* %x, i64 1
137 %add.ptr = getelementptr inbounds i32, i32* %x, i64 1
138138 call void @test7decl(i32* %add.ptr)
139139 %tmp = load i32* %x, align 4
140140 ret i32 %tmp
88 ; CHECK: PartialAlias: i16* %bigbase0, i8* %phi
99 define i8 @test0(i8* %base, i1 %x) {
1010 entry:
11 %baseplusone = getelementptr i8* %base, i64 1
11 %baseplusone = getelementptr i8, i8* %base, i64 1
1212 br i1 %x, label %red, label %green
1313 red:
1414 br label %green
2626 ; CHECK: PartialAlias: i16* %bigbase1, i8* %sel
2727 define i8 @test1(i8* %base, i1 %x) {
2828 entry:
29 %baseplusone = getelementptr i8* %base, i64 1
29 %baseplusone = getelementptr i8, i8* %base, i64 1
3030 %sel = select i1 %x, i8* %baseplusone, i8* %base
3131 store i8 0, i8* %sel
3232
77 entry:
88 %arr = alloca [10 x i8*] ; <[10 x i8*]*> [#uses=1]
99 %tmp2 = call i8* @getPtr( ) nounwind ; [#uses=2]
10 %tmp4 = getelementptr [10 x i8*]* %arr, i32 0, i32 %i ; [#uses=2]
10 %tmp4 = getelementptr [10 x i8*], [10 x i8*]* %arr, i32 0, i32 %i ; [#uses=2]
1111 store i8* %tmp2, i8** %tmp4, align 4
12 %tmp10 = getelementptr i8* %tmp2, i32 10 ; [#uses=1]
12 %tmp10 = getelementptr i8, i8* %tmp2, i32 10 ; [#uses=1]
1313 store i8 42, i8* %tmp10, align 1
1414 %tmp14 = load i8** %tmp4, align 4 ; [#uses=1]
15 %tmp16 = getelementptr i8* %tmp14, i32 10 ; [#uses=1]
15 %tmp16 = getelementptr i8, i8* %tmp14, i32 10 ; [#uses=1]
1616 %tmp17 = load i8* %tmp16, align 1 ; [#uses=1]
1717 %tmp19 = icmp eq i8 %tmp17, 42 ; [#uses=1]
1818 ret i1 %tmp19
1111
1212 define i64 @testcase(%nested * noalias %p1, %nested * noalias %p2,
1313 i32 %a, i32 %b) {
14 %ptr = getelementptr inbounds %nested* %p1, i64 -1, i32 0
15 %ptr.64 = getelementptr inbounds %nested.i64* %ptr, i64 0, i32 0
16 %ptr2= getelementptr inbounds %nested* %p2, i64 0, i32 0
14 %ptr = getelementptr inbounds %nested, %nested* %p1, i64 -1, i32 0
15 %ptr.64 = getelementptr inbounds %nested.i64, %nested.i64* %ptr, i64 0, i32 0
16 %ptr2= getelementptr inbounds %nested, %nested* %p2, i64 0, i32 0
1717 %cmp = icmp ult i32 %a, %b
1818 %either_ptr = select i1 %cmp, %nested.i64* %ptr2, %nested.i64* %ptr
19 %either_ptr.64 = getelementptr inbounds %nested.i64* %either_ptr, i64 0, i32 0
19 %either_ptr.64 = getelementptr inbounds %nested.i64, %nested.i64* %either_ptr, i64 0, i32 0
2020
2121 ; Because either_ptr.64 and ptr.64 can alias (we used to return noalias)
2222 ; elimination of the first store is not valid.
44 ; Check that geps with equal base offsets of noalias base pointers stay noalias.
55 define i32 @test(i32* %p, i16 %i) {
66 ; CHECK-LABEL: Function: test:
7 %pi = getelementptr i32* %p, i32 0
8 %pi.next = getelementptr i32* %p, i32 1
7 %pi = getelementptr i32, i32* %p, i32 0
8 %pi.next = getelementptr i32, i32* %p, i32 1
99 %b = icmp eq i16 %i, 0
1010 br i1 %b, label %bb1, label %bb2
1111
1212 bb1:
13 %f = getelementptr i32* %pi, i32 1
14 %g = getelementptr i32* %pi.next, i32 1
13 %f = getelementptr i32, i32* %pi, i32 1
14 %g = getelementptr i32, i32* %pi.next, i32 1
1515 br label %bb3
1616 bb2:
17 %f2 = getelementptr i32* %pi, i32 1
18 %g2 = getelementptr i32* %pi.next, i32 1
17 %f2 = getelementptr i32, i32* %pi, i32 1
18 %g2 = getelementptr i32, i32* %pi.next, i32 1
1919 br label %bb3
2020
2121 bb3:
2222 %ptr_phi = phi i32* [ %f, %bb1 ], [ %f2, %bb2 ]
2323 %ptr_phi2 = phi i32* [ %g, %bb1 ], [ %g2, %bb2 ]
2424 ; CHECK: NoAlias: i32* %f1, i32* %g1
25 %f1 = getelementptr i32* %ptr_phi , i32 1
26 %g1 = getelementptr i32* %ptr_phi2 , i32 1
25 %f1 = getelementptr i32, i32* %ptr_phi , i32 1
26 %g1 = getelementptr i32, i32* %ptr_phi2 , i32 1
2727
2828 ret i32 0
2929 }
3131 ; Check that geps with equal indices of noalias base pointers stay noalias.
3232 define i32 @test2([2 x i32]* %p, i32 %i) {
3333 ; CHECK-LABEL: Function: test2:
34 %pi = getelementptr [2 x i32]* %p, i32 0
35 %pi.next = getelementptr [2 x i32]* %p, i32 1
34 %pi = getelementptr [2 x i32], [2 x i32]* %p, i32 0
35 %pi.next = getelementptr [2 x i32], [2 x i32]* %p, i32 1
3636 %b = icmp eq i32 %i, 0
3737 br i1 %b, label %bb1, label %bb2
3838
3939 bb1:
40 %f = getelementptr [2 x i32]* %pi, i32 1
41 %g = getelementptr [2 x i32]* %pi.next, i32 1
40 %f = getelementptr [2 x i32], [2 x i32]* %pi, i32 1
41 %g = getelementptr [2 x i32], [2 x i32]* %pi.next, i32 1
4242 br label %bb3
4343 bb2:
44 %f2 = getelementptr [2 x i32]* %pi, i32 1
45 %g2 = getelementptr [2 x i32]* %pi.next, i32 1
44 %f2 = getelementptr [2 x i32], [2 x i32]* %pi, i32 1
45 %g2 = getelementptr [2 x i32], [2 x i32]* %pi.next, i32 1
4646 br label %bb3
4747 bb3:
4848 %ptr_phi = phi [2 x i32]* [ %f, %bb1 ], [ %f2, %bb2 ]
4949 %ptr_phi2 = phi [2 x i32]* [ %g, %bb1 ], [ %g2, %bb2 ]
5050 ; CHECK: NoAlias: i32* %f1, i32* %g1
51 %f1 = getelementptr [2 x i32]* %ptr_phi , i32 1, i32 %i
52 %g1 = getelementptr [2 x i32]* %ptr_phi2 , i32 1, i32 %i
51 %f1 = getelementptr [2 x i32], [2 x i32]* %ptr_phi , i32 1, i32 %i
52 %g1 = getelementptr [2 x i32], [2 x i32]* %ptr_phi2 , i32 1, i32 %i
5353
5454 ret i32 0
5555 }
5353 for.body:
5454 %1 = load i32* %jj7, align 4
5555 %idxprom4 = zext i32 %1 to i64
56 %arrayidx5 = getelementptr inbounds [100 x i32]* %oa5, i64 0, i64 %idxprom4
56 %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %oa5, i64 0, i64 %idxprom4
5757 %2 = load i32* %arrayidx5, align 4
5858 %sub6 = sub i32 %2, 6
5959 store i32 %sub6, i32* %arrayidx5, align 4
6262 store i32 %3, i32* %arrayidx5, align 4
6363 %sub11 = add i32 %1, -1
6464 %idxprom12 = zext i32 %sub11 to i64
65 %arrayidx13 = getelementptr inbounds [100 x i32]* %oa5, i64 0, i64 %idxprom12
65 %arrayidx13 = getelementptr inbounds [100 x i32], [100 x i32]* %oa5, i64 0, i64 %idxprom12
6666 call void @inc(i32* %jj7)
6767 br label %codeRepl
6868
2222 %lsr.iv = phi i32 [ %lsr.iv.next, %for.body4 ], [ 16000, %for.cond2.preheader ]
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>*
25 %scevgep11 = getelementptr <4 x double>* %lsr.iv46, i64 -2
25 %scevgep11 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 -2
2626 %i6 = load <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
29 %scevgep10 = getelementptr <4 x double>* %lsr.iv46, i64 -1
29 %scevgep10 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 -1
3030 %i7 = load <4 x double>* %scevgep10, align 32
3131 %add.4 = fadd <4 x double> %i7,
32 %scevgep9 = getelementptr <4 x double>* %lsr.iv12, i64 1
32 %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
3434 %i8 = load <4 x double>* %lsr.iv46, align 32
3535 %add.8 = fadd <4 x double> %i8,
36 %scevgep8 = getelementptr <4 x double>* %lsr.iv12, i64 2
36 %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
38 %scevgep7 = getelementptr <4 x double>* %lsr.iv46, i64 1
38 %scevgep7 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 1
3939 %i9 = load <4 x double>* %scevgep7, align 32
4040 %add.12 = fadd <4 x double> %i9,
41 %scevgep3 = getelementptr <4 x double>* %lsr.iv12, i64 3
41 %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
4343
4444 ; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep11, <4 x double>* %scevgep7
4949 ; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep3, <4 x double>* %scevgep9
5050
5151 %lsr.iv.next = add i32 %lsr.iv, -16
52 %scevgep = getelementptr [16000 x double]* %lsr.iv1, i64 0, i64 16
52 %scevgep = getelementptr [16000 x double], [16000 x double]* %lsr.iv1, i64 0, i64 16
5353 %i10 = bitcast double* %scevgep to [16000 x double]*
54 %scevgep5 = getelementptr [16000 x double]* %lsr.iv4, i64 0, i64 16
54 %scevgep5 = getelementptr [16000 x double], [16000 x double]* %lsr.iv4, i64 0, i64 16
5555 %i11 = bitcast double* %scevgep5 to [16000 x double]*
5656 %exitcond.15 = icmp eq i32 %lsr.iv.next, 0
5757 br i1 %exitcond.15, label %for.end, label %for.body4
77 ; CHECK: NoAlias: i32* %ptr2_phi, i32* %ptr_phi
88 define i32 @test_noalias_1(i32* %ptr2, i32 %count, i32* %coeff) {
99 entry:
10 %ptr = getelementptr inbounds i32* %ptr2, i64 1
10 %ptr = getelementptr inbounds i32, i32* %ptr2, i64 1
1111 br label %while.body
1212
1313 while.body:
2323 %mul = mul nsw i32 %1, %2
2424 %add = add nsw i32 %mul, %result.09
2525 %tobool = icmp eq i32 %dec, 0
26 %ptr_inc = getelementptr inbounds i32* %ptr_phi, i64 1
27 %ptr2_inc = getelementptr inbounds i32* %ptr2_phi, i64 1
26 %ptr_inc = getelementptr inbounds i32, i32* %ptr_phi, i64 1
27 %ptr2_inc = getelementptr inbounds i32, i32* %ptr2_phi, i64 1
2828 br i1 %tobool, label %the_exit, label %while.body
2929
3030 the_exit:
3636 ; CHECK: NoAlias: i32* %ptr2_phi, i32* %ptr_phi
3737 define i32 @test_noalias_2(i32* %ptr2, i32 %count, i32* %coeff) {
3838 entry:
39 %ptr = getelementptr inbounds i32* %ptr2, i64 1
39 %ptr = getelementptr inbounds i32, i32* %ptr2, i64 1
4040 br label %outer.while.header
4141
4242 outer.while.header:
5858 %mul = mul nsw i32 %1, %2
5959 %add = add nsw i32 %mul, %result.09
6060 %tobool = icmp eq i32 %dec, 0
61 %ptr_inc = getelementptr inbounds i32* %ptr_phi, i64 1
62 %ptr2_inc = getelementptr inbounds i32* %ptr2_phi, i64 1
61 %ptr_inc = getelementptr inbounds i32, i32* %ptr_phi, i64 1
62 %ptr2_inc = getelementptr inbounds i32, i32* %ptr2_phi, i64 1
6363 br i1 %tobool, label %outer.while.backedge, label %while.body
6464
6565 outer.while.backedge:
66 %ptr_inc_outer = getelementptr inbounds i32* %ptr_phi, i64 1
67 %ptr2_inc_outer = getelementptr inbounds i32* %ptr2_phi, i64 1
66 %ptr_inc_outer = getelementptr inbounds i32, i32* %ptr_phi, i64 1
67 %ptr2_inc_outer = getelementptr inbounds i32, i32* %ptr2_phi, i64 1
6868 %dec.outer = add nsw i32 %num.outer, -1
6969 %br.cond = icmp eq i32 %dec.outer, 0
7070 br i1 %br.cond, label %the_exit, label %outer.while.header
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:
1212 %vix = load <8 x i32>* %vix.ptr, align 4
13 %t1.ptr = getelementptr i8* %arr.ptr, i8 4
13 %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
1616 store i8 1, i8* %t1.ptr, align 4
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:
3333 %vix = load <8 x i32>* %vix.ptr, align 4
34 %t1.ptr = getelementptr i8* %arr.ptr, i8 4
34 %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
3737 store i8 1, i8* %t2.ptr, align 4
3535
3636 Loop: ; preds = %Loop, %0
3737 %AVal = load i32* @A ; [#uses=2]
38 %C0 = getelementptr [2 x i32]* @C, i64 0, i64 0 ; [#uses=1]
38 %C0 = getelementptr [2 x i32], [2 x i32]* @C, i64 0, i64 0 ; [#uses=1]
3939 store i32 %AVal, i32* %C0
4040 %BVal = load i32* @B ; [#uses=2]
41 %C1 = getelementptr [2 x i32]* @C, i64 0, i64 1 ; [#uses=1]
41 %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
4444
2626 ; CHECK-DAG: MustAlias: i32* %y, i80* %y_10
2727
2828 define void @test_simple(%struct* %st, i64 %i, i64 %j, i64 %k) {
29 %x = getelementptr %struct* %st, i64 %i, i32 0
30 %y = getelementptr %struct* %st, i64 %j, i32 1
31 %z = getelementptr %struct* %st, i64 %k, i32 2
29 %x = getelementptr %struct, %struct* %st, i64 %i, i32 0
30 %y = getelementptr %struct, %struct* %st, i64 %j, i32 1
31 %z = getelementptr %struct, %struct* %st, i64 %k, i32 2
3232 %y_12 = bitcast i32* %y to %struct*
3333 %y_10 = bitcast i32* %y to i80*
3434 %y_8 = bitcast i32* %y to i64*
5858 ; CHECK-DAG: MustAlias: i32* %y, i80* %y_10
5959
6060 define void @test_in_array([1 x %struct]* %st, i64 %i, i64 %j, i64 %k, i64 %i1, i64 %j1, i64 %k1) {
61 %x = getelementptr [1 x %struct]* %st, i64 %i, i64 %i1, i32 0
62 %y = getelementptr [1 x %struct]* %st, i64 %j, i64 %j1, i32 1
63 %z = getelementptr [1 x %struct]* %st, i64 %k, i64 %k1, i32 2
61 %x = getelementptr [1 x %struct], [1 x %struct]* %st, i64 %i, i64 %i1, i32 0
62 %y = getelementptr [1 x %struct], [1 x %struct]* %st, i64 %j, i64 %j1, i32 1
63 %z = getelementptr [1 x %struct], [1 x %struct]* %st, i64 %k, i64 %k1, i32 2
6464 %y_12 = bitcast i32* %y to %struct*
6565 %y_10 = bitcast i32* %y to i80*
6666 %y_8 = bitcast i32* %y to i64*
9090 ; CHECK-DAG: MustAlias: i32* %y, i80* %y_10
9191
9292 define void @test_in_3d_array([1 x [1 x [1 x %struct]]]* %st, i64 %i, i64 %j, i64 %k, i64 %i1, i64 %j1, i64 %k1, i64 %i2, i64 %j2, i64 %k2, i64 %i3, i64 %j3, i64 %k3) {
93 %x = getelementptr [1 x [1 x [1 x %struct]]]* %st, i64 %i, i64 %i1, i64 %i2, i64 %i3, i32 0
94 %y = getelementptr [1 x [1 x [1 x %struct]]]* %st, i64 %j, i64 %j1, i64 %j2, i64 %j3, i32 1
95 %z = getelementptr [1 x [1 x [1 x %struct]]]* %st, i64 %k, i64 %k1, i64 %k2, i64 %k3, i32 2
93 %x = getelementptr [1 x [1 x [1 x %struct]]], [1 x [1 x [1 x %struct]]]* %st, i64 %i, i64 %i1, i64 %i2, i64 %i3, i32 0
94 %y = getelementptr [1 x [1 x [1 x %struct]]], [1 x [1 x [1 x %struct]]]* %st, i64 %j, i64 %j1, i64 %j2, i64 %j3, i32 1
95 %z = getelementptr [1 x [1 x [1 x %struct]]], [1 x [1 x [1 x %struct]]]* %st, i64 %k, i64 %k1, i64 %k2, i64 %k3, i32 2
9696 %y_12 = bitcast i32* %y to %struct*
9797 %y_10 = bitcast i32* %y to i80*
9898 %y_8 = bitcast i32* %y to i64*
115115 ; CHECK-DAG: PartialAlias: i32* %y2, i32* %z
116116
117117 define void @test_same_underlying_object_same_indices(%struct* %st, i64 %i, i64 %j, i64 %k) {
118 %st2 = getelementptr %struct* %st, i32 10
119 %x2 = getelementptr %struct* %st2, i64 %i, i32 0
120 %y2 = getelementptr %struct* %st2, i64 %j, i32 1
121 %z2 = getelementptr %struct* %st2, i64 %k, i32 2
122 %x = getelementptr %struct* %st, i64 %i, i32 0
123 %y = getelementptr %struct* %st, i64 %j, i32 1
124 %z = getelementptr %struct* %st, i64 %k, i32 2
118 %st2 = getelementptr %struct, %struct* %st, i32 10
119 %x2 = getelementptr %struct, %struct* %st2, i64 %i, i32 0
120 %y2 = getelementptr %struct, %struct* %st2, i64 %j, i32 1
121 %z2 = getelementptr %struct, %struct* %st2, i64 %k, i32 2
122 %x = getelementptr %struct, %struct* %st, i64 %i, i32 0
123 %y = getelementptr %struct, %struct* %st, i64 %j, i32 1
124 %z = getelementptr %struct, %struct* %st, i64 %k, i32 2
125125 ret void
126126 }
127127
141141 ; CHECK-DAG: PartialAlias: i32* %y2, i32* %z
142142
143143 define void @test_same_underlying_object_different_indices(%struct* %st, i64 %i1, i64 %j1, i64 %k1, i64 %i2, i64 %k2, i64 %j2) {
144 %st2 = getelementptr %struct* %st, i32 10
145 %x2 = getelementptr %struct* %st2, i64 %i2, i32 0
146 %y2 = getelementptr %struct* %st2, i64 %j2, i32 1
147 %z2 = getelementptr %struct* %st2, i64 %k2, i32 2
148 %x = getelementptr %struct* %st, i64 %i1, i32 0
149 %y = getelementptr %struct* %st, i64 %j1, i32 1
150 %z = getelementptr %struct* %st, i64 %k1, i32 2
144 %st2 = getelementptr %struct, %struct* %st, i32 10
145 %x2 = getelementptr %struct, %struct* %st2, i64 %i2, i32 0
146 %y2 = getelementptr %struct, %struct* %st2, i64 %j2, i32 1
147 %z2 = getelementptr %struct, %struct* %st2, i64 %k2, i32 2
148 %x = getelementptr %struct, %struct* %st, i64 %i1, i32 0
149 %y = getelementptr %struct, %struct* %st, i64 %j1, i32 1
150 %z = getelementptr %struct, %struct* %st, i64 %k1, i32 2
151151 ret void
152152 }
153153
157157 ; CHECK-LABEL: test_struct_in_array
158158 ; CHECK-DAG: MustAlias: i32* %x, i32* %y
159159 define void @test_struct_in_array(%struct2* %st, i64 %i, i64 %j, i64 %k) {
160 %x = getelementptr %struct2* %st, i32 0, i32 1, i32 1, i32 0
161 %y = getelementptr %struct2* %st, i32 0, i32 0, i32 1, i32 1
160 %x = getelementptr %struct2, %struct2* %st, i32 0, i32 1, i32 1, i32 0
161 %y = getelementptr %struct2, %struct2* %st, i32 0, i32 0, i32 1, i32 1
162162 ret void
163163 }
1313 br i1 false, label %for.body5, label %for.cond
1414
1515 for.body5: ; preds = %for.cond2
16 %arrayidx = getelementptr inbounds [2 x i64]* undef, i32 0, i64 0
16 %arrayidx = getelementptr inbounds [2 x i64], [2 x i64]* undef, i32 0, i64 0
1717 %tmp7 = load i64* %arrayidx, align 8
18 %arrayidx9 = getelementptr inbounds [2 x i64]* undef, i32 0, i64 undef
18 %arrayidx9 = getelementptr inbounds [2 x i64], [2 x i64]* undef, i32 0, i64 undef
1919 %tmp10 = load i64* %arrayidx9, align 8
2020 br label %for.cond2
2121
1010 %t = select i1 undef, i32* %t, i32* undef
1111 %p = select i1 undef, i32* %p, i32* %p
1212 %q = select i1 undef, i32* undef, i32* %p
13 %a = getelementptr i8* %a, i32 0
13 %a = getelementptr i8, i8* %a, i32 0
1414 unreachable
1515 }
66
77 define void @test_with_zext() {
88 %1 = tail call i8* @malloc(i64 120)
9 %a = getelementptr inbounds i8* %1, i64 8
10 %2 = getelementptr inbounds i8* %1, i64 16
9 %a = getelementptr inbounds i8, i8* %1, i64 8
10 %2 = getelementptr inbounds i8, i8* %1, i64 16
1111 %3 = zext i32 3 to i64
12 %b = getelementptr inbounds i8* %2, i64 %3
12 %b = getelementptr inbounds i8, i8* %2, i64 %3
1313 ret void
1414 }
1515
1818
1919 define void @test_with_lshr(i64 %i) {
2020 %1 = tail call i8* @malloc(i64 120)
21 %a = getelementptr inbounds i8* %1, i64 8
22 %2 = getelementptr inbounds i8* %1, i64 16
21 %a = getelementptr inbounds i8, i8* %1, i64 8
22 %2 = getelementptr inbounds i8, i8* %1, i64 16
2323 %3 = lshr i64 %i, 2
24 %b = getelementptr inbounds i8* %2, i64 %3
24 %b = getelementptr inbounds i8, i8* %2, i64 %3
2525 ret void
2626 }
2727
3333
3434 for.loop:
3535 %i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
36 %a = getelementptr inbounds i8* %mem, i64 8
37 %a.plus1 = getelementptr inbounds i8* %mem, i64 16
36 %a = getelementptr inbounds i8, i8* %mem, i64 8
37 %a.plus1 = getelementptr inbounds i8, i8* %mem, i64 16
3838 %i.64 = zext i32 %i to i64
39 %b = getelementptr inbounds i8* %a.plus1, i64 %i.64
39 %b = getelementptr inbounds i8, i8* %a.plus1, i64 %i.64
4040 %i.plus1 = add nuw nsw i32 %i, 1
4141 %cmp = icmp eq i32 %i.plus1, 10
4242 br i1 %cmp, label %for.loop.exit, label %for.loop
5454 for.loop:
5555 %mem = phi i8* [ %mem.orig, %0 ], [ %mem.plus1, %for.loop ]
5656 %i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
57 %a = getelementptr inbounds i8* %mem, i64 8
58 %a.plus1 = getelementptr inbounds i8* %mem, i64 16
57 %a = getelementptr inbounds i8, i8* %mem, i64 8
58 %a.plus1 = getelementptr inbounds i8, i8* %mem, i64 16
5959 %i.64 = zext i32 %i to i64
60 %b = getelementptr inbounds i8* %a.plus1, i64 %i.64
60 %b = getelementptr inbounds i8, i8* %a.plus1, i64 %i.64
6161 %i.plus1 = add nuw nsw i32 %i, 1
62 %mem.plus1 = getelementptr inbounds i8* %mem, i64 8
62 %mem.plus1 = getelementptr inbounds i8, i8* %mem, i64 8
6363 %cmp = icmp eq i32 %i.plus1, 10
6464 br i1 %cmp, label %for.loop.exit, label %for.loop
6565
7373 define void @test_sign_extension(i32 %p) {
7474 %1 = tail call i8* @malloc(i64 120)
7575 %p.64 = zext i32 %p to i64
76 %a = getelementptr inbounds i8* %1, i64 %p.64
76 %a = getelementptr inbounds i8, i8* %1, i64 %p.64
7777 %p.minus1 = add i32 %p, -1
7878 %p.minus1.64 = zext i32 %p.minus1 to i64
79 %b.i8 = getelementptr inbounds i8* %1, i64 %p.minus1.64
79 %b.i8 = getelementptr inbounds i8, i8* %1, i64 %p.minus1.64
8080 %b.i64 = bitcast i8* %b.i8 to i64*
8181 ret void
8282 }
9090 for.loop:
9191 %i = phi i32 [ 0, %reorder ], [ %i.next, %for.loop ]
9292 %idxprom = zext i32 %i to i64
93 %b = getelementptr inbounds [8 x i32]* %values, i64 0, i64 %idxprom
93 %b = getelementptr inbounds [8 x i32], [8 x i32]* %values, i64 0, i64 %idxprom
9494 %i.next = add nuw nsw i32 %i, 1
9595 %1 = icmp eq i32 %i.next, 10
9696 br i1 %1, label %for.loop.exit, label %for.loop
9797
9898 reorder:
99 %a = getelementptr inbounds [8 x i32]* %values, i64 0, i64 1
99 %a = getelementptr inbounds [8 x i32], [8 x i32]* %values, i64 0, i64 1
100100 br label %for.loop
101101
102102 for.loop.exit:
122122 ;
123123 %i = phi i32 [ %d.val, %.lr.ph ], [ %i.plus1, %2 ]
124124 %i.promoted = sext i32 %i to i64
125 %x = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 %d.promoted, i64 %i.promoted
125 %x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %d.promoted, i64 %i.promoted
126126 %i.plus1 = add nsw i32 %i, 1
127127 %cmp = icmp slt i32 %i.plus1, 2
128128 br i1 %cmp, label %2, label %3
129129
130130 ;
131 %y = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
131 %y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
132132 ret void
133133 }
134134
137137
138138 define void @test_modulo_analysis_easy_case(i64 %i) {
139139 %h = alloca [1 x [2 x i32*]], align 16
140 %x = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 %i, i64 0
141 %y = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
140 %x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %i, i64 0
141 %y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
142142 ret void
143143 }
144144
152152 for.loop:
153153 %i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
154154 %i.promoted = sext i32 %i to i64
155 %x = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 %i.promoted, i64 0
156 %y = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
155 %x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %i.promoted, i64 0
156 %y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
157157 %i.plus1 = add nsw i32 %i, 1
158158 %cmp = icmp slt i32 %i.plus1, 2
159159 br i1 %cmp, label %for.loop, label %for.loop.exit
174174 for.loop:
175175 %i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
176176 %i.promoted = sext i32 %i to i64
177 %x = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 %i.promoted, i64 %b.promoted
178 %y = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
177 %x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %i.promoted, i64 %b.promoted
178 %y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
179179 %i.plus1 = add nsw i32 %i, 1
180180 %cmp = icmp slt i32 %i.plus1, 2
181181 br i1 %cmp, label %for.loop, label %for.loop.exit
187187 ; CHECK-LABEL: test_const_eval
188188 ; CHECK: NoAlias: i8* %a, i8* %b
189189 define void @test_const_eval(i8* %ptr, i64 %offset) {
190 %a = getelementptr inbounds i8* %ptr, i64 %offset
191 %a.dup = getelementptr inbounds i8* %ptr, i64 %offset
190 %a = getelementptr inbounds i8, i8* %ptr, i64 %offset
191 %a.dup = getelementptr inbounds i8, i8* %ptr, i64 %offset
192192 %three = zext i32 3 to i64
193 %b = getelementptr inbounds i8* %a.dup, i64 %three
193 %b = getelementptr inbounds i8, i8* %a.dup, i64 %three
194194 ret void
195195 }
196196
199199 define void @test_const_eval_scaled(i8* %ptr) {
200200 %three = zext i32 3 to i64
201201 %six = mul i64 %three, 2
202 %a = getelementptr inbounds i8* %ptr, i64 %six
203 %b = getelementptr inbounds i8* %ptr, i64 6
202 %a = getelementptr inbounds i8, i8* %ptr, i64 %six
203 %b = getelementptr inbounds i8, i8* %ptr, i64 6
204204 ret void
205205 }
206206
1111 body:
1212 %iv = phi i32 [ 0, %entry ], [ %next, %body ]
1313 %base = phi i32 [ 0, %entry ], [ %sum, %body ]
14 %arrayidx = getelementptr inbounds i32* %a, i32 %iv
14 %arrayidx = getelementptr inbounds i32, i32* %a, i32 %iv
1515 %0 = load i32* %arrayidx
1616 %sum = add nsw i32 %0, %base
1717 %next = add i32 %iv, 1
88 body:
99 %iv = phi i32 [ 0, %entry ], [ %next, %body ]
1010 %base = phi i32 [ 0, %entry ], [ %sum, %body ]
11 %arrayidx = getelementptr inbounds i32* %a, i32 %iv
11 %arrayidx = getelementptr inbounds i32, i32* %a, i32 %iv
1212 %0 = load i32* %arrayidx
1313 %sum = add nsw i32 %0, %base
1414 %next = add i32 %iv, 1
152152 ; CHECK: edge entry -> else probability is 64 / 68 = 94.1176% [HOT edge]
153153
154154 entry:
155 %gep1 = getelementptr i32* %a, i32 1
155 %gep1 = getelementptr i32, i32* %a, i32 1
156156 %val1 = load i32* %gep1
157157 %cond1 = icmp ugt i32 %val1, 1
158158 br i1 %cond1, label %then, label %else
163163 br label %exit
164164
165165 else:
166 %gep2 = getelementptr i32* %a, i32 2
166 %gep2 = getelementptr i32, i32* %a, i32 2
167167 %val2 = load i32* %gep2
168168 %val3 = call i32 @regular_function(i32 %val2)
169169 br label %exit
304304
305305 for.body.lr.ph:
306306 %cmp216 = icmp sgt i32 %b, 0
307 %arrayidx5 = getelementptr inbounds i32* %c, i64 1
308 %arrayidx9 = getelementptr inbounds i32* %c, i64 2
307 %arrayidx5 = getelementptr inbounds i32, i32* %c, i64 1
308 %arrayidx9 = getelementptr inbounds i32, i32* %c, i64 2
309309 br label %for.body
310310 ; CHECK: edge for.body.lr.ph -> for.body probability is 16 / 16 = 100%
311311
2121 %d.addr.010 = phi i32* [ %d, %while.body.lr.ph ], [ %incdec.ptr4, %if.end ]
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
24 %arrayidx = getelementptr inbounds float* %f0, i64 %indvars.iv.next
24 %arrayidx = getelementptr inbounds float, float* %f0, i64 %indvars.iv.next
2525 %1 = load float* %arrayidx, align 4
26 %arrayidx2 = getelementptr inbounds float* %f1, i64 %indvars.iv.next
26 %arrayidx2 = getelementptr inbounds float, float* %f1, i64 %indvars.iv.next
2727 %2 = load 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:
32 %incdec.ptr = getelementptr inbounds i32* %b.addr.011, i64 1
32 %incdec.ptr = getelementptr inbounds i32, i32* %b.addr.011, i64 1
3333 %3 = load 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:
39 %incdec.ptr3 = getelementptr inbounds i32* %c.addr.09, i64 1
39 %incdec.ptr3 = getelementptr inbounds i32, i32* %c.addr.09, i64 1
4040 %4 = load i32* %c.addr.09, align 4
4141 %sub = add nsw i32 %4, -13
4242 store i32 %sub, i32* %c.addr.09, align 4
4545 if.end:
4646 %c.addr.1 = phi i32* [ %c.addr.09, %if.then ], [ %incdec.ptr3, %if.else ]
4747 %b.addr.1 = phi i32* [ %incdec.ptr, %if.then ], [ %b.addr.011, %if.else ]
48 %incdec.ptr4 = getelementptr inbounds i32* %d.addr.010, i64 1
48 %incdec.ptr4 = getelementptr inbounds i32, i32* %d.addr.010, i64 1
4949 store i32 14, i32* %d.addr.010, align 4
5050 %5 = trunc i64 %indvars.iv.next to i32
5151 %tobool = icmp eq i32 %5, 0
1111 ; CHECK-NOT: May:
1212
1313 define void @test() {
14 %D = getelementptr %T* @G, i64 0, i32 0
15 %E = getelementptr %T* @G, i64 0, i32 1, i64 5
16 %F = getelementptr i32* getelementptr (%T* @G, i64 0, i32 0), i64 0
17 %X = getelementptr [10 x i8]* getelementptr (%T* @G, i64 0, i32 1), i64 0, i64 5
14 %D = getelementptr %T, %T* @G, i64 0, i32 0
15 %E = getelementptr %T, %T* @G, i64 0, i32 1, i64 5
16 %F = getelementptr i32, i32* getelementptr (%T* @G, i64 0, i32 0), i64 0
17 %X = getelementptr [10 x i8], [10 x i8]* getelementptr (%T* @G, i64 0, i32 1), i64 0, i64 5
1818
1919 ret void
2020 }
99
1010 define void @foo([3 x [3 x double]]* noalias %p) {
1111 entry:
12 %p3 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 0, i64 3
12 %p3 = getelementptr [3 x [3 x double]], [3 x [3 x double]]* %p, i64 0, i64 0, i64 3
1313 br label %loop
1414
1515 loop:
1616 %i = phi i64 [ 0, %entry ], [ %i.next, %loop ]
1717
18 %p.0.i.0 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 %i, i64 0
18 %p.0.i.0 = getelementptr [3 x [3 x double]], [3 x [3 x double]]* %p, i64 0, i64 %i, i64 0
1919
2020 store volatile double 0.0, double* %p3
2121 store volatile double 0.1, double* %p.0.i.0
1919 ; CHECK: ret i32 0
2020 entry:
2121 %u = alloca %union.anon, align 8
22 %tmp9 = getelementptr inbounds %union.anon* %u, i64 0, i32 0
22 %tmp9 = getelementptr inbounds %union.anon, %union.anon* %u, i64 0, i32 0
2323 store double %x, double* %tmp9, align 8, !tbaa !0
2424 %tmp2 = load 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]*
27 %arrayidx = getelementptr inbounds [2 x i32]* %tmp4, i64 0, i64 %idxprom
27 %arrayidx = getelementptr inbounds [2 x i32], [2 x i32]* %tmp4, i64 0, i64 %idxprom
2828 %tmp5 = load i32* %arrayidx, align 4, !tbaa !3
2929 %tmp5.lobit = lshr i32 %tmp5, 31
3030 ret i32 %tmp5.lobit
99 %tab = alloca i32, align 4
1010 %tmp31 = mul i32 %indvar, -2
1111 %tmp32 = add i32 %tmp31, 30
12 %t.5 = getelementptr i32* %tab, i32 %tmp32
12 %t.5 = getelementptr i32, i32* %tab, i32 %tmp32
1313 %loada = load i32* %tab
1414 store i32 0, i32* %t.5
1515 %loadb = load i32* %tab
99 define i8 @test0(i1 %x) {
1010 entry:
1111 %base = alloca i8, align 4
12 %baseplusone = getelementptr i8* %base, i64 1
12 %baseplusone = getelementptr i8, i8* %base, i64 1
1313 br i1 %x, label %red, label %green
1414 red:
1515 br label %green
2929 define i8 @test1(i1 %x) {
3030 entry:
3131 %base = alloca i8, align 4
32 %baseplusone = getelementptr i8* %base, i64 1
32 %baseplusone = getelementptr i8, i8* %base, i64 1
3333 %sel = select i1 %x, i8* %baseplusone, i8* %base
3434 store i8 0, i8* %sel
3535
4444 ; even if they are nocapture
4545 ; CHECK: MayAlias: double* %A, double* %Index
4646 define void @testr2(double* nocapture readonly %A, double* nocapture readonly %Index) {
47 %arrayidx22 = getelementptr inbounds double* %Index, i64 2
47 %arrayidx22 = getelementptr inbounds double, double* %Index, i64 2
4848 %1 = load double* %arrayidx22
49 %arrayidx25 = getelementptr inbounds double* %A, i64 2
49 %arrayidx25 = getelementptr inbounds double, double* %A, i64 2
5050 %2 = load double* %arrayidx25
5151 %mul26 = fmul double %1, %2
5252 ret void
88 ; CHECK-NOT: May:
99
1010 define void @test(%T* %P) {
11 %A = getelementptr %T* %P, i64 0
12 %B = getelementptr %T* %P, i64 0, i32 0
13 %C = getelementptr %T* %P, i64 0, i32 1
14 %D = getelementptr %T* %P, i64 0, i32 1, i64 0
15 %E = getelementptr %T* %P, i64 0, i32 1, i64 5
11 %A = getelementptr %T, %T* %P, i64 0
12 %B = getelementptr %T, %T* %P, i64 0, i32 0
13 %C = getelementptr %T, %T* %P, i64 0, i32 1
14 %D = getelementptr %T, %T* %P, i64 0, i32 1, i64 0
15 %E = getelementptr %T, %T* %P, i64 0, i32 1, i64 5
1616 ret void
1717 }
55 define void @test_geps() {
66 ; Cost of scalar integer geps should be one. We can't always expect it to be
77 ; folded into the instruction addressing mode.
8 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i8*
9 %a0 = getelementptr inbounds i8* undef, i32 0
10 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i16*
11 %a1 = getelementptr inbounds i16* undef, i32 0
12 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i32*
13 %a2 = getelementptr inbounds i32* undef, i32 0
8 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i8, i8*
9 %a0 = getelementptr inbounds i8, i8* undef, i32 0
10 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i16, i16*
11 %a1 = getelementptr inbounds i16, i16* undef, i32 0
12 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i32, i32*
13 %a2 = getelementptr inbounds i32, i32* undef, i32 0
1414
15 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i64*
16 %a3 = getelementptr inbounds i64* undef, i32 0
15 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i64, i64*
16 %a3 = getelementptr inbounds i64, i64* undef, i32 0
1717
1818 ; Cost of scalar floating point geps should be one. We cannot fold the address
1919 ; computation.
20 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds float*
21 %a4 = getelementptr inbounds float* undef, i32 0
22 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds double*
23 %a5 = getelementptr inbounds double* undef, i32 0
20 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds float, float*
21 %a4 = getelementptr inbounds float, float* undef, i32 0
22 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds double, double*
23 %a5 = getelementptr inbounds double, double* undef, i32 0
2424
2525
2626 ; Cost of vector geps should be one. We cannot fold the address computation.
27 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i8>*
28 %a7 = getelementptr inbounds <4 x i8>* undef, i32 0
29 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i16>*
30 %a8 = getelementptr inbounds <4 x i16>* undef, i32 0
31 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i32>*
32 %a9 = getelementptr inbounds <4 x i32>* undef, i32 0
33 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i64>*
34 %a10 = getelementptr inbounds <4 x i64>* undef, i32 0
35 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x float>*
36 %a11 = getelementptr inbounds <4 x float>* undef, i32 0
37 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x double>*
38 %a12 = getelementptr inbounds <4 x double>* undef, i32 0
27 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i8>, <4 x i8>*
28 %a7 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0
29 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i16>, <4 x i16>*
30 %a8 = getelementptr inbounds <4 x i16>, <4 x i16>* undef, i32 0
31 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i32>, <4 x i32>*
32 %a9 = getelementptr inbounds <4 x i32>, <4 x i32>* undef, i32 0
33 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i64>, <4 x i64>*
34 %a10 = getelementptr inbounds <4 x i64>, <4 x i64>* undef, i32 0
35 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x float>, <4 x float>*
36 %a11 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 0
37 ;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x double>, <4 x double>*
38 %a12 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 0
3939
4040
4141 ret void
66 define void @test_geps() {
77 ; Cost of should be zero. We expect it to be folded into
88 ; the instruction addressing mode.
9 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i8*
10 %a0 = getelementptr inbounds i8* undef, i32 0
11 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i16*
12 %a1 = getelementptr inbounds i16* undef, i32 0
13 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i32*
14 %a2 = getelementptr inbounds i32* undef, i32 0
15 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i64*
16 %a3 = getelementptr inbounds i64* undef, i32 0
9 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i8, i8*
10 %a0 = getelementptr inbounds i8, i8* undef, i32 0
11 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i16, i16*
12 %a1 = getelementptr inbounds i16, i16* undef, i32 0
13 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i32, i32*
14 %a2 = getelementptr inbounds i32, i32* undef, i32 0
15 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i64, i64*
16 %a3 = getelementptr inbounds i64, i64* undef, i32 0
1717
18 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds float*
19 %a4 = getelementptr inbounds float* undef, i32 0
20 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds double*
21 %a5 = getelementptr inbounds double* undef, i32 0
18 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds float, float*
19 %a4 = getelementptr inbounds float, float* undef, i32 0
20 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds double, double*
21 %a5 = getelementptr inbounds double, double* undef, i32 0
2222
2323 ; Vector geps should also have zero cost.
24 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i8>*
25 %a7 = getelementptr inbounds <4 x i8>* undef, i32 0
26 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i16>*
27 %a8 = getelementptr inbounds <4 x i16>* undef, i32 0
28 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i32>*
29 %a9 = getelementptr inbounds <4 x i32>* undef, i32 0
30 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i64>*
31 %a10 = getelementptr inbounds <4 x i64>* undef, i32 0
32 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x float>*
33 %a11 = getelementptr inbounds <4 x float>* undef, i32 0
34 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x double>*
35 %a12 = getelementptr inbounds <4 x double>* undef, i32 0
24 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i8>, <4 x i8>*
25 %a7 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0
26 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i16>, <4 x i16>*
27 %a8 = getelementptr inbounds <4 x i16>, <4 x i16>* undef, i32 0
28 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i32>, <4 x i32>*
29 %a9 = getelementptr inbounds <4 x i32>, <4 x i32>* undef, i32 0
30 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i64>, <4 x i64>*
31 %a10 = getelementptr inbounds <4 x i64>, <4 x i64>* undef, i32 0
32 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x float>, <4 x float>*
33 %a11 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 0
34 ;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x double>, <4 x double>*
35 %a12 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 0
3636
3737
3838 ret void
88
99 vector.body: ; preds = %vector.body, %vector.ph
1010 %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
11 %0 = getelementptr inbounds float* %f, i64 %index
11 %0 = getelementptr inbounds float, float* %f, i64 %index
1212 %1 = bitcast float* %0 to <4 x float>*
1313 %wide.load = load <4 x float>* %1, align 4
1414 %2 = call <4 x float> @llvm.ceil.v4f32(<4 x float> %wide.load)
3636
3737 vector.body: ; preds = %vector.body, %vector.ph
3838 %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
39 %0 = getelementptr inbounds float* %f, i64 %index
39 %0 = getelementptr inbounds float, float* %f, i64 %index
4040 %1 = bitcast float* %0 to <4 x float>*
4141 %wide.load = load <4 x float>* %1, align 4
4242 %2 = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %wide.load)
6464
6565 vector.body: ; preds = %vector.body, %vector.ph
6666 %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
67 %0 = getelementptr inbounds float* %f, i64 %index
67 %0 = getelementptr inbounds float, float* %f, i64 %index
6868 %1 = bitcast float* %0 to <4 x float>*
6969 %wide.load = load <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)
99 vector.body: ; preds = %vector.body, %vector.ph
1010 %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
1111 %vec.phi = phi <2 x i32> [ zeroinitializer, %vector.ph ], [ %12, %vector.body ]
12 %0 = getelementptr inbounds i32* %A, i64 %index
12 %0 = getelementptr inbounds i32, i32* %A, i64 %index
1313 %1 = bitcast i32* %0 to <2 x i32>*
1414 %2 = load <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
18 %5 = getelementptr inbounds i32* %A, i64 %4
18 %5 = getelementptr inbounds i32, i32* %A, i64 %4
1919 ;CHECK: cost of 1 {{.*}} extract
2020 %6 = extractelement <2 x i64> %3, i32 1
21 %7 = getelementptr inbounds i32* %A, i64 %6
21 %7 = getelementptr inbounds i32, i32* %A, i64 %6
2222 %8 = load i32* %5, align 4
2323 ;CHECK: cost of 1 {{.*}} insert
2424 %9 = insertelement <2 x i32> undef, i32 %8, i32 0
2424 vector.body: ; preds = %for.body.lr.ph, %vector.body
2525 %index = phi i64 [ %index.next, %vector.body ], [ %0, %for.body.lr.ph ]
2626 %3 = add i64 %index, 2
27 %4 = getelementptr inbounds i32* %B, i64 %3
27 %4 = getelementptr inbounds i32, i32* %B, i64 %3
2828 ;CHECK: cost of 0 {{.*}} bitcast
2929 %5 = bitcast i32* %4 to <8 x i32>*
3030 ;CHECK: cost of 2 {{.*}} load
3131 %6 = load <8 x i32>* %5, align 4
3232 ;CHECK: cost of 4 {{.*}} mul
3333 %7 = mul nsw <8 x i32> %6,
34 %8 = getelementptr inbounds i32* %A, i64 %index
34 %8 = getelementptr inbounds i32, i32* %A, i64 %index
3535 %9 = bitcast i32* %8 to <8 x i32>*
3636 ;CHECK: cost of 2 {{.*}} load
3737 %10 = load <8 x i32>* %9, align 4
5151 for.body: ; preds = %middle.block, %for.body
5252 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %end.idx.rnd.down, %middle.block ]
5353 %13 = add nsw i64 %indvars.iv, 2
54 %arrayidx = getelementptr inbounds i32* %B, i64 %13
54 %arrayidx = getelementptr inbounds i32, i32* %B, i64 %13
5555 ;CHECK: cost of 1 {{.*}} load
5656 %14 = load i32* %arrayidx, align 4
5757 ;CHECK: cost of 1 {{.*}} mul
5858 %mul = mul nsw i32 %14, 5
59 %arrayidx2 = getelementptr inbounds i32* %A, i64 %indvars.iv
59 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
6060 ;CHECK: cost of 1 {{.*}} load
6161 %15 = load i32* %arrayidx2, align 4
6262 %add3 = add nsw i32 %15, %mul
5151 %mul.us.us = mul nsw i64 %k.029.us.us, 5
5252 %arrayidx.sum.us.us = add i64 %mul.us.us, 7
5353 %arrayidx10.sum.us.us = add i64 %arrayidx.sum.us.us, %tmp27.us.us
54 %arrayidx11.us.us = getelementptr inbounds i32* %A, i64 %arrayidx10.sum.us.us
54 %arrayidx11.us.us = getelementptr inbounds i32, i32* %A, i64 %arrayidx10.sum.us.us
5555 store i32 1, i32* %arrayidx11.us.us, align 4
5656 %inc.us.us = add nsw i64 %k.029.us.us, 1
5757 %exitcond = icmp eq i64 %inc.us.us, %o
6363 for.body4.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
66 %arrayidx.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum1
66 %arrayidx.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum1
6767 %9 = load 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
73 %arrayidx.1.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum2
73 %arrayidx.1.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum2
7474 %10 = load 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
80 %arrayidx.2.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum3
80 %arrayidx.2.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum3
8181 %11 = load 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
87 %arrayidx.3.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum4
87 %arrayidx.3.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum4
8888 %12 = load 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
94 %arrayidx.4.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum5
94 %arrayidx.4.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum5
9595 %13 = load 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
101 %arrayidx.5.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum6
101 %arrayidx.5.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum6
102102 %14 = load 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
108 %arrayidx.6.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum7
108 %arrayidx.6.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum7
109109 %15 = load 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
115 %arrayidx.7.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum8
115 %arrayidx.7.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum8
116116 %16 = load 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
134134 for.body4.ur.i:
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
137 %arrayidx.ur.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum
137 %arrayidx.ur.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum
138138 %21 = load 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
3434
3535 define void @jacobi(i32 %nn, %struct.Mat* nocapture %a, %struct.Mat* nocapture %p) nounwind uwtable {
3636 entry:
37 %p.rows.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 2
37 %p.rows.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 2
3838 %p.rows = load i32* %p.rows.ptr
3939 %p.rows.sub = add i32 %p.rows, -1
4040 %p.rows.sext = sext i32 %p.rows.sub to i64
41 %p.cols.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 3
41 %p.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 3
4242 %p.cols = load i32* %p.cols.ptr
4343 %p.cols.sub = add i32 %p.cols, -1
4444 %p.cols.sext = sext i32 %p.cols.sub to i64
45 %p.deps.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 4
45 %p.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 4
4646 %p.deps = load i32* %p.deps.ptr
4747 %p.deps.sub = add i32 %p.deps, -1
4848 %p.deps.sext = sext i32 %p.deps.sub to i64
49 %a.cols.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 3
49 %a.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 3
5050 %a.cols = load i32* %a.cols.ptr
51 %a.deps.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 4
51 %a.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 4
5252 %a.deps = load i32* %a.deps.ptr
53 %a.base.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 0
53 %a.base.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 0
5454 %a.base = load float** %a.base.ptr, align 8
5555 br label %for.i
5656
7070 %tmp2 = add i64 %tmp1, %j
7171 %tmp3 = mul i64 %tmp2, %a.deps.sext
7272 %tmp4 = add nsw i64 %k, %tmp3
73 %arrayidx = getelementptr inbounds float* %a.base, i64 %tmp4
73 %arrayidx = getelementptr inbounds float, float* %a.base, i64 %tmp4
7474 store float 1.000000e+00, float* %arrayidx
7575 %k.inc = add nsw i64 %k, 1
7676 %k.exitcond = icmp eq i64 %k.inc, %p.deps.sext
3434
3535 define void @jacobi(i32 %nn, %struct.Mat* nocapture %a, %struct.Mat* nocapture %p) nounwind uwtable {
3636 entry:
37 %p.rows.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 2
37 %p.rows.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 2
3838 %p.rows = load i32* %p.rows.ptr
3939 %p.rows.sub = add i32 %p.rows, -1
4040 %p.rows.sext = sext i32 %p.rows.sub to i64
41 %p.cols.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 3
41 %p.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 3
4242 %p.cols = load i32* %p.cols.ptr
4343 %p.cols.sub = add i32 %p.cols, -1
4444 %p.cols.sext = sext i32 %p.cols.sub to i64
45 %p.deps.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 4
45 %p.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 4
4646 %p.deps = load i32* %p.deps.ptr
4747 %p.deps.sub = add i32 %p.deps, -1
4848 %p.deps.sext = sext i32 %p.deps.sub to i64
49 %a.cols.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 3
49 %a.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 3
5050 %a.cols = load i32* %a.cols.ptr
5151 %a.cols.sext = sext i32 %a.cols to i64
52 %a.deps.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 4
52 %a.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 4
5353 %a.deps = load i32* %a.deps.ptr
5454 %a.deps.sext = sext i32 %a.deps to i64
55 %a.base.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 0
55 %a.base.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 0
5656 %a.base = load float** %a.base.ptr, align 8
5757 br label %for.i
5858
7070 %tmp2 = add i64 %tmp1, %j
7171 %tmp3 = mul i64 %tmp2, %a.deps.sext
7272 %tmp4 = add nsw i64 %k, %tmp3
73 %arrayidx = getelementptr inbounds float* %a.base, i64 %tmp4
73 %arrayidx = getelementptr inbounds float, float* %a.base, i64 %tmp4
7474 store float 1.000000e+00, float* %arrayidx
7575 %k.inc = add nsw i64 %k, 1
7676 %k.exitcond = icmp eq i64 %k.inc, %p.deps.sext
2828 %j = phi i64 [ 0, %for.i ], [ %j.inc, %for.j ]
2929 %prodj = mul i64 %j, 2
3030 %vlaarrayidx.sum = add i64 %prodj, %tmp
31 %arrayidx = getelementptr inbounds double* %A, i64 %vlaarrayidx.sum
31 %arrayidx = getelementptr inbounds double, double* %A, i64 %vlaarrayidx.sum
3232 store double 1.0, double* %arrayidx
3333 %j.inc = add nsw i64 %j, 1
3434 %j.exitcond = icmp eq i64 %j.inc, %m
3333 %subscript2 = mul i64 %subscript1, %o
3434 %offset2 = add nsw i64 %k, 7
3535 %subscript = add i64 %subscript2, %offset2
36 %idx = getelementptr inbounds double* %A, i64 %subscript
36 %idx = getelementptr inbounds double, double* %A, i64 %subscript
3737 store double 1.0, double* %idx
3838 br label %for.k.inc
3939
5050 %k.019.us.us = phi i64 [ 0, %for.body6.lr.ph.us.us ], [ %inc.us.us, %for.body6.us.us ]
5151 %arrayidx.sum.us.us = add i64 %k.019.us.us, 7
5252 %arrayidx9.sum.us.us = add i64 %arrayidx.sum.us.us, %tmp17.us.us
53 %arrayidx10.us.us = getelementptr inbounds double* %A, i64 %arrayidx9.sum.us.us
53 %arrayidx10.us.us = getelementptr inbounds double, double* %A, i64 %arrayidx9.sum.us.us
5454 store double 1.000000e+00, double* %arrayidx10.us.us, align 8
5555 %inc.us.us = add nsw i64 %k.019.us.us, 1
5656 %exitcond = icmp eq i64 %inc.us.us, %o
3333 %subscript2 = mul i64 %subscript1, %o
3434 %offset2 = add nsw i64 %k, %r
3535 %subscript = add i64 %subscript2, %offset2
36 %idx = getelementptr inbounds double* %A, i64 %subscript
36 %idx = getelementptr inbounds double, double* %A, i64 %subscript
3737 store double 1.0, double* %idx
3838 br label %for.k.inc
3939
3333 for.j:
3434 %j = phi i64 [ 0, %for.i ], [ %j.inc, %for.j ]
3535 %vlaarrayidx.sum = add i64 %j, %tmp
36 %arrayidx = getelementptr inbounds double* %A, i64 %vlaarrayidx.sum
36 %arrayidx = getelementptr inbounds double, double* %A, i64 %vlaarrayidx.sum
3737 %val = load double* %arrayidx
3838 store double %val, double* %arrayidx
3939 %j.inc = add nsw i64 %j, 1
5252 for.body9.us.us: ; preds = %for.body9.us.us, %for.body9.lr.ph.us.us
5353 %j.021.us.us = phi i64 [ 0, %for.body9.lr.ph.us.us ], [ %inc.us.us, %for.body9.us.us ]
5454 %arrayidx.sum.us.us = add i64 %j.021.us.us, %0
55 %arrayidx10.us.us = getelementptr inbounds double* %vla.us, i64 %arrayidx.sum.us.us
55 %arrayidx10.us.us = getelementptr inbounds double, double* %vla.us, i64 %arrayidx.sum.us.us
5656 store double 1.000000e+00, double* %arrayidx10.us.us, align 8
5757 %inc.us.us = add nsw i64 %j.021.us.us, 1
5858 %exitcond50 = icmp eq i64 %inc.us.us, %indvars.iv48
3030 %subscript1 = add i64 %j, %subscript0
3131 %subscript2 = mul i64 %subscript1, %o
3232 %subscript = add i64 %subscript2, %k
33 %idx = getelementptr inbounds double* %A, i64 %subscript
33 %idx = getelementptr inbounds double, double* %A, i64 %subscript
3434 store double 1.0, double* %idx
3535 br label %for.k.inc
3636
3737 %tmp.us.us = add i64 %j, %tmp
3838 %tmp17.us.us = mul i64 %tmp.us.us, %n_zext
3939 %subscript = add i64 %tmp17.us.us, %k
40 %idx = getelementptr inbounds double* %A, i64 %subscript
40 %idx = getelementptr inbounds double, double* %A, i64 %subscript
4141 store double 1.0, double* %idx
4242 br label %for.k.inc
4343
2222 %j = phi i64 [ 0, %for.i ], [ %j.inc, %for.j ]
2323 %tmp = mul nsw i64 %i, %m
2424 %vlaarrayidx.sum = add i64 %j, %tmp
25 %arrayidx = getelementptr inbounds double* %A, i64 %vlaarrayidx.sum
25 %arrayidx = getelementptr inbounds double, double* %A, i64 %vlaarrayidx.sum
2626 store double 1.0, double* %arrayidx
2727 %tmp1 = mul nsw i64 %j, %n
2828 %vlaarrayidx.sum1 = add i64 %i, %tmp1
29 %arrayidx1 = getelementptr inbounds double* %A, i64 %vlaarrayidx.sum1
29 %arrayidx1 = getelementptr inbounds double, double* %A, i64 %vlaarrayidx.sum1
3030 store double 1.0, double* %arrayidx1
3131 %j.inc = add nsw i64 %j, 1
3232 %j.exitcond = icmp eq i64 %j.inc, %m
1919 %tmp5 = add i64 %iy.067, %0
2020 %tmp6 = mul i64 %tmp5, undef
2121 %arrayidx69.sum = add i64 undef, %tmp6
22 %arrayidx70 = getelementptr inbounds double* %Ey, i64 %arrayidx69.sum
22 %arrayidx70 = getelementptr inbounds double, double* %Ey, i64 %arrayidx69.sum
2323 %1 = load double* %arrayidx70, align 8
2424 %inc = add nsw i64 %ix.062, 1
2525 br i1 false, label %for.body60, label %for.end
3939 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
4040 %mul = mul nsw i64 %i.03, 10
4141 %add = add nsw i64 %mul, %j.02
42 %arrayidx = getelementptr inbounds i64* %A, i64 %add
42 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
4343 store i64 0, i64* %arrayidx, align 8
4444 %mul4 = mul nsw i64 %i.03, 10
4545 %add5 = add nsw i64 %mul4, %j.02
4646 %sub = add nsw i64 %add5, -1
47 %arrayidx6 = getelementptr inbounds i64* %A, i64 %sub
47 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub
4848 %0 = load i64* %arrayidx6, align 8
49 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
49 %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
5252 %exitcond = icmp ne i64 %inc, 11
5353 br i1 %exitcond, label %for.body3, label %for.inc7
5454
5555 for.inc7: ; preds = %for.body3
56 %scevgep = getelementptr i64* %B.addr.04, i64 10
56 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10
5757 %inc8 = add nsw i64 %i.03, 1
5858 %exitcond5 = icmp ne i64 %inc8, 11
5959 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
108108 %B.addr.12 = phi i64* [ %incdec.ptr, %for.body3 ], [ %B.addr.06, %for.body3.preheader ]
109109 %mul = mul nsw i64 %i.05, 10
110110 %add = add nsw i64 %mul, %j.03
111 %arrayidx = getelementptr inbounds i64* %A, i64 %add
111 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
112112 store i64 0, i64* %arrayidx, align 8
113113 %mul4 = mul nsw i64 %i.05, 10
114114 %add5 = add nsw i64 %mul4, %j.03
115115 %sub = add nsw i64 %add5, -1
116 %arrayidx6 = getelementptr inbounds i64* %A, i64 %sub
116 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub
117117 %2 = load i64* %arrayidx6, align 8
118 %incdec.ptr = getelementptr inbounds i64* %B.addr.12, i64 1
118 %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
121121 %exitcond = icmp eq i64 %inc, %1
122122 br i1 %exitcond, label %for.inc7.loopexit, label %for.body3
123123
124124 for.inc7.loopexit: ; preds = %for.body3
125 %scevgep = getelementptr i64* %B.addr.06, i64 %m
125 %scevgep = getelementptr i64, i64* %B.addr.06, i64 %m
126126 br label %for.inc7
127127
128128 for.inc7: ; preds = %for.inc7.loopexit, %for.cond1.preheader
174174 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
175175 %mul = mul nsw i64 %i.03, 10
176176 %add = add nsw i64 %mul, %j.02
177 %arrayidx = getelementptr inbounds i64* %A, i64 %add
177 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
178178 store i64 0, i64* %arrayidx, align 8
179179 %mul4 = mul nsw i64 %i.03, 10
180180 %add5 = add nsw i64 %mul4, %j.02
181181 %add6 = add nsw i64 %add5, 100
182 %arrayidx7 = getelementptr inbounds i64* %A, i64 %add6
182 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
183183 %0 = load i64* %arrayidx7, align 8
184 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
184 %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
187187 %exitcond = icmp ne i64 %inc, 10
188188 br i1 %exitcond, label %for.body3, label %for.inc8
189189
190190 for.inc8: ; preds = %for.body3
191 %scevgep = getelementptr i64* %B.addr.04, i64 10
191 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10
192192 %inc9 = add nsw i64 %i.03, 1
193193 %exitcond5 = icmp ne i64 %inc9, 10
194194 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
233233 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
234234 %mul = mul nsw i64 %i.03, 10
235235 %add = add nsw i64 %mul, %j.02
236 %arrayidx = getelementptr inbounds i64* %A, i64 %add
236 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
237237 store i64 0, i64* %arrayidx, align 8
238238 %mul4 = mul nsw i64 %i.03, 10
239239 %add5 = add nsw i64 %mul4, %j.02
240240 %add6 = add nsw i64 %add5, 99
241 %arrayidx7 = getelementptr inbounds i64* %A, i64 %add6
241 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
242242 %0 = load i64* %arrayidx7, align 8
243 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
243 %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
246246 %exitcond = icmp ne i64 %inc, 10
247247 br i1 %exitcond, label %for.body3, label %for.inc8
248248
249249 for.inc8: ; preds = %for.body3
250 %scevgep = getelementptr i64* %B.addr.04, i64 10
250 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10
251251 %inc9 = add nsw i64 %i.03, 1
252252 %exitcond5 = icmp ne i64 %inc9, 10
253253 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
292292 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
293293 %mul = mul nsw i64 %i.03, 10
294294 %add = add nsw i64 %mul, %j.02
295 %arrayidx = getelementptr inbounds i64* %A, i64 %add
295 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
296296 store i64 0, i64* %arrayidx, align 8
297297 %mul4 = mul nsw i64 %i.03, 10
298298 %add5 = add nsw i64 %mul4, %j.02
299299 %sub = add nsw i64 %add5, -100
300 %arrayidx6 = getelementptr inbounds i64* %A, i64 %sub
300 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub
301301 %0 = load i64* %arrayidx6, align 8
302 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
302 %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
305305 %exitcond = icmp ne i64 %inc, 10
306306 br i1 %exitcond, label %for.body3, label %for.inc7
307307
308308 for.inc7: ; preds = %for.body3
309 %scevgep = getelementptr i64* %B.addr.04, i64 10
309 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10
310310 %inc8 = add nsw i64 %i.03, 1
311311 %exitcond5 = icmp ne i64 %inc8, 10
312312 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
351351 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
352352 %mul = mul nsw i64 %i.03, 10
353353 %add = add nsw i64 %mul, %j.02
354 %arrayidx = getelementptr inbounds i64* %A, i64 %add
354 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
355355 store i64 0, i64* %arrayidx, align 8
356356 %mul4 = mul nsw i64 %i.03, 10
357357 %add5 = add nsw i64 %mul4, %j.02
358358 %sub = add nsw i64 %add5, -99
359 %arrayidx6 = getelementptr inbounds i64* %A, i64 %sub
359 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub
360360 %0 = load i64* %arrayidx6, align 8
361 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
361 %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
364364 %exitcond = icmp ne i64 %inc, 10
365365 br i1 %exitcond, label %for.body3, label %for.inc7
366366
367367 for.inc7: ; preds = %for.body3
368 %scevgep = getelementptr i64* %B.addr.04, i64 10
368 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10
369369 %inc8 = add nsw i64 %i.03, 1
370370 %exitcond5 = icmp ne i64 %inc8, 10
371371 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
410410 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
411411 %mul = mul nsw i64 %i.03, 10
412412 %add = add nsw i64 %mul, %j.02
413 %arrayidx = getelementptr inbounds i64* %A, i64 %add
413 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
414414 store i64 0, i64* %arrayidx, align 8
415415 %mul4 = mul nsw i64 %i.03, 10
416416 %add5 = add nsw i64 %mul4, %j.02
417417 %add6 = add nsw i64 %add5, 9
418 %arrayidx7 = getelementptr inbounds i64* %A, i64 %add6
418 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
419419 %0 = load i64* %arrayidx7, align 8
420 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
420 %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
423423 %exitcond = icmp ne i64 %inc, 10
424424 br i1 %exitcond, label %for.body3, label %for.inc8
425425
426426 for.inc8: ; preds = %for.body3
427 %scevgep = getelementptr i64* %B.addr.04, i64 10
427 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10
428428 %inc9 = add nsw i64 %i.03, 1
429429 %exitcond5 = icmp ne i64 %inc9, 10
430430 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
469469 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
470470 %mul = mul nsw i64 %i.03, 10
471471 %add = add nsw i64 %mul, %j.02
472 %arrayidx = getelementptr inbounds i64* %A, i64 %add
472 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
473473 store i64 0, i64* %arrayidx, align 8
474474 %mul4 = mul nsw i64 %i.03, 10
475475 %add5 = add nsw i64 %mul4, %j.02
476476 %add6 = add nsw i64 %add5, 10
477 %arrayidx7 = getelementptr inbounds i64* %A, i64 %add6
477 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
478478 %0 = load i64* %arrayidx7, align 8
479 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
479 %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
482482 %exitcond = icmp ne i64 %inc, 10
483483 br i1 %exitcond, label %for.body3, label %for.inc8
484484
485485 for.inc8: ; preds = %for.body3
486 %scevgep = getelementptr i64* %B.addr.04, i64 10
486 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10
487487 %inc9 = add nsw i64 %i.03, 1
488488 %exitcond5 = icmp ne i64 %inc9, 10
489489 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
528528 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
529529 %mul = mul nsw i64 %i.03, 10
530530 %add = add nsw i64 %mul, %j.02
531 %arrayidx = getelementptr inbounds i64* %A, i64 %add
531 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
532532 store i64 0, i64* %arrayidx, align 8
533533 %mul4 = mul nsw i64 %i.03, 10
534534 %add5 = add nsw i64 %mul4, %j.02
535535 %add6 = add nsw i64 %add5, 11
536 %arrayidx7 = getelementptr inbounds i64* %A, i64 %add6
536 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
537537 %0 = load i64* %arrayidx7, align 8
538 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
538 %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
541541 %exitcond = icmp ne i64 %inc, 10
542542 br i1 %exitcond, label %for.body3, label %for.inc8
543543
544544 for.inc8: ; preds = %for.body3
545 %scevgep = getelementptr i64* %B.addr.04, i64 10
545 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10
546546 %inc9 = add nsw i64 %i.03, 1
547547 %exitcond5 = icmp ne i64 %inc9, 10
548548 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
588588 %mul = mul nsw i64 %i.03, 30
589589 %mul4 = mul nsw i64 %j.02, 500
590590 %add = add nsw i64 %mul, %mul4
591 %arrayidx = getelementptr inbounds i64* %A, i64 %add
591 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
592592 store i64 0, i64* %arrayidx, align 8
593593 %0 = mul i64 %j.02, -500
594594 %sub = add i64 %i.03, %0
595595 %add6 = add nsw i64 %sub, 11
596 %arrayidx7 = getelementptr inbounds i64* %A, i64 %add6
596 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6
597597 %1 = load i64* %arrayidx7, align 8
598 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
598 %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
601601 %exitcond = icmp ne i64 %inc, 20
602602 br i1 %exitcond, label %for.body3, label %for.inc8
603603
604604 for.inc8: ; preds = %for.body3
605 %scevgep = getelementptr i64* %B.addr.04, i64 20
605 %scevgep = getelementptr i64, i64* %B.addr.04, i64 20
606606 %inc9 = add nsw i64 %i.03, 1
607607 %exitcond5 = icmp ne i64 %inc9, 20
608608 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
647647 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
648648 %mul = mul nsw i64 %j.02, 500
649649 %add = add nsw i64 %i.03, %mul
650 %arrayidx = getelementptr inbounds i64* %A, i64 %add
650 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
651651 store i64 0, i64* %arrayidx, align 8
652652 %0 = mul i64 %j.02, -500
653653 %sub = add i64 %i.03, %0
654654 %add5 = add nsw i64 %sub, 11
655 %arrayidx6 = getelementptr inbounds i64* %A, i64 %add5
655 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %add5
656656 %1 = load i64* %arrayidx6, align 8
657 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
657 %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
660660 %exitcond = icmp ne i64 %inc, 20
661661 br i1 %exitcond, label %for.body3, label %for.inc7
662662
663663 for.inc7: ; preds = %for.body3
664 %scevgep = getelementptr i64* %B.addr.04, i64 20
664 %scevgep = getelementptr i64, i64* %B.addr.04, i64 20
665665 %inc8 = add nsw i64 %i.03, 1
666666 %exitcond5 = icmp ne i64 %inc8, 20
667667 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
706706 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
707707 %mul = mul nsw i64 %i.03, 300
708708 %add = add nsw i64 %mul, %j.02
709 %arrayidx = getelementptr inbounds i64* %A, i64 %add
709 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
710710 store i64 0, i64* %arrayidx, align 8
711711 %mul4 = mul nsw i64 %i.03, 250
712712 %sub = sub nsw i64 %mul4, %j.02
713713 %add5 = add nsw i64 %sub, 11
714 %arrayidx6 = getelementptr inbounds i64* %A, i64 %add5
714 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %add5
715715 %0 = load i64* %arrayidx6, align 8
716 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
716 %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
719719 %exitcond = icmp ne i64 %inc, 20
720720 br i1 %exitcond, label %for.body3, label %for.inc7
721721
722722 for.inc7: ; preds = %for.body3
723 %scevgep = getelementptr i64* %B.addr.04, i64 20
723 %scevgep = getelementptr i64, i64* %B.addr.04, i64 20
724724 %inc8 = add nsw i64 %i.03, 1
725725 %exitcond5 = icmp ne i64 %inc8, 20
726726 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
765765 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
766766 %mul = mul nsw i64 %i.03, 100
767767 %add = add nsw i64 %mul, %j.02
768 %arrayidx = getelementptr inbounds i64* %A, i64 %add
768 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add
769769 store i64 0, i64* %arrayidx, align 8
770770 %mul4 = mul nsw i64 %i.03, 100
771771 %sub = sub nsw i64 %mul4, %j.02
772772 %add5 = add nsw i64 %sub, 11
773 %arrayidx6 = getelementptr inbounds i64* %A, i64 %add5
773 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %add5
774774 %0 = load i64* %arrayidx6, align 8
775 %incdec.ptr = getelementptr inbounds i64* %B.addr.11, i64 1
775 %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
778778 %exitcond = icmp ne i64 %inc, 20
779779 br i1 %exitcond, label %for.body3, label %for.inc7
780780
781781 for.inc7: ; preds = %for.body3
782 %scevgep = getelementptr i64* %B.addr.04, i64 20
782 %scevgep = getelementptr i64, i64* %B.addr.04, i64 20
783783 %inc8 = add nsw i64 %i.03, 1
784784 %exitcond5 = icmp ne i64 %inc8, 20
785785 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
2323 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
2424 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
2525 %conv = trunc i64 %i.02 to i32
26 %arrayidx1 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
26 %arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
2727 store i32 %conv, i32* %arrayidx1, align 4
2828 %add = add nsw i64 %i.02, 9
2929 %add2 = add nsw i64 %i.02, 10
30 %arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %add2, i64 %add
31 %0 = load i32* %arrayidx4, align 4
32 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
30 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add2, i64 %add
31 %0 = load i32* %arrayidx4, align 4
32 %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
3535 %exitcond = icmp ne i64 %inc, 50
5959 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
6060 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
6161 %conv = trunc i64 %i.02 to i32
62 %arrayidx1 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
62 %arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
6363 store i32 %conv, i32* %arrayidx1, align 4
6464 %add = add nsw i64 %i.02, 9
6565 %add2 = add nsw i64 %i.02, 9
66 %arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %add2, i64 %add
67 %0 = load i32* %arrayidx4, align 4
68 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
66 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add2, i64 %add
67 %0 = load i32* %arrayidx4, align 4
68 %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
7171 %exitcond = icmp ne i64 %inc, 50
9999 %sub = add nsw i64 %mul, -6
100100 %mul1 = mul nsw i64 %i.02, 3
101101 %sub2 = add nsw i64 %mul1, -6
102 %arrayidx3 = getelementptr inbounds [100 x i32]* %A, i64 %sub2, i64 %sub
102 %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub2, i64 %sub
103103 store i32 %conv, i32* %arrayidx3, align 4
104 %arrayidx5 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
104 %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
105105 %0 = load i32* %arrayidx5, align 4
106 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
106 %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
109109 %exitcond = icmp ne i64 %inc, 50
137137 %sub = add nsw i64 %mul, -5
138138 %mul1 = mul nsw i64 %i.02, 3
139139 %sub2 = add nsw i64 %mul1, -6
140 %arrayidx3 = getelementptr inbounds [100 x i32]* %A, i64 %sub2, i64 %sub
140 %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub2, i64 %sub
141141 store i32 %conv, i32* %arrayidx3, align 4
142 %arrayidx5 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
142 %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
143143 %0 = load i32* %arrayidx5, align 4
144 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
144 %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
147147 %exitcond = icmp ne i64 %inc, 50
176176 %sub = sub nsw i64 %mul, %conv1
177177 %mul2 = mul nsw i64 %i.02, 3
178178 %sub3 = add nsw i64 %mul2, -6
179 %arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %sub3, i64 %sub
179 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub3, i64 %sub
180180 store i32 %conv, i32* %arrayidx4, align 4
181 %arrayidx6 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
181 %arrayidx6 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
182182 %0 = load i32* %arrayidx6, align 4
183 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
183 %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
186186 %exitcond = icmp ne i64 %inc, 50
217217 %conv3 = sext i32 %n to i64
218218 %sub4 = sub nsw i64 %mul2, %conv3
219219 %add = add nsw i64 %sub4, 1
220 %arrayidx5 = getelementptr inbounds [100 x i32]* %A, i64 %add, i64 %sub
220 %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add, i64 %sub
221221 store i32 %conv, i32* %arrayidx5, align 4
222 %arrayidx7 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
222 %arrayidx7 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
223223 %0 = load i32* %arrayidx7, align 4
224 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
224 %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
227227 %exitcond = icmp ne i64 %inc, 50
253253 %conv = trunc i64 %i.02 to i32
254254 %mul = mul nsw i64 %i.02, 3
255255 %sub = add nsw i64 %mul, -6
256 %arrayidx1 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %sub
256 %arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %sub
257257 store i32 %conv, i32* %arrayidx1, align 4
258 %arrayidx3 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
258 %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
259259 %0 = load i32* %arrayidx3, align 4
260 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
260 %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
263263 %exitcond = icmp ne i64 %inc, 50
289289 %conv = trunc i64 %i.02 to i32
290290 %mul = mul nsw i64 %i.02, 3
291291 %sub = add nsw i64 %mul, -5
292 %arrayidx1 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %sub
292 %arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %sub
293293 store i32 %conv, i32* %arrayidx1, align 4
294 %arrayidx3 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
294 %arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
295295 %0 = load i32* %arrayidx3, align 4
296 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
296 %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
299299 %exitcond = icmp ne i64 %inc, 50
326326 %sub = sub nsw i64 3, %i.02
327327 %mul = mul nsw i64 %i.02, 3
328328 %sub1 = add nsw i64 %mul, -18
329 %arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
329 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
330330 store i32 %conv, i32* %arrayidx2, align 4
331 %arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
332 %0 = load i32* %arrayidx4, align 4
333 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
331 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
332 %0 = load i32* %arrayidx4, align 4
333 %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
336336 %exitcond = icmp ne i64 %inc, 16
363363 %sub = sub nsw i64 2, %i.02
364364 %mul = mul nsw i64 %i.02, 3
365365 %sub1 = add nsw i64 %mul, -18
366 %arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
366 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
367367 store i32 %conv, i32* %arrayidx2, align 4
368 %arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
369 %0 = load i32* %arrayidx4, align 4
370 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
368 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
369 %0 = load i32* %arrayidx4, align 4
370 %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
373373 %exitcond = icmp ne i64 %inc, 16
401401 %sub = sub nsw i64 6, %i.02
402402 %mul = mul nsw i64 %i.02, 3
403403 %sub1 = add nsw i64 %mul, -18
404 %arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
404 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
405405 store i32 %conv, i32* %arrayidx2, align 4
406 %arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
407 %0 = load i32* %arrayidx4, align 4
408 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
406 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
407 %0 = load i32* %arrayidx4, align 4
408 %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
411411 %exitcond = icmp ne i64 %inc, 16
439439 %sub = sub nsw i64 18, %i.02
440440 %mul = mul nsw i64 %i.02, 3
441441 %sub1 = add nsw i64 %mul, -18
442 %arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
442 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
443443 store i32 %conv, i32* %arrayidx2, align 4
444 %arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
445 %0 = load i32* %arrayidx4, align 4
446 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
444 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
445 %0 = load i32* %arrayidx4, align 4
446 %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
449449 %exitcond = icmp ne i64 %inc, 16
477477 %sub = sub nsw i64 22, %i.02
478478 %mul = mul nsw i64 %i.02, 3
479479 %sub1 = add nsw i64 %mul, -18
480 %arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
480 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
481481 store i32 %conv, i32* %arrayidx2, align 4
482 %arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
483 %0 = load i32* %arrayidx4, align 4
484 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
482 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
483 %0 = load i32* %arrayidx4, align 4
484 %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
487487 %exitcond = icmp ne i64 %inc, 13
514514 %sub = sub nsw i64 22, %i.02
515515 %mul = mul nsw i64 %i.02, 3
516516 %sub1 = add nsw i64 %mul, -18
517 %arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
517 %arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
518518 store i32 %conv, i32* %arrayidx2, align 4
519 %arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
520 %0 = load i32* %arrayidx4, align 4
521 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
519 %arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
520 %0 = load i32* %arrayidx4, align 4
521 %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
524524 %exitcond = icmp ne i64 %inc, 12
551551 %sub = sub nsw i64 18, %i.02
552552 %mul = mul nsw i64 %i.02, 3
553553 %sub1 = add nsw i64 %mul, -18
554 %arrayidx3 = getelementptr inbounds [100 x [100 x i32]]* %A, i64 %sub1, i64 %sub, i64 %i.02
554 %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
556 %arrayidx6 = getelementptr inbounds [100 x [100 x i32]]* %A, i64 %i.02, i64 %i.02, i64 %i.02
556 %arrayidx6 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %i.02, i64 %i.02, i64 %i.02
557557 %0 = load i32* %arrayidx6, align 4
558 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
558 %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
561561 %exitcond = icmp ne i64 %inc, 100
588588 %sub = sub nsw i64 22, %i.02
589589 %mul = mul nsw i64 %i.02, 3
590590 %sub1 = add nsw i64 %mul, -18
591 %arrayidx3 = getelementptr inbounds [100 x [100 x i32]]* %A, i64 %sub1, i64 %sub, i64 %i.02
591 %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
593 %arrayidx6 = getelementptr inbounds [100 x [100 x i32]]* %A, i64 %i.02, i64 %i.02, i64 %i.02
593 %arrayidx6 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %i.02, i64 %i.02, i64 %i.02
594594 %0 = load i32* %arrayidx6, align 4
595 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
595 %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
598598 %exitcond = icmp ne i64 %inc, 100
2525 %conv = trunc i64 %i.03 to i32
2626 %mul = shl nsw i64 %i.03, 2
2727 %add = add nsw i64 %mul, 10
28 %arrayidx = getelementptr inbounds i32* %A, i64 %add
28 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
2929 store i32 %conv, i32* %arrayidx, align 4
3030 %inc = add nsw i64 %i.03, 1
3131 %exitcond5 = icmp ne i64 %inc, 10
3939 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
4040 %mul5 = shl nsw i64 %j.02, 1
4141 %add64 = or i64 %mul5, 1
42 %arrayidx7 = getelementptr inbounds i32* %A, i64 %add64
42 %arrayidx7 = getelementptr inbounds i32, i32* %A, i64 %add64
4343 %0 = load i32* %arrayidx7, align 4
44 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
44 %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
4747 %exitcond = icmp ne i64 %inc9, 10
7373 %conv = trunc i64 %i.03 to i32
7474 %mul = mul nsw i64 %i.03, 11
7575 %sub = add nsw i64 %mul, -45
76 %arrayidx = getelementptr inbounds i32* %A, i64 %sub
76 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
7777 store i32 %conv, i32* %arrayidx, align 4
7878 %inc = add nsw i64 %i.03, 1
7979 %exitcond4 = icmp ne i64 %inc, 5
8585 for.body4: ; preds = %for.body4.preheader, %for.body4
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 ]
88 %arrayidx5 = getelementptr inbounds i32* %A, i64 %j.02
89 %0 = load i32* %arrayidx5, align 4
90 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
88 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
89 %0 = load i32* %arrayidx5, align 4
90 %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
9393 %exitcond = icmp ne i64 %inc7, 10
119119 %conv = trunc i64 %i.03 to i32
120120 %mul = mul nsw i64 %i.03, 11
121121 %sub = add nsw i64 %mul, -45
122 %arrayidx = getelementptr inbounds i32* %A, i64 %sub
122 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
123123 store i32 %conv, i32* %arrayidx, align 4
124124 %inc = add nsw i64 %i.03, 1
125125 %exitcond4 = icmp ne i64 %inc, 6
131131 for.body4: ; preds = %for.body4.preheader, %for.body4
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 ]
134 %arrayidx5 = getelementptr inbounds i32* %A, i64 %j.02
135 %0 = load i32* %arrayidx5, align 4
136 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
134 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
135 %0 = load i32* %arrayidx5, align 4
136 %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
139139 %exitcond = icmp ne i64 %inc7, 10
165165 %conv = trunc i64 %i.03 to i32
166166 %mul = mul nsw i64 %i.03, 11
167167 %sub = add nsw i64 %mul, -45
168 %arrayidx = getelementptr inbounds i32* %A, i64 %sub
168 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
169169 store i32 %conv, i32* %arrayidx, align 4
170170 %inc = add nsw i64 %i.03, 1
171171 %exitcond4 = icmp ne i64 %inc, 5
177177 for.body4: ; preds = %for.body4.preheader, %for.body4
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 ]
180 %arrayidx5 = getelementptr inbounds i32* %A, i64 %j.02
181 %0 = load i32* %arrayidx5, align 4
182 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
180 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
181 %0 = load i32* %arrayidx5, align 4
182 %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
185185 %exitcond = icmp ne i64 %inc7, 11
211211 %conv = trunc i64 %i.03 to i32
212212 %mul = mul nsw i64 %i.03, 11
213213 %sub = add nsw i64 %mul, -45
214 %arrayidx = getelementptr inbounds i32* %A, i64 %sub
214 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
215215 store i32 %conv, i32* %arrayidx, align 4
216216 %inc = add nsw i64 %i.03, 1
217217 %exitcond4 = icmp ne i64 %inc, 6
223223 for.body4: ; preds = %for.body4.preheader, %for.body4
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 ]
226 %arrayidx5 = getelementptr inbounds i32* %A, i64 %j.02
227 %0 = load i32* %arrayidx5, align 4
228 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
226 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
227 %0 = load i32* %arrayidx5, align 4
228 %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
231231 %exitcond = icmp ne i64 %inc7, 11
257257 %conv = trunc i64 %i.03 to i32
258258 %mul = mul nsw i64 %i.03, -11
259259 %add = add nsw i64 %mul, 45
260 %arrayidx = getelementptr inbounds i32* %A, i64 %add
260 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
261261 store i32 %conv, i32* %arrayidx, align 4
262262 %inc = add nsw i64 %i.03, 1
263263 %exitcond4 = icmp ne i64 %inc, 5
270270 %j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
271271 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
272272 %sub = sub nsw i64 0, %j.02
273 %arrayidx5 = getelementptr inbounds i32* %A, i64 %sub
274 %0 = load i32* %arrayidx5, align 4
275 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
273 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
274 %0 = load i32* %arrayidx5, align 4
275 %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
278278 %exitcond = icmp ne i64 %inc7, 10
304304 %conv = trunc i64 %i.03 to i32
305305 %mul = mul nsw i64 %i.03, -11
306306 %add = add nsw i64 %mul, 45
307 %arrayidx = getelementptr inbounds i32* %A, i64 %add
307 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
308308 store i32 %conv, i32* %arrayidx, align 4
309309 %inc = add nsw i64 %i.03, 1
310310 %exitcond4 = icmp ne i64 %inc, 6
317317 %j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
318318 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
319319 %sub = sub nsw i64 0, %j.02
320 %arrayidx5 = getelementptr inbounds i32* %A, i64 %sub
321 %0 = load i32* %arrayidx5, align 4
322 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
320 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
321 %0 = load i32* %arrayidx5, align 4
322 %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
325325 %exitcond = icmp ne i64 %inc7, 10
351351 %conv = trunc i64 %i.03 to i32
352352 %mul = mul nsw i64 %i.03, -11
353353 %add = add nsw i64 %mul, 45
354 %arrayidx = getelementptr inbounds i32* %A, i64 %add
354 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
355355 store i32 %conv, i32* %arrayidx, align 4
356356 %inc = add nsw i64 %i.03, 1
357357 %exitcond4 = icmp ne i64 %inc, 5
364364 %j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
365365 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
366366 %sub = sub nsw i64 0, %j.02
367 %arrayidx5 = getelementptr inbounds i32* %A, i64 %sub
368 %0 = load i32* %arrayidx5, align 4
369 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
367 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
368 %0 = load i32* %arrayidx5, align 4
369 %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
372372 %exitcond = icmp ne i64 %inc7, 11
398398 %conv = trunc i64 %i.03 to i32
399399 %mul = mul nsw i64 %i.03, -11
400400 %add = add nsw i64 %mul, 45
401 %arrayidx = getelementptr inbounds i32* %A, i64 %add
401 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
402402 store i32 %conv, i32* %arrayidx, align 4
403403 %inc = add nsw i64 %i.03, 1
404404 %exitcond4 = icmp ne i64 %inc, 6
411411 %j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
412412 %B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
413413 %sub = sub nsw i64 0, %j.02
414 %arrayidx5 = getelementptr inbounds i32* %A, i64 %sub
415 %0 = load i32* %arrayidx5, align 4
416 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
414 %arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
415 %0 = load i32* %arrayidx5, align 4
416 %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
419419 %exitcond = icmp ne i64 %inc7, 11
451451 %conv = trunc i64 %i.03 to i32
452452 %mul = mul nsw i64 %i.03, 11
453453 %sub = sub nsw i64 %mul, %j.02
454 %arrayidx = getelementptr inbounds i32* %A, i64 %sub
455 store i32 %conv, i32* %arrayidx, align 4
456 %arrayidx4 = getelementptr inbounds i32* %A, i64 45
454 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
455 store i32 %conv, i32* %arrayidx, align 4
456 %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
457457 %0 = load i32* %arrayidx4, align 4
458 %incdec.ptr = getelementptr inbounds i32* %B.addr.11, i64 1
458 %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
461461 %exitcond = icmp ne i64 %inc, 10
462462 br i1 %exitcond, label %for.body3, label %for.inc5
463463
464464 for.inc5: ; preds = %for.body3
465 %scevgep = getelementptr i32* %B.addr.04, i64 10
465 %scevgep = getelementptr i32, i32* %B.addr.04, i64 10
466466 %inc6 = add nsw i64 %i.03, 1
467467 %exitcond5 = icmp ne i64 %inc6, 5
468468 br i1 %exitcond5, label %for.cond1.preheader, label %for.end7
500500 %conv = trunc i64 %i.03 to i32
501501 %mul = mul nsw i64 %i.03, 11
502502 %sub = sub nsw i64 %mul, %j.02
503 %arrayidx = getelementptr inbounds i32* %A, i64 %sub
504 store i32 %conv, i32* %arrayidx, align 4
505 %arrayidx4 = getelementptr inbounds i32* %A, i64 45
503 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
504 store i32 %conv, i32* %arrayidx, align 4
505 %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
506506 %0 = load i32* %arrayidx4, align 4
507 %incdec.ptr = getelementptr inbounds i32* %B.addr.11, i64 1
507 %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
510510 %exitcond = icmp ne i64 %inc, 10
511511 br i1 %exitcond, label %for.body3, label %for.inc5
512512
513513 for.inc5: ; preds = %for.body3
514 %scevgep = getelementptr i32* %B.addr.04, i64 10
514 %scevgep = getelementptr i32, i32* %B.addr.04, i64 10
515515 %inc6 = add nsw i64 %i.03, 1
516516 %exitcond5 = icmp ne i64 %inc6, 6
517517 br i1 %exitcond5, label %for.cond1.preheader, label %for.end7
548548 %conv = trunc i64 %i.03 to i32
549549 %mul = mul nsw i64 %i.03, 11
550550 %sub = sub nsw i64 %mul, %j.02
551 %arrayidx = getelementptr inbounds i32* %A, i64 %sub
552 store i32 %conv, i32* %arrayidx, align 4
553 %arrayidx4 = getelementptr inbounds i32* %A, i64 45
551 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
552 store i32 %conv, i32* %arrayidx, align 4
553 %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
554554 %0 = load i32* %arrayidx4, align 4
555 %incdec.ptr = getelementptr inbounds i32* %B.addr.11, i64 1
555 %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
558558 %exitcond = icmp ne i64 %inc, 11
559559 br i1 %exitcond, label %for.body3, label %for.inc5
560560
561561 for.inc5: ; preds = %for.body3
562 %scevgep = getelementptr i32* %B.addr.04, i64 11
562 %scevgep = getelementptr i32, i32* %B.addr.04, i64 11
563563 %inc6 = add nsw i64 %i.03, 1
564564 %exitcond5 = icmp ne i64 %inc6, 5
565565 br i1 %exitcond5, label %for.cond1.preheader, label %for.end7
596596 %conv = trunc i64 %i.03 to i32
597597 %mul = mul nsw i64 %i.03, 11
598598 %sub = sub nsw i64 %mul, %j.02
599 %arrayidx = getelementptr inbounds i32* %A, i64 %sub
600 store i32 %conv, i32* %arrayidx, align 4
601 %arrayidx4 = getelementptr inbounds i32* %A, i64 45
599 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
600 store i32 %conv, i32* %arrayidx, align 4
601 %arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
602602 %0 = load i32* %arrayidx4, align 4
603 %incdec.ptr = getelementptr inbounds i32* %B.addr.11, i64 1
603 %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
606606 %exitcond = icmp ne i64 %inc, 11
607607 br i1 %exitcond, label %for.body3, label %for.inc5
608608
609609 for.inc5: ; preds = %for.body3
610 %scevgep = getelementptr i32* %B.addr.04, i64 11
610 %scevgep = getelementptr i32, i32* %B.addr.04, i64 11
611611 %inc6 = add nsw i64 %i.03, 1
612612 %exitcond5 = icmp ne i64 %inc6, 6
613613 br i1 %exitcond5, label %for.cond1.preheader, label %for.end7
2424 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
2525 %conv = trunc i64 %i.02 to i32
2626 %add = add i64 %i.02, 10
27 %arrayidx = getelementptr inbounds i32* %A, i64 %add
27 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
2828 store i32 %conv, i32* %arrayidx, align 4
2929 %mul = shl i64 %i.02, 1
3030 %add13 = or i64 %mul, 1
31 %arrayidx2 = getelementptr inbounds i32* %A, i64 %add13
32 %0 = load i32* %arrayidx2, align 4
33 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
31 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %add13
32 %0 = load i32* %arrayidx2, align 4
33 %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
3636 %exitcond = icmp ne i64 %inc, 10
6262 %conv = trunc i64 %i.02 to i32
6363 %mul = shl i64 %i.02, 2
6464 %add = add i64 %mul, 10
65 %arrayidx = getelementptr inbounds i32* %A, i64 %add
65 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
6666 store i32 %conv, i32* %arrayidx, align 4
6767 %mul1 = shl i64 %i.02, 1
6868 %add23 = or i64 %mul1, 1
69 %arrayidx3 = getelementptr inbounds i32* %A, i64 %add23
69 %arrayidx3 = getelementptr inbounds i32, i32* %A, i64 %add23
7070 %0 = load i32* %arrayidx3, align 4
71 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
71 %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
7474 %exitcond = icmp ne i64 %inc, 10
9999 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
100100 %conv = trunc i64 %i.02 to i32
101101 %mul = mul i64 %i.02, 6
102 %arrayidx = getelementptr inbounds i32* %A, i64 %mul
102 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
103103 store i32 %conv, i32* %arrayidx, align 4
104104 %add = add i64 %i.02, 60
105 %arrayidx1 = getelementptr inbounds i32* %A, i64 %add
105 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
106106 %0 = load i32* %arrayidx1, align 4
107 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
107 %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
110110 %exitcond = icmp ne i64 %inc, 10
135135 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
136136 %conv = trunc i64 %i.02 to i32
137137 %mul = mul i64 %i.02, 6
138 %arrayidx = getelementptr inbounds i32* %A, i64 %mul
138 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
139139 store i32 %conv, i32* %arrayidx, align 4
140140 %add = add i64 %i.02, 60
141 %arrayidx1 = getelementptr inbounds i32* %A, i64 %add
141 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
142142 %0 = load i32* %arrayidx1, align 4
143 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
143 %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
146146 %exitcond = icmp ne i64 %inc, 11
171171 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
172172 %conv = trunc i64 %i.02 to i32
173173 %mul = mul i64 %i.02, 6
174 %arrayidx = getelementptr inbounds i32* %A, i64 %mul
174 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
175175 store i32 %conv, i32* %arrayidx, align 4
176176 %add = add i64 %i.02, 60
177 %arrayidx1 = getelementptr inbounds i32* %A, i64 %add
177 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
178178 %0 = load i32* %arrayidx1, align 4
179 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
179 %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
182182 %exitcond = icmp ne i64 %inc, 12
207207 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
208208 %conv = trunc i64 %i.02 to i32
209209 %mul = mul i64 %i.02, 6
210 %arrayidx = getelementptr inbounds i32* %A, i64 %mul
210 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
211211 store i32 %conv, i32* %arrayidx, align 4
212212 %add = add i64 %i.02, 60
213 %arrayidx1 = getelementptr inbounds i32* %A, i64 %add
213 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
214214 %0 = load i32* %arrayidx1, align 4
215 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
215 %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
218218 %exitcond = icmp ne i64 %inc, 13
243243 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
244244 %conv = trunc i64 %i.02 to i32
245245 %mul = mul i64 %i.02, 6
246 %arrayidx = getelementptr inbounds i32* %A, i64 %mul
246 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
247247 store i32 %conv, i32* %arrayidx, align 4
248248 %add = add i64 %i.02, 60
249 %arrayidx1 = getelementptr inbounds i32* %A, i64 %add
249 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
250250 %0 = load i32* %arrayidx1, align 4
251 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
251 %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
254254 %exitcond = icmp ne i64 %inc, 18
279279 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
280280 %conv = trunc i64 %i.02 to i32
281281 %mul = mul i64 %i.02, 6
282 %arrayidx = getelementptr inbounds i32* %A, i64 %mul
282 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
283283 store i32 %conv, i32* %arrayidx, align 4
284284 %add = add i64 %i.02, 60
285 %arrayidx1 = getelementptr inbounds i32* %A, i64 %add
285 %arrayidx1 = getelementptr inbounds i32, i32* %A, i64 %add
286286 %0 = load i32* %arrayidx1, align 4
287 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
287 %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
290290 %exitcond = icmp ne i64 %inc, 19
315315 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
316316 %conv = trunc i64 %i.02 to i32
317317 %mul = mul i64 %i.02, -6
318 %arrayidx = getelementptr inbounds i32* %A, i64 %mul
318 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
319319 store i32 %conv, i32* %arrayidx, align 4
320320 %sub1 = sub i64 -60, %i.02
321 %arrayidx2 = getelementptr inbounds i32* %A, i64 %sub1
322 %0 = load i32* %arrayidx2, align 4
323 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
321 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub1
322 %0 = load i32* %arrayidx2, align 4
323 %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
326326 %exitcond = icmp ne i64 %inc, 10
351351 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
352352 %conv = trunc i64 %i.02 to i32
353353 %mul = mul i64 %i.02, -6
354 %arrayidx = getelementptr inbounds i32* %A, i64 %mul
354 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
355355 store i32 %conv, i32* %arrayidx, align 4
356356 %sub1 = sub i64 -60, %i.02
357 %arrayidx2 = getelementptr inbounds i32* %A, i64 %sub1
358 %0 = load i32* %arrayidx2, align 4
359 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
357 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub1
358 %0 = load i32* %arrayidx2, align 4
359 %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
362362 %exitcond = icmp ne i64 %inc, 11
387387 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
388388 %conv = trunc i64 %i.02 to i32
389389 %mul = mul i64 %i.02, -6
390 %arrayidx = getelementptr inbounds i32* %A, i64 %mul
390 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
391391 store i32 %conv, i32* %arrayidx, align 4
392392 %sub1 = sub i64 -60, %i.02
393 %arrayidx2 = getelementptr inbounds i32* %A, i64 %sub1
394 %0 = load i32* %arrayidx2, align 4
395 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
393 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub1
394 %0 = load i32* %arrayidx2, align 4
395 %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
398398 %exitcond = icmp ne i64 %inc, 12
423423 %B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
424424 %conv = trunc i64 %i.02 to i32
425425 %mul = mul i64 %i.02, -6
426 %arrayidx = getelementptr inbounds i32* %A, i64 %mul
426 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %mul
427427 store i32 %conv, i32* %arrayidx, align 4
428428 %sub1 = sub i64 -60, %i.02
429 %arrayidx2 = getelementptr inbounds i32* %A, i64 %sub1
430 %0 = load i32* %arrayidx2, align 4
431 %incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
429 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %sub1
430 %0 = load i32* %arrayidx2, align 4
431 %incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
432432 store i32 %0, i32* %B.addr.01, align 4
433433