llvm.org GIT mirror llvm / 5a70dd1
[opaque pointer type] Add textual IR support for explicit type parameter to gep operator Similar to gep (r230786) and load (r230794) changes. Similar migration script can be used to update test cases, which successfully migrated all of LLVM and Polly, but about 4 test cases needed manually changes in Clang. (this script will read the contents of stdin and massage it into stdout - wrap it in the 'apply.sh' script shown in previous commits + xargs to apply it over a large set of test cases) import fileinput import sys import re rep = re.compile(r"(getelementptr(?:\s+inbounds)?\s*\()((<\d*\s+x\s+)?([^@]*?)(|\s*addrspace\(\d+\))\s*\*(?(3)>)\s*)(?=$|%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|zeroinitializer|<|\[\[[a-zA-Z]|\{\{)", re.MULTILINE | re.DOTALL) def conv(match): line = match.group(1) line += match.group(4) line += ", " line += match.group(2) return line line = sys.stdin.read() off = 0 for match in re.finditer(rep, line): sys.stdout.write(line[off:match.start()]) sys.stdout.write(conv(match)) off = match.end() sys.stdout.write(line[off:]) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232184 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 4 years ago
717 changed file(s) with 2794 addition(s) and 2770 deletion(s). Raw diff Collapse all Expand all
27062706 Convert a constant pointer or constant vector of pointer, CST, to another
27072707 TYPE in a different address space. The constraints of the operands are the
27082708 same as those for the :ref:`addrspacecast instruction `.
2709 ``getelementptr (CSTPTR, IDX0, IDX1, ...)``, ``getelementptr inbounds (CSTPTR, IDX0, IDX1, ...)``
2709 ``getelementptr (TY, CSTPTR, IDX0, IDX1, ...)``, ``getelementptr inbounds (TY, CSTPTR, IDX0, IDX1, ...)``
27102710 Perform the :ref:`getelementptr operation ` on
27112711 constants. As with the :ref:`getelementptr `
27122712 instruction, the index list may have zero or more indexes, which are
2713 required to make sense for the type of "CSTPTR".
2713 required to make sense for the type of "pointer to TY".
27142714 ``select (COND, VAL1, VAL2)``
27152715 Perform the :ref:`select operation ` on constants.
27162716 ``icmp COND (VAL1, VAL2)``
27762776 unsigned Opc = Lex.getUIntVal();
27772777 SmallVector Elts;
27782778 bool InBounds = false;
2779 Type *Ty;
27792780 Lex.Lex();
2781
27802782 if (Opc == Instruction::GetElementPtr)
27812783 InBounds = EatIfPresent(lltok::kw_inbounds);
2782 if (ParseToken(lltok::lparen, "expected '(' in constantexpr") ||
2783 ParseGlobalValueVector(Elts) ||
2784
2785 if (ParseToken(lltok::lparen, "expected '(' in constantexpr"))
2786 return true;
2787
2788 LocTy ExplicitTypeLoc = Lex.getLoc();
2789 if (Opc == Instruction::GetElementPtr) {
2790 if (ParseType(Ty) ||
2791 ParseToken(lltok::comma, "expected comma after getelementptr's type"))
2792 return true;
2793 }
2794
2795 if (ParseGlobalValueVector(Elts) ||
27842796 ParseToken(lltok::rparen, "expected ')' in constantexpr"))
27852797 return true;
27862798
27912803
27922804 Type *BaseType = Elts[0]->getType();
27932805 auto *BasePointerType = cast(BaseType->getScalarType());
2806 if (Ty != BasePointerType->getElementType())
2807 return Error(
2808 ExplicitTypeLoc,
2809 "explicit pointee type doesn't match operand's pointee type");
27942810
27952811 ArrayRef Indices(Elts.begin() + 1, Elts.end());
27962812 for (Constant *Val : Indices) {
12221222 Out << ' ' << getPredicateText(CE->getPredicate());
12231223 Out << " (";
12241224
1225 if (const GEPOperator *GEP = dyn_cast(CE)) {
1226 TypePrinter.print(
1227 cast(GEP->getPointerOperandType()->getScalarType())
1228 ->getElementType(),
1229 Out);
1230 Out << ", ";
1231 }
1232
12251233 for (User::const_op_iterator OI=CE->op_begin(); OI != CE->op_end(); ++OI) {
12261234 TypePrinter.print((*OI)->getType(), Out);
12271235 Out << ' ';
1414 define void @test() {
1515 %D = getelementptr %T, %T* @G, i64 0, i32 0
1616 %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
17 %F = getelementptr i32, i32* getelementptr (%T, %T* @G, i64 0, i32 0), i64 0
18 %X = getelementptr [10 x i8], [10 x i8]* getelementptr (%T, %T* @G, i64 0, i32 1), i64 0, i64 5
1919
2020 ret void
2121 }
77 ; CHECK: %tmp7 = load
88 ; CHECK: ret i32 %tmp7
99 entry:
10 store i32 1, i32* getelementptr (%struct.B* @a, i32 0, i32 0, i32 0), align 8
10 store i32 1, i32* getelementptr (%struct.B, %struct.B* @a, i32 0, i32 0, i32 0), align 8
1111 %tmp4 = getelementptr %struct.A, %struct.A* %b, i32 0, i32 0 ; [#uses=1]
1212 store i32 0, i32* %tmp4, align 4
13 %tmp7 = load i32, i32* getelementptr (%struct.B* @a, i32 0, i32 0, i32 0), align 8 ; [#uses=1]
13 %tmp7 = load i32, i32* getelementptr (%struct.B, %struct.B* @a, i32 0, i32 0, i32 0), align 8 ; [#uses=1]
1414 ret i32 %tmp7
1515 }
88
99 define void @test291() nounwind {
1010 entry:
11 store i32 1138410269, i32* getelementptr ([5 x %struct.S291]* @a291, i32 0, i32 2, i32 1)
12 %tmp54 = load i32, i32* bitcast (%struct.S291* getelementptr ([5 x %struct.S291]* @a291, i32 0, i32 2) to i32*), align 4 ; [#uses=0]
11 store i32 1138410269, i32* getelementptr ([5 x %struct.S291], [5 x %struct.S291]* @a291, i32 0, i32 2, i32 1)
12 %tmp54 = load i32, i32* bitcast (%struct.S291* getelementptr ([5 x %struct.S291], [5 x %struct.S291]* @a291, i32 0, i32 2) to i32*), align 4 ; [#uses=0]
1313 unreachable
1414 }
88
99 define i32 @main() nounwind uwtable ssp {
1010 entry:
11 %tmp = load i8, i8* getelementptr inbounds ({ i8, i8, i8, i8, i8 }* @a, i64 0, i32 4), align 4
11 %tmp = load i8, i8* getelementptr inbounds ({ i8, i8, i8, i8, i8 }, { i8, i8, i8, i8, i8 }* @a, i64 0, i32 4), align 4
1212 %tmp1 = or i8 %tmp, -128
13 store i8 %tmp1, i8* getelementptr inbounds ({ i8, i8, i8, i8, i8 }* @a, i64 0, i32 4), align 4
13 store i8 %tmp1, i8* getelementptr inbounds ({ i8, i8, i8, i8, i8 }, { i8, i8, i8, i8, i8 }* @a, i64 0, i32 4), align 4
1414 %tmp2 = load i64, i64* bitcast ({ i8, i8, i8, i8, i8 }* @a to i64*), align 8
15 store i8 11, i8* getelementptr inbounds ({ i8, i8, i8, i8, i8 }* @a, i64 0, i32 4), align 4
15 store i8 11, i8* getelementptr inbounds ({ i8, i8, i8, i8, i8 }, { i8, i8, i8, i8, i8 }* @a, i64 0, i32 4), align 4
1616 %tmp3 = trunc i64 %tmp2 to i32
1717 ret i32 %tmp3
1818
9696 call void @external(i32* %X)
9797
9898 %Y = load i32, i32* %X
99 store i32 5, i32* getelementptr ({ i32 }* @Global, i64 0, i32 0)
99 store i32 5, i32* getelementptr ({ i32 }, { i32 }* @Global, i64 0, i32 0)
100100 %REMOVE = load i32, i32* %X
101101 %retval = sub i32 %Y, %REMOVE
102102 ret i32 %retval
1313 br label %for.body4
1414
1515 for.body4: ; preds = %for.body4, %for.cond2.preheader
16 %lsr.iv4 = phi [16000 x double]* [ %i11, %for.body4 ], [ bitcast (double* getelementptr inbounds ([16000 x double]* @Y, i64 0, i64 8)
16 %lsr.iv4 = phi [16000 x double]* [ %i11, %for.body4 ], [ bitcast (double* getelementptr inbounds ([16000 x double], [16000 x double]* @Y, i64 0, i64 8)
1717 to [16000 x double]*), %for.cond2.preheader ]
1818 %lsr.iv1 = phi [16000 x double]* [ %i10, %for.body4 ], [ @X, %for.cond2.preheader ]
1919
1010 define void @test_no_crash() #0 {
1111 entry:
1212 call i8* asm "nop", "=r,r"(
13 i8* getelementptr inbounds ([1 x i8]* @G, i64 0, i64 0))
13 i8* getelementptr inbounds ([1 x i8], [1 x i8]* @G, i64 0, i64 0))
1414 ret void
1515 }
1818 ; CHECK: MayAlias: i32* %F, i8* %X
1919 define void @test() {
2020 %D = getelementptr %T, %T* @G, i64 0, i32 0
21 %F = getelementptr i32, i32* getelementptr (%T* @G, i64 0, i32 0), i64 0
22 %X = getelementptr [10 x i8], [10 x i8]* getelementptr (%T* @G, i64 0, i32 1), i64 0, i64 5
21 %F = getelementptr i32, i32* getelementptr (%T, %T* @G, i64 0, i32 0), i64 0
22 %X = getelementptr [10 x i8], [10 x i8]* getelementptr (%T, %T* @G, i64 0, i32 1), i64 0, i64 5
2323
2424 ret void
2525 }
2929 ; CHECK: MayAlias: i32* %H, i32* %arg0
3030 ; CHECK: MayAlias: i32* %F, i32* %H
3131 define void @simplecheck(i32* %arg0) {
32 %F = getelementptr i32, i32* getelementptr (%T* @G, i64 0, i32 0), i64 0
32 %F = getelementptr i32, i32* getelementptr (%T, %T* @G, i64 0, i32 0), i64 0
3333 %H = getelementptr %T, %T* @G2, i64 0, i32 0
3434
3535 ret void
4747 define void @checkNesting(i32* %arg0) {
4848 %A = getelementptr [1 x i32],
4949 [1 x i32]* getelementptr
50 ([1 x [1 x i32]]* getelementptr (%NestedT* @NT, i64 0, i32 0),
50 ([1 x [1 x i32]], [1 x [1 x i32]]* getelementptr (%NestedT, %NestedT* @NT, i64 0, i32 0),
5151 i64 0,
5252 i32 0),
5353 i64 0,
3535 for.body3:
3636 %j.011 = phi i32 [ %inc, %for.body3 ], [ 0, %for.body3.preheader ]
3737 %0 = load i32, i32* %arrayidx
38 store i32 %0, i32* getelementptr inbounds (%struct.s* @S, i64 0, i32 0, i64 0, i64 0)
38 store i32 %0, i32* getelementptr inbounds (%struct.s, %struct.s* @S, i64 0, i32 0, i64 0, i64 0)
3939 %inc = add nuw nsw i32 %j.011, 1
4040 %exitcond = icmp eq i32 %inc, %N
4141 br i1 %exitcond, label %for.inc4, label %for.body3
2121 define i32 @main() nounwind uwtable ssp {
2222 main_entry:
2323 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* bitcast (%struct.anon* @b to i8*), i8* bitcast (%struct.anon* @a to i8*), i64 12, i32 4, i1 false)
24 %0 = load volatile i32, i32* getelementptr inbounds (%struct.anon* @b, i64 0, i32 0), align 4
24 %0 = load volatile i32, i32* getelementptr inbounds (%struct.anon, %struct.anon* @b, i64 0, i32 0), align 4
2525 store i32 %0, i32* @c, align 4
2626 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* bitcast (%struct.anon* @b to i8*), i8* bitcast (%struct.anon* @a to i8*), i64 12, i32 4, i1 false) nounwind
27 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i32 %0) nounwind
27 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0) nounwind
2828 ret i32 0
2929 }
118118 ; CHECK-NOT: ->
119119
120120 load i8*, i8** bitcast (void ()** @g to i8**)
121 load i8*, i8** bitcast (void ()** getelementptr ([4 x void ()*]* @g1, i32 0, i32 2) to i8**)
122 load i8*, i8** bitcast (void ()** getelementptr ({i8, void ()*, i8}* @g2, i32 0, i32 1) to i8**)
121 load i8*, i8** bitcast (void ()** getelementptr ([4 x void ()*], [4 x void ()*]* @g1, i32 0, i32 2) to i8**)
122 load i8*, i8** bitcast (void ()** getelementptr ({i8, void ()*, i8}, {i8, void ()*, i8}* @g2, i32 0, i32 1) to i8**)
123123 load i8*, i8** bitcast (void ()** @h to i8**)
124124 ret void
125125 }
2424
2525 for.body: ; preds = %for.cond
2626 %idxprom = sext i32 %0 to i64
27 %arrayidx = getelementptr inbounds [0 x i32], [0 x i32]* getelementptr inbounds ([1 x [0 x i32]]* @g_244, i32 0, i64 0), i32 0, i64 %idxprom
27 %arrayidx = getelementptr inbounds [0 x i32], [0 x i32]* getelementptr inbounds ([1 x [0 x i32]], [1 x [0 x i32]]* @g_244, i32 0, i64 0), i32 0, i64 %idxprom
2828 %1 = load i32, i32* %arrayidx, align 1
2929 store i32 %1, i32* @func_21_l_773, align 4
3030 store i32 1, i32* @g_814, align 4
6464 br label %for.cond
6565
6666 for.end: ; preds = %for.body, %for.cond
67 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i32 %g_4.0) nounwind ; [#uses=0]
67 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %g_4.0) nounwind ; [#uses=0]
6868 ret i32 0
6969 }
7070
88 ; Function Attrs: nounwind ssp uwtable
99 define i32 @main() {
1010 ; CHECK-LABEL: Classifying expressions for: @main
11 store i8 0, i8* getelementptr inbounds (%struct.anon* @a, i64 0, i32 0), align 1
11 store i8 0, i8* getelementptr inbounds (%struct.anon, %struct.anon* @a, i64 0, i32 0), align 1
1212 br label %loop
1313
1414 loop:
1515 %storemerge1 = phi i8 [ 0, %0 ], [ %inc, %loop ]
16 %m = load volatile i32, i32* getelementptr inbounds (%struct.S* @b, i64 0, i32 0), align 4
16 %m = load volatile i32, i32* getelementptr inbounds (%struct.S, %struct.S* @b, i64 0, i32 0), align 4
1717 %inc = add nuw i8 %storemerge1, 1
1818 ; CHECK: %inc = add nuw i8 %storemerge1, 1
1919 ; CHECK-NEXT: --> {1,+,1}<%loop>
2222 br i1 %exitcond, label %exit, label %loop
2323
2424 exit:
25 store i8 -128, i8* getelementptr inbounds (%struct.anon* @a, i64 0, i32 0), align 1
25 store i8 -128, i8* getelementptr inbounds (%struct.anon, %struct.anon* @a, i64 0, i32 0), align 1
2626 ret i32 0
2727 }
5555 br label %bb5
5656
5757 bb5: ; preds = %bb4.bb5_crit_edge, %entry
58 %tmp12 = load i32, i32* getelementptr ([32 x [256 x i32]]* @table, i64 0, i64 9, i64 132), align 16 ; [#uses=1]
58 %tmp12 = load i32, i32* getelementptr ([32 x [256 x i32]], [32 x [256 x i32]]* @table, i64 0, i64 9, i64 132), align 16 ; [#uses=1]
5959 %tmp13 = icmp eq i32 %tmp12, -1116 ; [#uses=1]
6060 br i1 %tmp13, label %bb7, label %bb6
6161
6262
6363 for.end9: ; preds = %entry.for.end9_crit_edge, %for.cond.for.end9_crit_edge
6464 %3 = phi i32 [ %.pre, %entry.for.end9_crit_edge ], [ %shl, %for.cond.for.end9_crit_edge ]
65 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i32 %3) #2
65 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3) #2
6666 br label %return
6767
6868 return.loopexit.split: ; preds = %for.cond1.preheader.lr.ph
1616 entry:
1717 ; CHECK-LABEL: @test
1818 ; CHECK: load i32*, i32** %p1, align 8, !tbaa
19 ; CHECK: load i32*, i32** getelementptr (%classC* null, i32 0, i32 1, i32 0, i32 0), align 8, !tbaa
19 ; CHECK: load i32*, i32** getelementptr (%classC, %classC* null, i32 0, i32 1, i32 0, i32 0), align 8, !tbaa
2020 ; CHECK: call void @callee
2121 %0 = load i32*, i32** %p1, align 8, !tbaa !1
22 %1 = load i32*, i32** getelementptr (%classC* null, i32 0, i32 1, i32 0, i32 0), align 8, !tbaa !5
22 %1 = load i32*, i32** getelementptr (%classC, %classC* null, i32 0, i32 1, i32 0, i32 0), align 8, !tbaa !5
2323 call void @callee(i32* %0, i32* %1)
2424 unreachable
2525 }
77 br label %BB1
88
99 BB1: ; preds = %BB2, %0
10 %ret = phi i8* [ getelementptr ([12 x i8]* @.LC0, i64 0, i64 0), %0 ], [ null, %BB2 ] ; [#uses=1]
10 %ret = phi i8* [ getelementptr ([12 x i8], [12 x i8]* @.LC0, i64 0, i64 0), %0 ], [ null, %BB2 ] ; [#uses=1]
1111 ret i8* %ret
1212
1313 BB2: ; No predecessors!
33 @.LC0 = internal global [12 x i8] c"hello world\00" ; <[12 x i8]*> [#uses=1]
44
55 define i8* @test() {
6 ret i8* getelementptr ([12 x i8]* @.LC0, i64 0, i64 0)
6 ret i8* getelementptr ([12 x i8], [12 x i8]* @.LC0, i64 0, i64 0)
77 }
88
1717
1818 define void @main() {
1919 bb1:
20 %reg211 = call i32 @puts( i8* getelementptr ([4 x i8]* @.LC0, i64 0, i64 0) ) ; [#uses=0]
20 %reg211 = call i32 @puts( i8* getelementptr ([4 x i8], [4 x i8]* @.LC0, i64 0, i64 0) ) ; [#uses=0]
2121 ret void
2222 }
33 @.str_1 = internal constant [6 x i8] c"_Bool\00" ; <[6 x i8]*> [#uses=2]
44
55 define i32 @test() {
6 %tmp.54 = load i8, i8* getelementptr ([6 x i8]* @.str_1, i64 0, i64 1) ; [#uses=1]
6 %tmp.54 = load i8, i8* getelementptr ([6 x i8], [6 x i8]* @.str_1, i64 0, i64 1) ; [#uses=1]
77 %tmp.55 = icmp ne i8 %tmp.54, 66 ; [#uses=1]
88 br i1 %tmp.55, label %then.7, label %endif.7
99
66 @data_triangleItems = internal constant [2908 x %struct.TTriangleItem] zeroinitializer; <[2908 x %struct.TTriangleItem]*> [#uses=2]
77
88 define void @foo() {
9 store i16 0, i16* getelementptr ([2908 x %struct.TTriangleItem]* @data_triangleItems, i64 0, i64 0, i32 2, i64 0, i32 0)
9 store i16 0, i16* getelementptr ([2908 x %struct.TTriangleItem], [2908 x %struct.TTriangleItem]* @data_triangleItems, i64 0, i64 0, i32 2, i64 0, i32 0)
1010 ret void
1111 }
1212
77 entry:
88 %tmp65 = getelementptr i8*, i8** %argv, i32 1 ; [#uses=1]
99 %tmp66 = load i8*, i8** %tmp65 ; [#uses=0]
10 br i1 icmp ne (i32 sub (i32 ptrtoint (i8* getelementptr ([4 x i8]* @str, i32 0, i64 1) to i32), i32 ptrtoint ([4 x i8]* @str to i32)), i32 1), label %exit_1, label %exit_2
10 br i1 icmp ne (i32 sub (i32 ptrtoint (i8* getelementptr ([4 x i8], [4 x i8]* @str, i32 0, i64 1) to i32), i32 ptrtoint ([4 x i8]* @str to i32)), i32 1), label %exit_1, label %exit_2
1111
1212 exit_1: ; preds = %entry
1313 ret i32 0
1111
1212 define void @foo() {
1313 entry:
14 %tmp1 = load i32 addrspace(33)*, i32 addrspace(33)* addrspace(42)* getelementptr (%struct.mystruct addrspace(42)* @input, i32 0, i32 3), align 4 ; [#uses=1]
15 store i32 addrspace(33)* %tmp1, i32 addrspace(33)* addrspace(66)* getelementptr (%struct.mystruct addrspace(66)* @output, i32 0, i32 1), align 4
14 %tmp1 = load i32 addrspace(33)*, i32 addrspace(33)* addrspace(42)* getelementptr (%struct.mystruct, %struct.mystruct addrspace(42)* @input, i32 0, i32 3), align 4 ; [#uses=1]
15 store i32 addrspace(33)* %tmp1, i32 addrspace(33)* addrspace(66)* getelementptr (%struct.mystruct, %struct.mystruct addrspace(66)* @output, i32 0, i32 1), align 4
1616 ret void
1717 }
1818
11 ; RUN: verify-uselistorder %s
22
33 @foo = global i32 0
4 @bar = constant i32* getelementptr(i32* @foo)
4 @bar = constant i32* getelementptr(i32, i32* @foo)
55
66 %struct.anon = type { i32, i32 }
77 %struct.test = type { i64, %struct.anon, %struct.test* }
88
9 @TestArrayPtr = global %struct.test* getelementptr inbounds ([10 x %struct.test]* @TestArray, i64 0, i64 3) ; <%struct.test**> [#uses=1]
9 @TestArrayPtr = global %struct.test* getelementptr inbounds ([10 x %struct.test], [10 x %struct.test]* @TestArray, i64 0, i64 3) ; <%struct.test**> [#uses=1]
1010 @TestArray = common global [10 x %struct.test] zeroinitializer, align 32 ; <[10 x %struct.test]*> [#uses=2]
1111
1212 define i32 @main() nounwind readonly {
1818 %Ty = type { i32, i32 }
1919 @B = external global %Ty
2020
21 global i1 icmp slt (i64* @A, i64* getelementptr (i64* @A, i64 1)) ; true
22 global i1 icmp ult (i64* @A, i64* getelementptr (i64* @A, i64 1)) ; true
23 global i1 icmp slt (i64* @A, i64* getelementptr (i64* @A, i64 0)) ; false
24 global i1 icmp slt (i32* getelementptr (%Ty* @B, i64 0, i32 0),
25 i32* getelementptr (%Ty* @B, i64 0, i32 1)) ; true
21 global i1 icmp slt (i64* @A, i64* getelementptr (i64, i64* @A, i64 1)) ; true
22 global i1 icmp ult (i64* @A, i64* getelementptr (i64, i64* @A, i64 1)) ; true
23 global i1 icmp slt (i64* @A, i64* getelementptr (i64, i64* @A, i64 0)) ; false
24 global i1 icmp slt (i32* getelementptr (%Ty, %Ty* @B, i64 0, i32 0),
25 i32* getelementptr (%Ty, %Ty* @B, i64 0, i32 1)) ; true
2626 ;global i1 icmp ne (i64* @A, i64* bitcast (%Ty* @B to i64*)) ; true
2727
2828 ; PR2206
1313 ; icmp should return true. It's not valid to *dereference* in @B from a pointer
1414 ; based on @A, but icmp isn't a dereference.
1515
16 ; CHECK: @C = global i1 icmp eq (i64* getelementptr inbounds (i64* @A, i64 1), i64* @B)
17 @C = global i1 icmp eq (i64* getelementptr inbounds (i64* @A, i64 1), i64* @B)
16 ; CHECK: @C = global i1 icmp eq (i64* getelementptr inbounds (i64, i64* @A, i64 1), i64* @B)
17 @C = global i1 icmp eq (i64* getelementptr inbounds (i64, i64* @A, i64 1), i64* @B)
1818
1919 ; Don't fold this completely away either. In theory this could be simplified
2020 ; to only use a gep on one side of the icmp though.
2121
22 ; CHECK: @D = global i1 icmp eq (i64* getelementptr inbounds (i64* @A, i64 1), i64* getelementptr inbounds (i64* @B, i64 2))
23 @D = global i1 icmp eq (i64* getelementptr inbounds (i64* @A, i64 1), i64* getelementptr inbounds (i64* @B, i64 2))
22 ; CHECK: @D = global i1 icmp eq (i64* getelementptr inbounds (i64, i64* @A, i64 1), i64* getelementptr inbounds (i64, i64* @B, i64 2))
23 @D = global i1 icmp eq (i64* getelementptr inbounds (i64, i64* @A, i64 1), i64* getelementptr inbounds (i64, i64* @B, i64 2))
2424
2525 ; CHECK: @E = global i64 addrspace(1)* addrspacecast (i64* @A to i64 addrspace(1)*)
2626 @E = global i64 addrspace(1)* addrspacecast(i64* @A to i64 addrspace(1)*)
2727
2828 ; Don't add an inbounds on @weak.gep, since @weak may be null.
29 ; CHECK: @weak.gep = global i32* getelementptr (i32* @weak, i32 1)
30 @weak.gep = global i32* getelementptr (i32* @weak, i32 1)
29 ; CHECK: @weak.gep = global i32* getelementptr (i32, i32* @weak, i32 1)
30 @weak.gep = global i32* getelementptr (i32, i32* @weak, i32 1)
3131 @weak = extern_weak global i32
3232
3333 ; An object with weak linkage cannot have it's identity determined at compile time.
4242 @empty.cmp = global i1 icmp eq ([0 x i8]* @empty.1, [0 x i8]* @empty.2)
4343
4444 ; Don't add an inbounds on @glob.a3, since it's not inbounds.
45 ; CHECK: @glob.a3 = alias getelementptr (i32* @glob.a2, i32 1)
45 ; CHECK: @glob.a3 = alias getelementptr (i32, i32* @glob.a2, i32 1)
4646 @glob = global i32 0
47 @glob.a3 = alias getelementptr (i32* @glob.a2, i32 1)
48 @glob.a2 = alias getelementptr (i32* @glob.a1, i32 1)
47 @glob.a3 = alias getelementptr (i32, i32* @glob.a2, i32 1)
48 @glob.a2 = alias getelementptr (i32, i32* @glob.a1, i32 1)
4949 @glob.a1 = alias i32* @glob
11
22 ; Globals.
33 @global = global i32 0
4 @alias.ref1 = global i32* getelementptr inbounds (i32* @alias, i64 1)
5 @alias.ref2 = global i32* getelementptr inbounds (i32* @alias, i64 1)
4 @alias.ref1 = global i32* getelementptr inbounds (i32, i32* @alias, i64 1)
5 @alias.ref2 = global i32* getelementptr inbounds (i32, i32* @alias, i64 1)
66
77 ; Aliases.
88 @alias = alias i32* @global
9 @alias.ref3 = alias i32* getelementptr inbounds (i32* @alias, i64 1)
10 @alias.ref4 = alias i32* getelementptr inbounds (i32* @alias, i64 1)
9 @alias.ref3 = alias i32* getelementptr inbounds (i32, i32* @alias, i64 1)
10 @alias.ref4 = alias i32* getelementptr inbounds (i32, i32* @alias, i64 1)
5454 ; CHECK-LABEL: @test.objectsize(
5555 ; CHECK: @llvm.objectsize.i32.p0i8
5656 ; CHECK-DAG: declare i32 @llvm.objectsize.i32.p0i8
57 %s = call i32 @llvm.objectsize.i32(i8* getelementptr inbounds ([60 x i8]* @a, i32 0, i32 0), i1 false)
57 %s = call i32 @llvm.objectsize.i32(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @a, i32 0, i32 0), i1 false)
5858 ret i32 %s
5959 }
194194 }
195195
196196 define i64* @gep_nw_ce() {
197 ; CHECK: ret i64* getelementptr inbounds (i64* @addr, i64 171)
198 ret i64* getelementptr inbounds (i64* @addr, i64 171)
197 ; CHECK: ret i64* getelementptr inbounds (i64, i64* @addr, i64 171)
198 ret i64* getelementptr inbounds (i64, i64* @addr, i64 171)
199199 }
200200
201201 define i64 @add_plain_ce() {
219219 }
220220
221221 define i64* @gep_plain_ce() {
222 ; CHECK: ret i64* getelementptr (i64* @addr, i64 171)
223 ret i64* getelementptr (i64* @addr, i64 171)
222 ; CHECK: ret i64* getelementptr (i64, i64* @addr, i64 171)
223 ret i64* getelementptr (i64, i64* @addr, i64 171)
224224 }
225225
226226 define i64 @add_both_reversed_ce() {
22
33 ; Verify that over-indexed getelementptrs are folded.
44 @A = external global [2 x [3 x [5 x [7 x i32]]]]
5 @B = global i32* getelementptr ([2 x [3 x [5 x [7 x i32]]]]* @A, i64 0, i64 0, i64 2, i64 1, i64 7523)
6 ; CHECK: @B = global i32* getelementptr ([2 x [3 x [5 x [7 x i32]]]]* @A, i64 36, i64 0, i64 1, i64 0, i64 5)
7 @C = global i32* getelementptr ([2 x [3 x [5 x [7 x i32]]]]* @A, i64 3, i64 2, i64 0, i64 0, i64 7523)
8 ; CHECK: @C = global i32* getelementptr ([2 x [3 x [5 x [7 x i32]]]]* @A, i64 39, i64 1, i64 1, i64 4, i64 5)
5 @B = global i32* getelementptr ([2 x [3 x [5 x [7 x i32]]]], [2 x [3 x [5 x [7 x i32]]]]* @A, i64 0, i64 0, i64 2, i64 1, i64 7523)
6 ; CHECK: @B = global i32* getelementptr ([2 x [3 x [5 x [7 x i32]]]], [2 x [3 x [5 x [7 x i32]]]]* @A, i64 36, i64 0, i64 1, i64 0, i64 5)
7 @C = global i32* getelementptr ([2 x [3 x [5 x [7 x i32]]]], [2 x [3 x [5 x [7 x i32]]]]* @A, i64 3, i64 2, i64 0, i64 0, i64 7523)
8 ; CHECK: @C = global i32* getelementptr ([2 x [3 x [5 x [7 x i32]]]], [2 x [3 x [5 x [7 x i32]]]]* @A, i64 39, i64 1, i64 1, i64 4, i64 5)
99
1010 ; Verify that constant expression GEPs work with i84 indices.
1111 @D = external global [1 x i32]
1212
13 @E = global i32* getelementptr inbounds ([1 x i32]* @D, i84 0, i64 1)
14 ; CHECK: @E = global i32* getelementptr inbounds ([1 x i32]* @D, i84 1, i64 0)
13 @E = global i32* getelementptr inbounds ([1 x i32], [1 x i32]* @D, i84 0, i64 1)
14 ; CHECK: @E = global i32* getelementptr inbounds ([1 x i32], [1 x i32]* @D, i84 1, i64 0)
1515
1616 ; Verify that i16 indices work.
1717 @x = external global {i32, i32}
18 @y = global i32* getelementptr ({ i32, i32 }* @x, i16 42, i32 0)
19 ; CHECK: @y = global i32* getelementptr ({ i32, i32 }* @x, i16 42, i32 0)
18 @y = global i32* getelementptr ({ i32, i32 }, { i32, i32 }* @x, i16 42, i32 0)
19 ; CHECK: @y = global i32* getelementptr ({ i32, i32 }, { i32, i32 }* @x, i16 42, i32 0)
2020
2121 ; See if i92 indices work too.
2222 define i32 *@test({i32, i32}* %t, i92 %n) {
2828
2929 ; Verify that constant expression vector GEPs work.
3030
31 @z = global <2 x i32*> getelementptr (<2 x [3 x {i32, i32}]*> zeroinitializer, <2 x i32> , <2 x i32> , <2 x i32> )
31 @z = global <2 x i32*> getelementptr ([3 x {i32, i32}], <2 x [3 x {i32, i32}]*> zeroinitializer, <2 x i32> , <2 x i32> , <2 x i32> )
3232
3333 ; Verify that struct GEP works with a vector of pointers.
3434 define <2 x i32*> @test7(<2 x {i32, i32}*> %a) {
11
22 ; CHECK: getelementptr vector index has a wrong number of elements
33
4 global <2 x i32*> getelementptr (<4 x [3 x {i32, i32}]*> zeroinitializer, <2 x i32> , <2 x i32> , <2 x i32> )
4 global <2 x i32*> getelementptr ([3 x {i32, i32}], <4 x [3 x {i32, i32}]*> zeroinitializer, <2 x i32> , <2 x i32> , <2 x i32> )
33 ; RUN: verify-uselistorder < %s
44
55 @a = global [4 x i1] [i1 0, i1 1, i1 0, i1 1]
6 @b = alias i1* getelementptr ([4 x i1]* @a, i64 0, i64 2)
6 @b = alias i1* getelementptr ([4 x i1], [4 x i1]* @a, i64 0, i64 2)
77
88 ; Check use-list order of constants used by globals.
99 @glob1 = global i5 7
4747
4848 define i1 @loada() {
4949 entry:
50 %a = load i1, i1* getelementptr ([4 x i1]* @a, i64 0, i64 2)
50 %a = load i1, i1* getelementptr ([4 x i1], [4 x i1]* @a, i64 0, i64 2)
5151 ret i1 %a
5252 }
5353
5454 uselistorder i5 7, { 1, 0, 2 }
55 uselistorder i1* getelementptr ([4 x i1]* @a, i64 0, i64 2), { 1, 0 }
55 uselistorder i1* getelementptr ([4 x i1], [4 x i1]* @a, i64 0, i64 2), { 1, 0 }
33 ; RUN: verify-uselistorder < %s
44
55 @ba1 = constant i8* blockaddress (@bafunc1, %bb)
6 @ba2 = constant i8* getelementptr (i8* blockaddress (@bafunc2, %bb), i61 0)
7 @ba3 = constant i8* getelementptr (i8* blockaddress (@bafunc2, %bb), i61 0)
6 @ba2 = constant i8* getelementptr (i8, i8* blockaddress (@bafunc2, %bb), i61 0)
7 @ba3 = constant i8* getelementptr (i8, i8* blockaddress (@bafunc2, %bb), i61 0)
88
99 define i8* @babefore() {
10 ret i8* getelementptr (i8* blockaddress (@bafunc2, %bb), i61 0)
10 ret i8* getelementptr (i8, i8* blockaddress (@bafunc2, %bb), i61 0)
1111 bb1:
1212 ret i8* blockaddress (@bafunc1, %bb)
1313 bb2:
310310 ret void
311311 }
312312
313 define void @getelementptr({i8, i8}* %s, <4 x i8*> %ptrs, <4 x i64> %offsets ){
313 define void @getelementptr({i8, i8}, {i8, i8}* %s, <4 x i8*> %ptrs, <4 x i64> %offsets ){
314314 entry:
315315 ; CHECK: %res1 = getelementptr { i8, i8 }, { i8, i8 }* %s, i32 1, i32 1
316316 %res1 = getelementptr {i8, i8}, {i8, i8}* %s, i32 1, i32 1
2020 %"void*[]" = type { i64, i8** }
2121 @_D10ModuleInfo6__vtblZ = external constant %object.ModuleInfo.__vtbl ; <%object.ModuleInfo.__vtbl*> [#uses=1]
2222 @.str = internal constant [20 x i8] c"tango.core.BitManip\00" ; <[20 x i8]*> [#uses=1]
23 @_D5tango4core8BitManip8__ModuleZ = global %0 { %object.ModuleInfo.__vtbl* @_D10ModuleInfo6__vtblZ, i8* null, %"byte[]" { i64 19, i8* getelementptr ([20 x i8]* @.str, i32 0, i32 0) }, %1 zeroinitializer, %"ClassInfo[]" zeroinitializer, i32 4, void ()* null, void ()* null, void ()* null, i8* null, void ()* null } ; <%0*> [#uses=1]
23 @_D5tango4core8BitManip8__ModuleZ = global %0 { %object.ModuleInfo.__vtbl* @_D10ModuleInfo6__vtblZ, i8* null, %"byte[]" { i64 19, i8* getelementptr ([20 x i8], [20 x i8]* @.str, i32 0, i32 0) }, %1 zeroinitializer, %"ClassInfo[]" zeroinitializer, i32 4, void ()* null, void ()* null, void ()* null, i8* null, void ()* null } ; <%0*> [#uses=1]
2424 @_D5tango4core8BitManip11__moduleRefZ = internal global %ModuleReference { %ModuleReference* null, %object.ModuleInfo* bitcast (%0* @_D5tango4core8BitManip8__ModuleZ to %object.ModuleInfo*) } ; <%ModuleReference*> [#uses=2]
2525 @_Dmodule_ref = external global %ModuleReference* ; <%ModuleReference**> [#uses=2]
2626 @llvm.global_ctors = appending constant [1 x %2] [%2 { i32 65535, void ()* @_D5tango4core8BitManip16__moduleinfoCtorZ }] ; <[1 x %2]*> [#uses=0]
7777 define internal void @_D5tango4core8BitManip16__moduleinfoCtorZ() nounwind {
7878 moduleinfoCtorEntry:
7979 %current = load %ModuleReference*, %ModuleReference** @_Dmodule_ref ; <%ModuleReference*> [#uses=1]
80 store %ModuleReference* %current, %ModuleReference** getelementptr (%ModuleReference* @_D5tango4core8BitManip11__moduleRefZ, i32 0, i32 0)
80 store %ModuleReference* %current, %ModuleReference** getelementptr (%ModuleReference, %ModuleReference* @_D5tango4core8BitManip11__moduleRefZ, i32 0, i32 0)
8181 store %ModuleReference* @_D5tango4core8BitManip11__moduleRefZ, %ModuleReference** @_Dmodule_ref
8282 ret void
8383 }
1212 @v3 = alias bitcast (i32* @v1 to i16*)
1313 ; CHECK: @v3 = alias bitcast (i32* @v1 to i16*)
1414
15 @v4 = alias getelementptr ([1 x i32]* @v2, i32 0, i32 0)
16 ; CHECK: @v4 = alias getelementptr inbounds ([1 x i32]* @v2, i32 0, i32 0)
15 @v4 = alias getelementptr ([1 x i32], [1 x i32]* @v2, i32 0, i32 0)
16 ; CHECK: @v4 = alias getelementptr inbounds ([1 x i32], [1 x i32]* @v2, i32 0, i32 0)
1717
1818 @v5 = alias i32 addrspace(2)* addrspacecast (i32 addrspace(0)* @v1 to i32 addrspace(2)*)
1919 ; CHECK: @v5 = alias addrspacecast (i32* @v1 to i32 addrspace(2)*)
0 ; RUN: verify-uselistorder < %s
11
22 @a = global [4 x i1] [i1 0, i1 1, i1 0, i1 1]
3 @b = alias i1* getelementptr ([4 x i1]* @a, i64 0, i64 2)
3 @b = alias i1* getelementptr ([4 x i1], [4 x i1]* @a, i64 0, i64 2)
44
55 ; Check use-list order of constants used by globals.
66 @glob1 = global i5 7
8484
8585 define i1 @loada() {
8686 entry:
87 %a = load i1, i1* getelementptr ([4 x i1]* @a, i64 0, i64 2)
87 %a = load i1, i1* getelementptr ([4 x i1], [4 x i1]* @a, i64 0, i64 2)
8888 ret i1 %a
8989 }
9090
133133
134134 ; Check that block addresses work.
135135 @ba1 = constant i8* blockaddress (@bafunc1, %bb)
136 @ba2 = constant i8* getelementptr (i8* blockaddress (@bafunc2, %bb), i61 0)
137 @ba3 = constant i8* getelementptr (i8* blockaddress (@bafunc2, %bb), i61 0)
136 @ba2 = constant i8* getelementptr (i8, i8* blockaddress (@bafunc2, %bb), i61 0)
137 @ba3 = constant i8* getelementptr (i8, i8* blockaddress (@bafunc2, %bb), i61 0)
138138
139139 define i8* @babefore() {
140 ret i8* getelementptr (i8* blockaddress (@bafunc2, %bb), i61 0)
140 ret i8* getelementptr (i8, i8* blockaddress (@bafunc2, %bb), i61 0)
141141 bb1:
142142 ret i8* blockaddress (@bafunc1, %bb)
143143 bb2:
1515 %0 = load double, double* %d.addr, align 8
1616 %1 = load double, double* %d.addr, align 8
1717 %conv = fptoui double %1 to i64
18 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0), double %0, i64 %conv)
18 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), double %0, i64 %conv)
1919 %2 = load double, double* %d.addr, align 8
2020 %3 = load double, double* %d.addr, align 8
2121 %conv1 = fptoui double %3 to i32
22 %call2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([8 x i8]* @.str1, i32 0, i32 0), double %2, i32 %conv1)
22 %call2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str1, i32 0, i32 0), double %2, i32 %conv1)
2323 ret void
2424 }
2525
3636 %conv = fpext float %0 to double
3737 %1 = load float, float* %f.addr, align 4
3838 %conv1 = fptoui float %1 to i64
39 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([8 x i8]* @.str2, i32 0, i32 0), double %conv, i64 %conv1)
39 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str2, i32 0, i32 0), double %conv, i64 %conv1)
4040 %2 = load float, float* %f.addr, align 4
4141 %conv2 = fpext float %2 to double
4242 %3 = load float, float* %f.addr, align 4
4343 %conv3 = fptoui float %3 to i32
44 %call4 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([7 x i8]* @.str3, i32 0, i32 0), double %conv2, i32 %conv3)
44 %call4 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str3, i32 0, i32 0), double %conv2, i32 %conv3)
4545 ret void
4646 }
4747
132132 store <4 x i32> %y, <4 x i32>* %y.addr, align 16
133133 %0 = load i32, i32* %x.addr, align 4
134134 %1 = load <4 x i32>, <4 x i32>* %y.addr, align 16
135 call void (i8*, ...)* @foo(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %0, <4 x i32> %1)
135 call void (i8*, ...)* @foo(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %0, <4 x i32> %1)
136136 ret void
137137 }
138138
185185 %1 = load i32, i32* %x.addr, align 4
186186 %2 = bitcast %struct.s41* %s41 to i128*
187187 %3 = load i128, i128* %2, align 1
188 call void (i8*, ...)* @foo2(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %1, i128 %3)
188 call void (i8*, ...)* @foo2(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %1, i128 %3)
189189 ret void
190190 }
318318
319319 define i32 @next_id() nounwind optsize ssp align 2 {
320320 entry:
321 %0 = atomicrmw add i32* getelementptr inbounds (%"class.X::Atomic"* @counter, i64 0, i32 0, i32 0), i32 1 seq_cst
321 %0 = atomicrmw add i32* getelementptr inbounds (%"class.X::Atomic", %"class.X::Atomic"* @counter, i64 0, i32 0, i32 0), i32 1 seq_cst
322322 %add.i = add i32 %0, 1
323323 %tobool = icmp eq i32 %add.i, 0
324324 br i1 %tobool, label %if.else, label %return
325325
326326 if.else: ; preds = %entry
327 %1 = atomicrmw add i32* getelementptr inbounds (%"class.X::Atomic"* @counter, i64 0, i32 0, i32 0), i32 1 seq_cst
327 %1 = atomicrmw add i32* getelementptr inbounds (%"class.X::Atomic", %"class.X::Atomic"* @counter, i64 0, i32 0, i32 0), i32 1 seq_cst
328328 %add.i2 = add i32 %1, 1
329329 br label %return
330330
1414 ; CHECK-NOT: AdrpAddStr
1515 define i32 @pptp_wan_init() {
1616 entry:
17 store i32* null, i32** getelementptr inbounds (%struct.anon* @pptp_wan_head, i64 0, i32 0), align 8
18 store i32** getelementptr inbounds (%struct.anon* @pptp_wan_head, i64 0, i32 0), i32*** getelementptr inbounds (%struct.anon* @pptp_wan_head, i64 0, i32 1), align 8
17 store i32* null, i32** getelementptr inbounds (%struct.anon, %struct.anon* @pptp_wan_head, i64 0, i32 0), align 8
18 store i32** getelementptr inbounds (%struct.anon, %struct.anon* @pptp_wan_head, i64 0, i32 0), i32*** getelementptr inbounds (%struct.anon, %struct.anon* @pptp_wan_head, i64 0, i32 1), align 8
1919 ret i32 0
2020 }
2121
1212 ; CHECK: add x[[REG3:[0-9]+]], x[[REG1]], x[[REG2]]
1313 ; CHECK: ldr w0, [x[[REG3]]]
1414 ; CHECK: ret
15 %0 = load i32, i32* getelementptr inbounds ([5001 x i32]* @sortlist, i32 0, i64 5000), align 4
15 %0 = load i32, i32* getelementptr inbounds ([5001 x i32], [5001 x i32]* @sortlist, i32 0, i64 5000), align 4
1616 ret i32 %0
1717 }
1818
2525 ; CHECK: add x[[REG3:[0-9]+]], x[[REG1]], x[[REG2]]
2626 ; CHECK: ldr x0, [x[[REG3]]]
2727 ; CHECK: ret
28 %0 = load i64, i64* getelementptr inbounds ([5001 x i64]* @sortlist2, i32 0, i64 5000), align 4
28 %0 = load i64, i64* getelementptr inbounds ([5001 x i64], [5001 x i64]* @sortlist2, i32 0, i64 5000), align 4
2929 ret i64 %0
3030 }
3131
1010 ; ARM64: movz x2, #0x50
1111 ; ARM64: uxtb w1, w9
1212 ; ARM64: bl _memset
13 call void @llvm.memset.p0i8.i64(i8* getelementptr inbounds ([80 x i8]* @message, i32 0, i32 0), i8 0, i64 80, i32 16, i1 false)
13 call void @llvm.memset.p0i8.i64(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @message, i32 0, i32 0), i8 0, i64 80, i32 16, i1 false)
1414 ret void
1515 }
1616
2424 ; ARM64: add x1, x8, _message@PAGEOFF
2525 ; ARM64: movz x2, #0x50
2626 ; ARM64: bl _memcpy
27 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8]* @message, i32 0, i32 0), i64 80, i32 16, i1 false)
27 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8], [80 x i8]* @message, i32 0, i32 0), i64 80, i32 16, i1 false)
2828 ret void
2929 }
3030
3838 ; ARM64: add x1, x8, _message@PAGEOFF
3939 ; ARM64: movz x2, #0x14
4040 ; ARM64: bl _memmove
41 call void @llvm.memmove.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8]* @message, i32 0, i32 0), i64 20, i32 16, i1 false)
41 call void @llvm.memmove.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8], [80 x i8]* @message, i32 0, i32 0), i64 20, i32 16, i1 false)
4242 ret void
4343 }
4444
5757 ; ARM64: ldrb w11, [x9, #16]
5858 ; ARM64: strb w11, [x8, #16]
5959 ; ARM64: ret
60 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8]* @message, i32 0, i32 0), i64 17, i32 16, i1 false)
60 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8], [80 x i8]* @message, i32 0, i32 0), i64 17, i32 16, i1 false)
6161 ret void
6262 }
6363
7474 ; ARM64: ldrb w11, [x9, #16]
7575 ; ARM64: strb w11, [x8, #16]
7676 ; ARM64: ret
77 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8]* @message, i32 0, i32 0), i64 17, i32 8, i1 false)
77 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8], [80 x i8]* @message, i32 0, i32 0), i64 17, i32 8, i1 false)
7878 ret void
7979 }
8080
9191 ; ARM64: ldrb w10, [x9, #8]
9292 ; ARM64: strb w10, [x8, #8]
9393 ; ARM64: ret
94 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8]* @message, i32 0, i32 0), i64 9, i32 4, i1 false)
94 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8], [80 x i8]* @message, i32 0, i32 0), i64 9, i32 4, i1 false)
9595 ret void
9696 }
9797
110110 ; ARM64: ldrb w10, [x9, #6]
111111 ; ARM64: strb w10, [x8, #6]
112112 ; ARM64: ret
113 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8]* @message, i32 0, i32 0), i64 7, i32 2, i1 false)
113 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8], [80 x i8]* @message, i32 0, i32 0), i64 7, i32 2, i1 false)
114114 ret void
115115 }
116116
129129 ; ARM64: ldrb w10, [x9, #3]
130130 ; ARM64: strb w10, [x8, #3]
131131 ; ARM64: ret
132 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8]* @message, i32 0, i32 0), i64 4, i32 1, i1 false)
132 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @temp, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8], [80 x i8]* @message, i32 0, i32 0), i64 4, i32 1, i1 false)
133133 ret void
134134 }
135135
3030 entry:
3131 %retval = alloca i32, align 4
3232 store i32 0, i32* %retval
33 %call = call i32 @puts(i8* getelementptr inbounds ([7 x i8]* @.str, i32 0, i32 0))
33 %call = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0))
3434 ret i32 %call
3535 }
3636
2121 ; CHECK: strh [[REG1]], [x[[BASEREG2]], #8]
2222 ; CHECK: ldr [[REG2:x[0-9]+]],
2323 ; CHECK: str [[REG2]],
24 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds (%struct.x* @dst, i32 0, i32 0), i8* getelementptr inbounds (%struct.x* @src, i32 0, i32 0), i32 11, i32 8, i1 false)
24 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds (%struct.x, %struct.x* @dst, i32 0, i32 0), i8* getelementptr inbounds (%struct.x, %struct.x* @src, i32 0, i32 0), i32 11, i32 8, i1 false)
2525 ret i32 0
2626 }
2727
3232 ; CHECK: stur [[DEST]], [x0, #15]
3333 ; CHECK: ldr [[DEST:q[0-9]+]], [x[[BASEREG]]]
3434 ; CHECK: str [[DEST]], [x0]
35 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([31 x i8]* @.str1, i64 0, i64 0), i64 31, i32 1, i1 false)
35 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str1, i64 0, i64 0), i64 31, i32 1, i1 false)
3636 ret void
3737 }
3838
4444 ; CHECK: str [[REG3]], [x0, #32]
4545 ; CHECK: ldp [[DEST1:q[0-9]+]], [[DEST2:q[0-9]+]], [x{{[0-9]+}}]
4646 ; CHECK: stp [[DEST1]], [[DEST2]], [x0]
47 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([36 x i8]* @.str2, i64 0, i64 0), i64 36, i32 1, i1 false)
47 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str2, i64 0, i64 0), i64 36, i32 1, i1 false)
4848 ret void
4949 }
5050
5555 ; CHECK: str [[REG4]], [x0, #16]
5656 ; CHECK: ldr [[DEST:q[0-9]+]], [x[[BASEREG]]]
5757 ; CHECK: str [[DEST]], [x0]
58 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([24 x i8]* @.str3, i64 0, i64 0), i64 24, i32 1, i1 false)
58 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str3, i64 0, i64 0), i64 24, i32 1, i1 false)
5959 ret void
6060 }
6161
6666 ; CHECK: strh [[REG5]], [x0, #16]
6767 ; CHECK: ldr [[REG6:q[0-9]+]], [x{{[0-9]+}}]
6868 ; CHECK: str [[REG6]], [x0]
69 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([18 x i8]* @.str4, i64 0, i64 0), i64 18, i32 1, i1 false)
69 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str4, i64 0, i64 0), i64 18, i32 1, i1 false)
7070 ret void
7171 }
7272
7979 ; CHECK: movz [[REG8:w[0-9]+]],
8080 ; CHECK: movk [[REG8]],
8181 ; CHECK: str [[REG8]], [x0]
82 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([7 x i8]* @.str5, i64 0, i64 0), i64 7, i32 1, i1 false)
82 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str5, i64 0, i64 0), i64 7, i32 1, i1 false)
8383 ret void
8484 }
8585
9090 ; CHECK: stur [[REG9]], [x{{[0-9]+}}, #6]
9191 ; CHECK: ldr
9292 ; CHECK: str
93 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([512 x i8]* @spool.splbuf, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8]* @.str6, i64 0, i64 0), i64 14, i32 1, i1 false)
93 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([512 x i8], [512 x i8]* @spool.splbuf, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str6, i64 0, i64 0), i64 14, i32 1, i1 false)
9494 ret void
9595 }
9696
1414 ; CHECK: foo:
1515 ; CHECK: adrp x{{[0-9]}}, .L.str
1616 ; CHECK-NEXT: add x{{[0-9]}}, x{{[0-9]}}, :lo12:.L.str
17 tail call void @bar(i8* getelementptr inbounds ([6 x i8]* @.str, i64 0, i64 0))
17 tail call void @bar(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
1818 ret void
1919 }
2020
269269 entry:
270270 ; CHECK-LABEL: fct0:
271271 ; CHECK: ldur {{d[0-9]+}}, [{{x[0-9]+}}, #3]
272 %0 = load <1 x i64>, <1 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <1 x i64>*), align 8
272 %0 = load <1 x i64>, <1 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <1 x i64>*), align 8
273273 ret <1 x i64> %0
274274 }
275275
277277 entry:
278278 ; CHECK-LABEL: fct1:
279279 ; CHECK: ldur {{d[0-9]+}}, [{{x[0-9]+}}, #3]
280 %0 = load <2 x i32>, <2 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <2 x i32>*), align 8
280 %0 = load <2 x i32>, <2 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <2 x i32>*), align 8
281281 ret <2 x i32> %0
282282 }
283283
285285 entry:
286286 ; CHECK-LABEL: fct2:
287287 ; CHECK: ldur {{d[0-9]+}}, [{{x[0-9]+}}, #3]
288 %0 = load <4 x i16>, <4 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <4 x i16>*), align 8
288 %0 = load <4 x i16>, <4 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <4 x i16>*), align 8
289289 ret <4 x i16> %0
290290 }
291291
293293 entry:
294294 ; CHECK-LABEL: fct3:
295295 ; CHECK: ldur {{d[0-9]+}}, [{{x[0-9]+}}, #3]
296 %0 = load <8 x i8>, <8 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <8 x i8>*), align 8
296 %0 = load <8 x i8>, <8 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <8 x i8>*), align 8
297297 ret <8 x i8> %0
298298 }
299299
301301 entry:
302302 ; CHECK-LABEL: fct4:
303303 ; CHECK: ldur {{q[0-9]+}}, [{{x[0-9]+}}, #3]
304 %0 = load <2 x i64>, <2 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <2 x i64>*), align 16
304 %0 = load <2 x i64>, <2 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <2 x i64>*), align 16
305305 ret <2 x i64> %0
306306 }
307307
309309 entry:
310310 ; CHECK-LABEL: fct5:
311311 ; CHECK: ldur {{q[0-9]+}}, [{{x[0-9]+}}, #3]
312 %0 = load <4 x i32>, <4 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <4 x i32>*), align 16
312 %0 = load <4 x i32>, <4 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <4 x i32>*), align 16
313313 ret <4 x i32> %0
314314 }
315315
317317 entry:
318318 ; CHECK-LABEL: fct6:
319319 ; CHECK: ldur {{q[0-9]+}}, [{{x[0-9]+}}, #3]
320 %0 = load <8 x i16>, <8 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <8 x i16>*), align 16
320 %0 = load <8 x i16>, <8 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <8 x i16>*), align 16
321321 ret <8 x i16> %0
322322 }
323323
325325 entry:
326326 ; CHECK-LABEL: fct7:
327327 ; CHECK: ldur {{q[0-9]+}}, [{{x[0-9]+}}, #3]
328 %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <16 x i8>*), align 16
328 %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <16 x i8>*), align 16
329329 ret <16 x i8> %0
330330 }
331331
334334 ; CHECK-LABEL: fct8:
335335 ; CHECK: ldur [[DESTREG:d[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
336336 ; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
337 %0 = load <1 x i64>, <1 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <1 x i64>*), align 8
338 store <1 x i64> %0, <1 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 4) to <1 x i64>*), align 8
337 %0 = load <1 x i64>, <1 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <1 x i64>*), align 8
338 store <1 x i64> %0, <1 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <1 x i64>*), align 8
339339 ret void
340340 }
341341
344344 ; CHECK-LABEL: fct9:
345345 ; CHECK: ldur [[DESTREG:d[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
346346 ; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
347 %0 = load <2 x i32>, <2 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <2 x i32>*), align 8
348 store <2 x i32> %0, <2 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 4) to <2 x i32>*), align 8
347 %0 = load <2 x i32>, <2 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <2 x i32>*), align 8
348 store <2 x i32> %0, <2 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <2 x i32>*), align 8
349349 ret void
350350 }
351351
354354 ; CHECK-LABEL: fct10:
355355 ; CHECK: ldur [[DESTREG:d[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
356356 ; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
357 %0 = load <4 x i16>, <4 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <4 x i16>*), align 8
358 store <4 x i16> %0, <4 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 4) to <4 x i16>*), align 8
357 %0 = load <4 x i16>, <4 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <4 x i16>*), align 8
358 store <4 x i16> %0, <4 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <4 x i16>*), align 8
359359 ret void
360360 }
361361
364364 ; CHECK-LABEL: fct11:
365365 ; CHECK: ldur [[DESTREG:d[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
366366 ; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
367 %0 = load <8 x i8>, <8 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <8 x i8>*), align 8
368 store <8 x i8> %0, <8 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 4) to <8 x i8>*), align 8
367 %0 = load <8 x i8>, <8 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <8 x i8>*), align 8
368 store <8 x i8> %0, <8 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <8 x i8>*), align 8
369369 ret void
370370 }
371371
374374 ; CHECK-LABEL: fct12:
375375 ; CHECK: ldur [[DESTREG:q[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
376376 ; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
377 %0 = load <2 x i64>, <2 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <2 x i64>*), align 16
378 store <2 x i64> %0, <2 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 4) to <2 x i64>*), align 16
377 %0 = load <2 x i64>, <2 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <2 x i64>*), align 16
378 store <2 x i64> %0, <2 x i64>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <2 x i64>*), align 16
379379 ret void
380380 }
381381
384384 ; CHECK-LABEL: fct13:
385385 ; CHECK: ldur [[DESTREG:q[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
386386 ; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
387 %0 = load <4 x i32>, <4 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <4 x i32>*), align 16
388 store <4 x i32> %0, <4 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 4) to <4 x i32>*), align 16
387 %0 = load <4 x i32>, <4 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <4 x i32>*), align 16
388 store <4 x i32> %0, <4 x i32>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <4 x i32>*), align 16
389389 ret void
390390 }
391391
394394 ; CHECK-LABEL: fct14:
395395 ; CHECK: ldur [[DESTREG:q[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
396396 ; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
397 %0 = load <8 x i16>, <8 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <8 x i16>*), align 16
398 store <8 x i16> %0, <8 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 4) to <8 x i16>*), align 16
397 %0 = load <8 x i16>, <8 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <8 x i16>*), align 16
398 store <8 x i16> %0, <8 x i16>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <8 x i16>*), align 16
399399 ret void
400400 }
401401
404404 ; CHECK-LABEL: fct15:
405405 ; CHECK: ldur [[DESTREG:q[0-9]+]], {{\[}}[[BASEREG:x[0-9]+]], #3]
406406 ; CHECK: stur [[DESTREG]], {{\[}}[[BASEREG]], #4]
407 %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 3) to <16 x i8>*), align 16
408 store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8]* @str, i64 0, i64 4) to <16 x i8>*), align 16
407 %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 3) to <16 x i8>*), align 16
408 store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 4) to <16 x i8>*), align 16
409409 ret void
410410 }
411411
2929 unreachable
3030
3131 if.end50.thread:
32 tail call void (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @.str1, i64 0, i64 0), i32 125)
33 tail call void (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @.str1, i64 0, i64 0), i32 128)
32 tail call void (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str1, i64 0, i64 0), i32 125)
33 tail call void (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str1, i64 0, i64 0), i32 128)
3434 unreachable
3535
3636 invoke.cont33:
37 tail call void (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @.str1, i64 0, i64 0), i32 119)
37 tail call void (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str1, i64 0, i64 0), i32 119)
3838 unreachable
3939
4040 invoke.cont41:
5050 br label %finally.catchall
5151
5252 finally.catchall:
53 tail call void (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @.str1, i64 0, i64 0), i32 125)
53 tail call void (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str1, i64 0, i64 0), i32 125)
5454 unreachable
5555 }
5656
1919 %DHSelect = select i1 %tmp8, i32 %tmp9, i32 %tmp10
2020 store i32 %DHSelect, i32* %i32X, align 4
2121 %tmp15 = load i32, i32* %i32X, align 4
22 %tmp17 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8]* @.str2, i32 0, i32 0), i32 %tmp15)
22 %tmp17 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str2, i32 0, i32 0), i32 %tmp15)
2323 ret i32 0
2424
2525 ; CHECK: main:
99 ; Function Attrs: nounwind ssp
1010 define internal void @initialize() #0 {
1111 %1 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #2
12 store i32 %1, i32* getelementptr inbounds ([5 x i32]* @bar, i64 0, i64 0), align 4
12 store i32 %1, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i64 0, i64 0), align 4
1313 %2 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #2
14 store i32 %2, i32* getelementptr inbounds ([5 x i32]* @baz, i64 0, i64 0), align 4
14 store i32 %2, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i64 0, i64 0), align 4
1515 %3 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #2
16 store i32 %3, i32* getelementptr inbounds ([5 x i32]* @bar, i64 0, i64 1), align 4
16 store i32 %3, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i64 0, i64 1), align 4
1717 %4 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #2
18 store i32 %4, i32* getelementptr inbounds ([5 x i32]* @baz, i64 0, i64 1), align 4
18 store i32 %4, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i64 0, i64 1), align 4
1919 %5 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #2
20 store i32 %5, i32* getelementptr inbounds ([5 x i32]* @bar, i64 0, i64 2), align 4
20 store i32 %5, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i64 0, i64 2), align 4
2121 %6 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #2
22 store i32 %6, i32* getelementptr inbounds ([5 x i32]* @baz, i64 0, i64 2), align 4
22 store i32 %6, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i64 0, i64 2), align 4
2323 %7 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #2
24 store i32 %7, i32* getelementptr inbounds ([5 x i32]* @bar, i64 0, i64 3), align 4
24 store i32 %7, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i64 0, i64 3), align 4
2525 %8 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #2
26 store i32 %8, i32* getelementptr inbounds ([5 x i32]* @baz, i64 0, i64 3), align 4
26 store i32 %8, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i64 0, i64 3), align 4
2727 %9 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #2
28 store i32 %9, i32* getelementptr inbounds ([5 x i32]* @bar, i64 0, i64 4), align 4
28 store i32 %9, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i64 0, i64 4), align 4
2929 %10 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #2
30 store i32 %10, i32* getelementptr inbounds ([5 x i32]* @baz, i64 0, i64 4), align 4
30 store i32 %10, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i64 0, i64 4), align 4
3131 ret void
3232 }
3333
3535
3636 ; Function Attrs: nounwind ssp
3737 define internal void @calculate() #0 {
38 %1 = load i32, i32* getelementptr inbounds ([5 x i32]* @bar, i64 0, i64 0), align 4
39 %2 = load i32, i32* getelementptr inbounds ([5 x i32]* @baz, i64 0, i64 0), align 4
38 %1 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i64 0, i64 0), align 4
39 %2 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i64 0, i64 0), align 4
4040 %3 = mul nsw i32 %2, %1
41 store i32 %3, i32* getelementptr inbounds ([5 x i32]* @foo, i64 0, i64 0), align 4
42 %4 = load i32, i32* getelementptr inbounds ([5 x i32]* @bar, i64 0, i64 1), align 4
43 %5 = load i32, i32* getelementptr inbounds ([5 x i32]* @baz, i64 0, i64 1), align 4
41 store i32 %3, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @foo, i64 0, i64 0), align 4
42 %4 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i64 0, i64 1), align 4
43 %5 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i64 0, i64 1), align 4
4444 %6 = mul nsw i32 %5, %4
45 store i32 %6, i32* getelementptr inbounds ([5 x i32]* @foo, i64 0, i64 1), align 4
46 %7 = load i32, i32* getelementptr inbounds ([5 x i32]* @bar, i64 0, i64 2), align 4
47 %8 = load i32, i32* getelementptr inbounds ([5 x i32]* @baz, i64 0, i64 2), align 4
45 store i32 %6, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @foo, i64 0, i64 1), align 4
46 %7 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i64 0, i64 2), align 4
47 %8 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i64 0, i64 2), align 4
4848 %9 = mul nsw i32 %8, %7
49 store i32 %9, i32* getelementptr inbounds ([5 x i32]* @foo, i64 0, i64 2), align 4
50 %10 = load i32, i32* getelementptr inbounds ([5 x i32]* @bar, i64 0, i64 3), align 4
51 %11 = load i32, i32* getelementptr inbounds ([5 x i32]* @baz, i64 0, i64 3), align 4
49 store i32 %9, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @foo, i64 0, i64 2), align 4
50 %10 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i64 0, i64 3), align 4
51 %11 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i64 0, i64 3), align 4
5252 %12 = mul nsw i32 %11, %10
53 store i32 %12, i32* getelementptr inbounds ([5 x i32]* @foo, i64 0, i64 3), align 4
54 %13 = load i32, i32* getelementptr inbounds ([5 x i32]* @bar, i64 0, i64 4), align 4
55 %14 = load i32, i32* getelementptr inbounds ([5 x i32]* @baz, i64 0, i64 4), align 4
53 store i32 %12, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @foo, i64 0, i64 3), align 4
54 %13 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i64 0, i64 4), align 4
55 %14 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i64 0, i64 4), align 4
5656 %15 = mul nsw i32 %14, %13
57 store i32 %15, i32* getelementptr inbounds ([5 x i32]* @foo, i64 0, i64 4), align 4
57 store i32 %15, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @foo, i64 0, i64 4), align 4
5858 ret void
5959 }
6060
6161 ; Function Attrs: nounwind readnone ssp
6262 define internal i32* @returnFoo() #1 {
63 ret i32* getelementptr inbounds ([5 x i32]* @foo, i64 0, i64 0)
63 ret i32* getelementptr inbounds ([5 x i32], [5 x i32]* @foo, i64 0, i64 0)
6464 }
6565
6666 ;CHECK: .type _MergedGlobals,@object // @_MergedGlobals
1212 ; CHECK-LABEL: test_inlineasm_globaladdress_offset:
1313 ; CHECK: b {{_?}}test_symbol+4
1414 define void @test_inlineasm_globaladdress_offset() {
15 call void asm sideeffect "b $0", "i"(void ()* bitcast (i8* getelementptr (i8* bitcast (void ()* @test_symbol to i8*), i64 4) to void ()*))
15 call void asm sideeffect "b $0", "i"(void ()* bitcast (i8* getelementptr (i8, i8* bitcast (void ()* @test_symbol to i8*), i64 4) to void ()*))
1616 ret void
1717 }
1818
1414 ; CHECK-NOT: cmp
1515 ; CHECK: b.ne
1616 entry:
17 %0 = load i16, i16* getelementptr inbounds (%struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 1), align 2
18 %1 = load i16, i16* getelementptr inbounds (%struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 2), align 2
17 %0 = load i16, i16* getelementptr inbounds (%struct.s_signed_i16, %struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 1), align 2
18 %1 = load i16, i16* getelementptr inbounds (%struct.s_signed_i16, %struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 2), align 2
1919 %cmp = icmp sgt i16 %0, %1
2020 br i1 %cmp, label %if.then, label %if.else
2121
2222 if.then: ; preds = %entry
23 store i16 %0, i16* getelementptr inbounds (%struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 0), align 2
23 store i16 %0, i16* getelementptr inbounds (%struct.s_signed_i16, %struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 0), align 2
2424 br label %if.end8
2525
2626 if.else: ; preds = %entry
2828 br i1 %cmp5, label %if.then7, label %if.end8
2929
3030 if.then7: ; preds = %if.else
31 store i16 %0, i16* getelementptr inbounds (%struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 0), align 2
31 store i16 %0, i16* getelementptr inbounds (%struct.s_signed_i16, %struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 0), align 2
3232 br label %if.end8
3333
3434 if.end8: ; preds = %if.else, %if.then7, %if.then
4242 ; CHECK-NOT: cmp
4343 ; CHECK: b.ge
4444 entry:
45 %0 = load i16, i16* getelementptr inbounds (%struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 1), align 2
46 %1 = load i16, i16* getelementptr inbounds (%struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 2), align 2
45 %0 = load i16, i16* getelementptr inbounds (%struct.s_signed_i16, %struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 1), align 2
46 %1 = load i16, i16* getelementptr inbounds (%struct.s_signed_i16, %struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 2), align 2
4747 %cmp = icmp sgt i16 %0, %1
4848 br i1 %cmp, label %if.then, label %if.else
4949
5050 if.then: ; preds = %entry
51 store i16 %0, i16* getelementptr inbounds (%struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 0), align 2
51 store i16 %0, i16* getelementptr inbounds (%struct.s_signed_i16, %struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 0), align 2
5252 br label %if.end8
5353
5454 if.else: ; preds = %entry
5656 br i1 %cmp5, label %if.then7, label %if.end8
5757
5858 if.then7: ; preds = %if.else
59 store i16 %1, i16* getelementptr inbounds (%struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 0), align 2
59 store i16 %1, i16* getelementptr inbounds (%struct.s_signed_i16, %struct.s_signed_i16* @cost_s_i8_i16, i64 0, i32 0), align 2
6060 br label %if.end8
6161
6262 if.end8: ; preds = %if.else, %if.then7, %if.then
7070 ; CHECK-NOT: cmp
7171 ; CHECK: b.ne
7272 entry:
73 %0 = load i16, i16* getelementptr inbounds (%struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 1), align 2
74 %1 = load i16, i16* getelementptr inbounds (%struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 2), align 2
73 %0 = load i16, i16* getelementptr inbounds (%struct.s_unsigned_i16, %struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 1), align 2
74 %1 = load i16, i16* getelementptr inbounds (%struct.s_unsigned_i16, %struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 2), align 2
7575 %cmp = icmp ugt i16 %0, %1
7676 br i1 %cmp, label %if.then, label %if.else
7777
7878 if.then: ; preds = %entry
79 store i16 %0, i16* getelementptr inbounds (%struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 0), align 2
79 store i16 %0, i16* getelementptr inbounds (%struct.s_unsigned_i16, %struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 0), align 2
8080 br label %if.end8
8181
8282 if.else: ; preds = %entry
8484 br i1 %cmp5, label %if.then7, label %if.end8
8585
8686 if.then7: ; preds = %if.else
87 store i16 %0, i16* getelementptr inbounds (%struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 0), align 2
87 store i16 %0, i16* getelementptr inbounds (%struct.s_unsigned_i16, %struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 0), align 2
8888 br label %if.end8
8989
9090 if.end8: ; preds = %if.else, %if.then7, %if.then
9898 ; CHECK-NOT: cmp
9999 ; CHECK: b.hs
100100 entry:
101 %0 = load i16, i16* getelementptr inbounds (%struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 1), align 2
102 %1 = load i16, i16* getelementptr inbounds (%struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 2), align 2
101 %0 = load i16, i16* getelementptr inbounds (%struct.s_unsigned_i16, %struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 1), align 2
102 %1 = load i16, i16* getelementptr inbounds (%struct.s_unsigned_i16, %struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 2), align 2
103103 %cmp = icmp ugt i16 %0, %1
104104 br i1 %cmp, label %if.then, label %if.else
105105
106106 if.then: ; preds = %entry
107 store i16 %0, i16* getelementptr inbounds (%struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 0), align 2
107 store i16 %0, i16* getelementptr inbounds (%struct.s_unsigned_i16, %struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 0), align 2
108108 br label %if.end8
109109
110110 if.else: ; preds = %entry
112112 br i1 %cmp5, label %if.then7, label %if.end8
113113
114114 if.then7: ; preds = %if.else
115 store i16 %1, i16* getelementptr inbounds (%struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 0), align 2
115 store i16 %1, i16* getelementptr inbounds (%struct.s_unsigned_i16, %struct.s_unsigned_i16* @cost_u_i16, i64 0, i32 0), align 2
116116 br label %if.end8
117117
118118 if.end8: ; preds = %if.else, %if.then7, %if.then
135135 ; CHECK-NOT: cmp
136136 ; CHECK: b.ne
137137 entry:
138 %0 = load i8, i8* getelementptr inbounds (%struct.s_signed_i8* @cost_s, i64 0, i32 1), align 2
139 %1 = load i8, i8* getelementptr inbounds (%struct.s_signed_i8* @cost_s, i64 0, i32 2), align 2
138 %0 = load i8, i8* getelementptr inbounds (%struct.s_signed_i8, %struct.s_signed_i8* @cost_s, i64 0, i32 1), align 2
139 %1 = load i8, i8* getelementptr inbounds (%struct.s_signed_i8, %struct.s_signed_i8* @cost_s, i64 0, i32 2), align 2
140140 %cmp = icmp sgt i8 %0, %1
141141 br i1 %cmp, label %if.then, label %if.else
142142
143143 if.then: ; preds = %entry
144 store i8 %0, i8* getelementptr inbounds (%struct.s_signed_i8* @cost_s, i64 0, i32 0), align 2
144 store i8 %0, i8* getelementptr inbounds (%struct.s_signed_i8, %struct.s_signed_i8* @cost_s, i64 0, i32 0), align 2
145145 br label %if.end8
146146
147147 if.else: ; preds = %entry
149149 br i1 %cmp5, label %if.then7, label %if.end8
150150
151151 if.then7: ; preds = %if.else
152 store i8 %0, i8* getelementptr inbounds (%struct.s_signed_i8* @cost_s, i64 0, i32 0), align 2
152 store i8 %0, i8* getelementptr inbounds (%struct.s_signed_i8, %struct.s_signed_i8* @cost_s, i64 0, i32 0), align 2
153153 br label %if.end8
154154
155155 if.end8: ; preds = %if.else, %if.then7, %if.then
163163 ; CHECK-NOT: cmp
164164 ; CHECK: b.ge
165165 entry:
166 %0 = load i8, i8* getelementptr inbounds (%struct.s_signed_i8* @cost_s, i64 0, i32 1), align 2
167 %1 = load i8, i8* getelementptr inbounds (%struct.s_signed_i8* @cost_s, i64 0, i32 2), align 2
166 %0 = load i8, i8* getelementptr inbounds (%struct.s_signed_i8, %struct.s_signed_i8* @cost_s, i64 0, i32 1), align 2
167 %1 = load i8, i8* getelementptr inbounds (%struct.s_signed_i8, %struct.s_signed_i8* @cost_s, i64 0, i32 2), align 2
168168 %cmp = icmp sgt i8 %0, %1
169169 br i1 %cmp, label %if.then, label %if.else
170170
171171 if.then: ; preds = %entry
172 store i8 %0, i8* getelementptr inbounds (%struct.s_signed_i8* @cost_s, i64 0, i32 0), align 2
172 store i8 %0, i8* getelementptr inbounds (%struct.s_signed_i8, %struct.s_signed_i8* @cost_s, i64 0, i32 0), align 2
173173 br label %if.end8
174174
175175 if.else: ; preds = %entry
177177 br i1 %cmp5, label %if.then7, label %if.end8
178178
179179 if.then7: ; preds = %if.else
180 store i8 %1, i8* getelementptr inbounds (%struct.s_signed_i8* @cost_s, i64 0, i32 0), align 2
180 store i8 %1, i8* getelementptr inbounds (%struct.s_signed_i8, %struct.s_signed_i8* @cost_s, i64 0, i32 0), align 2
181181 br label %if.end8
182182
183183 if.end8: ; preds = %if.else, %if.then7, %if.then
191191 ; CHECK-NOT: cmp
192192 ; CHECK: b.ne
193193 entry:
194 %0 = load i8, i8* getelementptr inbounds (%struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 1), align 2
195 %1 = load i8, i8* getelementptr inbounds (%struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 2), align 2
194 %0 = load i8, i8* getelementptr inbounds (%struct.s_unsigned_i8, %struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 1), align 2
195 %1 = load i8, i8* getelementptr inbounds (%struct.s_unsigned_i8, %struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 2), align 2
196196 %cmp = icmp ugt i8 %0, %1
197197 br i1 %cmp, label %if.then, label %if.else
198198
199199 if.then: ; preds = %entry
200 store i8 %0, i8* getelementptr inbounds (%struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 0), align 2
200 store i8 %0, i8* getelementptr inbounds (%struct.s_unsigned_i8, %struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 0), align 2
201201 br label %if.end8
202202
203203 if.else: ; preds = %entry
205205 br i1 %cmp5, label %if.then7, label %if.end8
206206
207207 if.then7: ; preds = %if.else
208 store i8 %0, i8* getelementptr inbounds (%struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 0), align 2
208 store i8 %0, i8* getelementptr inbounds (%struct.s_unsigned_i8, %struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 0), align 2
209209 br label %if.end8
210210
211211 if.end8: ; preds = %if.else, %if.then7, %if.then
219219 ; CHECK-NOT: cmp
220220 ; CHECK: b.hs
221221 entry:
222 %0 = load i8, i8* getelementptr inbounds (%struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 1), align 2
223 %1 = load i8, i8* getelementptr inbounds (%struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 2), align 2
222 %0 = load i8, i8* getelementptr inbounds (%struct.s_unsigned_i8, %struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 1), align 2
223 %1 = load i8, i8* getelementptr inbounds (%struct.s_unsigned_i8, %struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 2), align 2
224224 %cmp = icmp ugt i8 %0, %1
225225 br i1 %cmp, label %if.then, label %if.else
226226
227227 if.then: ; preds = %entry
228 store i8 %0, i8* getelementptr inbounds (%struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 0), align 2
228 store i8 %0, i8* getelementptr inbounds (%struct.s_unsigned_i8, %struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 0), align 2
229229 br label %if.end8
230230
231231 if.else: ; preds = %entry
233233 br i1 %cmp5, label %if.then7, label %if.end8
234234
235235 if.then7: ; preds = %if.else
236 store i8 %1, i8* getelementptr inbounds (%struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 0), align 2
236 store i8 %1, i8* getelementptr inbounds (%struct.s_unsigned_i8, %struct.s_unsigned_i8* @cost_u_i8, i64 0, i32 0), align 2
237237 br label %if.end8
238238
239239 if.end8: ; preds = %if.else, %if.then7, %if.then
99 entry:
1010 %tmp1 = getelementptr %struct.B, %struct.B* %this, i32 0, i32 0 ; [#uses=1]
1111 %tmp2 = load i32, i32* %tmp1 ; [#uses=1]
12 %tmp4 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([7 x i8]* @str, i32 0, i32 0), i32 %tmp2 ) ; [#uses=0]
12 %tmp4 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([7 x i8], [7 x i8]* @str, i32 0, i32 0), i32 %tmp2 ) ; [#uses=0]
1313 ret void
1414 }
1515
1919 entry:
2020 %tmp1 = getelementptr %struct.B, %struct.B* %this, i32 0, i32 0 ; [#uses=1]
2121 %tmp2 = load i32, i32* %tmp1 ; [#uses=1]
22 %tmp4 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([7 x i8]* @str1, i32 0, i32 0), i32 %tmp2 ) ; [#uses=0]
22 %tmp4 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([7 x i8], [7 x i8]* @str1, i32 0, i32 0), i32 %tmp2 ) ; [#uses=0]
2323 ret void
2424 }
2525
88
99 define fastcc void @EvaluateDevelopment() {
1010 entry:
11 %tmp7 = load i64, i64* getelementptr (%struct.CHESS_POSITION* @search, i32 0, i32 7) ; [#uses=1]
12 %tmp50 = load i64, i64* getelementptr (%struct.CHESS_POSITION* @search, i32 0, i32 0) ; [#uses=1]
13 %tmp52 = load i64, i64* getelementptr (%struct.CHESS_POSITION* @search, i32 0, i32 1) ; [#uses=1]
11 %tmp7 = load i64, i64* getelementptr (%struct.CHESS_POSITION, %struct.CHESS_POSITION* @search, i32 0, i32 7) ; [#uses=1]
12 %tmp50 = load i64, i64* getelementptr (%struct.CHESS_POSITION, %struct.CHESS_POSITION* @search, i32 0, i32 0) ; [#uses=1]
13 %tmp52 = load i64, i64* getelementptr (%struct.CHESS_POSITION, %struct.CHESS_POSITION* @search, i32 0, i32 1) ; [#uses=1]
1414 %tmp53 = or i64 %tmp52, %tmp50 ; [#uses=1]
1515 %tmp57.b = load i1, i1* @rank_mask.1.b ; [#uses=1]
1616 %tmp57 = select i1 %tmp57.b, i64 71776119061217280, i64 0 ; [#uses=1]
1717 %tmp58 = and i64 %tmp57, %tmp7 ; [#uses=1]
1818 %tmp59 = lshr i64 %tmp58, 8 ; [#uses=1]
19 %tmp63 = load i64, i64* getelementptr ([8 x i64]* @file_mask, i32 0, i32 4) ; [#uses=1]
19 %tmp63 = load i64, i64* getelementptr ([8 x i64], [8 x i64]* @file_mask, i32 0, i32 4) ; [#uses=1]
2020 %tmp64 = or i64 %tmp63, 0 ; [#uses=1]
2121 %tmp65 = and i64 %tmp59, %tmp53 ; [#uses=1]
2222 %tmp66 = and i64 %tmp65, %tmp64 ; [#uses=1]
9292 %tmp42.i348 = sub i32 0, %tmp2930.i ; [#uses=1]
9393 %tmp45.i = getelementptr %struct.TestObj, %struct.TestObj* %tmp1273, i32 0, i32 0 ; [#uses=2]
9494 %tmp48.i = load i8*, i8** %tmp45.i ; [#uses=1]
95 %tmp50.i350 = call i32 (i8*, i8*, ...)* @sprintf( i8* getelementptr ([256 x i8]* @Msg, i32 0, i32 0), i8* getelementptr ([48 x i8]* @.str53615, i32 0, i32 0), i8* null, i8** %tmp45.i, i8* %tmp48.i ) ; [#uses=0]
95 %tmp50.i350 = call i32 (i8*, i8*, ...)* @sprintf( i8* getelementptr ([256 x i8], [256 x i8]* @Msg, i32 0, i32 0), i8* getelementptr ([48 x i8], [48 x i8]* @.str53615, i32 0, i32 0), i8* null, i8** %tmp45.i, i8* %tmp48.i ) ; [#uses=0]
9696 br i1 false, label %cond_true.i632.i, label %Ut_TraceMsg.exit648.i
9797
9898 cond_true.i632.i: ; preds = %cond_true1272
4545 cond_true110.i: ; preds = %bb102.i
4646 %tmp116.i = getelementptr i8*, i8** %argv_addr.2321.0.i, i32 2 ; [#uses=1]
4747 %tmp117.i = load i8*, i8** %tmp116.i ; [#uses=1]
48 %tmp126425.i = call %struct.FILE* @fopen( i8* %tmp117.i, i8* getelementptr ([2 x i8]* @.str44, i32 0, i32 0) ) ; <%struct.FILE*> [#uses=0]
48 %tmp126425.i = call %struct.FILE* @fopen( i8* %tmp117.i, i8* getelementptr ([2 x i8], [2 x i8]* @.str44, i32 0, i32 0) ) ; <%struct.FILE*> [#uses=0]
4949 ret i32 0
5050
5151 cond_next123.i: ; preds = %bb102.i
1010 bb88.i: ; preds = %bb74.i
1111 br i1 false, label %mandel.exit, label %bb74.i
1212 mandel.exit: ; preds = %bb88.i
13 %tmp2 = load volatile double, double* getelementptr ({ double, double }* @accum, i32 0, i32 0), align 8 ; [#uses=1]
13 %tmp2 = load volatile double, double* getelementptr ({ double, double }, { double, double }* @accum, i32 0, i32 0), align 8 ; [#uses=1]
1414 %tmp23 = fptosi double %tmp2 to i32 ; [#uses=1]
15 %tmp5 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i32 %tmp23 ) ; [#uses=0]
15 %tmp5 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %tmp23 ) ; [#uses=0]
1616 ret i32 0
1717 }
1818
4545 cond_true53.i: ; preds = %bb17.i
4646 ret { i16, %struct.rnode* }* null
4747 cond_false99.i: ; preds = %bb17.i
48 %malloccall = tail call i8* @malloc(i32 trunc (i64 mul nuw (i64 ptrtoint (i1** getelementptr (i1** null, i32 1) to i64), i64 2) to i32))
48 %malloccall = tail call i8* @malloc(i32 trunc (i64 mul nuw (i64 ptrtoint (i1** getelementptr (i1*, i1** null, i32 1) to i64), i64 2) to i32))
4949 %tmp106.i = bitcast i8* %malloccall to %struct.ch_set*
5050 br i1 false, label %bb126.i, label %cond_next119.i
5151 cond_next119.i: ; preds = %cond_false99.i, %bb42
2323 entry:
2424 br i1 false, label %cond_next48, label %cond_false674
2525 cond_next48: ; preds = %entry
26 %tmp61 = call %struct.FILE* @fopen( i8* null, i8* getelementptr ([2 x i8]* @.str127, i32 0, i32 0) ) ; <%struct.FILE*> [#uses=2]
26 %tmp61 = call %struct.FILE* @fopen( i8* null, i8* getelementptr ([2 x i8], [2 x i8]* @.str127, i32 0, i32 0) ) ; <%struct.FILE*> [#uses=2]
2727 br i1 false, label %bb220.i.i.i, label %bb62.preheader.i.i.i
2828 bb62.preheader.i.i.i: ; preds = %cond_next48
2929 ret void
5252 bb192.i.i: ; preds = %bb177.i393.i
5353 ret void
5454 cond_false373.i.i: ; preds = %bb.i350.i
55 %tmp376.i.i = call i32 @strcmp( i8* null, i8* getelementptr ([9 x i8]* @.str8115, i32 0, i32 0) ) ; [#uses=0]
55 %tmp376.i.i = call i32 @strcmp( i8* null, i8* getelementptr ([9 x i8], [9 x i8]* @.str8115, i32 0, i32 0) ) ; [#uses=0]
5656 br i1 false, label %cond_true380.i.i, label %cond_next602.i.i
5757 cond_true380.i.i: ; preds = %cond_false373.i.i
5858 %tmp394.i418.i = add i32 %cell.0.i.i, 1 ; [#uses=1]
7272 br label %bb620.i.i
7373 bb620.i.i: ; preds = %bb620.i.i, %bb609.i.i
7474 %indvar166.i465.i = phi i32 [ %indvar.next167.i.i, %bb620.i.i ], [ 0, %bb609.i.i ] ; [#uses=1]
75 %tmp640.i.i = call i32 (%struct.FILE*, i8*, ...)* @fscanf( %struct.FILE* %tmp61, i8* getelementptr ([5 x i8]* @.str584, i32 0, i32 0), [1024 x i8]* null ) ; [#uses=0]
75 %tmp640.i.i = call i32 (%struct.FILE*, i8*, ...)* @fscanf( %struct.FILE* %tmp61, i8* getelementptr ([5 x i8], [5 x i8]* @.str584, i32 0, i32 0), [1024 x i8]* null ) ; [#uses=0]
7676 %tmp648.i.i = load i32, i32* null, align 4 ; [#uses=1]
7777 %tmp650.i468.i = icmp sgt i32 0, %tmp648.i.i ; [#uses=1]
78 %tmp624.i469.i = call i32 (%struct.FILE*, i8*, ...)* @fscanf( %struct.FILE* %tmp61, i8* getelementptr ([5 x i8]* @.str584, i32 0, i32 0), [1024 x i8]* null ) ; [#uses=0]
78 %tmp624.i469.i = call i32 (%struct.FILE*, i8*, ...)* @fscanf( %struct.FILE* %tmp61, i8* getelementptr ([5 x i8], [5 x i8]* @.str584, i32 0, i32 0), [1024 x i8]* null ) ; [#uses=0]
7979 %indvar.next167.i.i = add i32 %indvar166.i465.i, 1 ; [#uses=1]
8080 br i1 %tmp650.i468.i, label %bb653.i.i.loopexit, label %bb620.i.i
8181 bb653.i.i.loopexit: ; preds = %bb620.i.i
2020 br i1 false, label %init_orig_buffers.exit, label %cond_true.i29
2121
2222 cond_true.i29: ; preds = %entry
23 %tmp17.i = load i32, i32* getelementptr (%struct.ImageParameters* @images, i32 0, i32 20), align 8 ; [#uses=1]
24 %tmp20.i27 = load i32, i32* getelementptr (%struct.ImageParameters* @images, i32 0, i32 16), align 8 ; [#uses=1]
23 %tmp17.i = load i32, i32* getelementptr (%struct.ImageParameters, %struct.ImageParameters* @images, i32 0, i32 20), align 8 ; [#uses=1]
24 %tmp20.i27 = load i32, i32* getelementptr (%struct.ImageParameters, %struct.ImageParameters* @images, i32 0, i32 16), align 8 ; [#uses=1]
2525 %tmp8.i.i = select i1 false, i32 1, i32 0 ; [#uses=1]
2626 br label %bb.i8.us.i
2727
88
99 define fastcc void @init_global_buffers() nounwind {
1010 entry:
11 %tmp151 = tail call fastcc i32 @get_mem2Dint( i32*** getelementptr (%struct.Decoders* @decoders, i32 0, i32 0), i32 16, i32 16 ) ; [#uses=1]
11 %tmp151 = tail call fastcc i32 @get_mem2Dint( i32*** getelementptr (%struct.Decoders, %struct.Decoders* @decoders, i32 0, i32 0), i32 16, i32 16 ) ; [#uses=1]
1212 %tmp158 = tail call i8* @calloc( i32 0, i32 4 ) ; [#uses=0]
1313 br i1 false, label %cond_true166, label %bb190.preheader
1414
77
88 define i32 @__gcov_close() nounwind {
99 entry:
10 load i32, i32* getelementptr (%struct.__gcov_var* @__gcov_var, i32 0, i32 5), align 4 ; :0 [#uses=1]
10 load i32, i32* getelementptr (%struct.__gcov_var, %struct.__gcov_var* @__gcov_var, i32 0, i32 5), align 4 ; :0 [#uses=1]
1111 ret i32 %0
1212 }
8080 br i1 %0, label %bb435, label %bb433
8181
8282 bb394: ; preds = %bb122
83 call void (i32, i32, i8*, i32, %struct.FILE_POS*, ...)* @Error(i32 1, i32 3, i8* getelementptr ([23 x i8]* @"\01LC13423", i32 0, i32 0), i32 0, %struct.FILE_POS* @no_file_pos, i8* getelementptr ([13 x i8]* @"\01LC18972", i32 0, i32 0), i8* null) nounwind
83 call void (i32, i32, i8*, i32, %struct.FILE_POS*, ...)* @Error(i32 1, i32 3, i8* getelementptr ([23 x i8], [23 x i8]* @"\01LC13423", i32 0, i32 0), i32 0, %struct.FILE_POS* @no_file_pos, i8* getelementptr ([13 x i8], [13 x i8]* @"\01LC18972", i32 0, i32 0), i8* null) nounwind
8484 br label %bb396
8585
8686 bb396: ; preds = %bb394, %bb131, %bb122, %bb122, %bb122, %bb122, %RESUME
44 define i16 @fn16(i16 %arg0.0, <2 x i16> %arg1, i16 %arg2.0) nounwind {
55 entry:
66 store <2 x i16> %arg1, <2 x i16>* null
7 %0 = call i32 (i8*, ...)* @printf(i8* getelementptr ([30 x i8]* @.str, i32 0, i32 0), i32 0) nounwind ; [#uses=0]
7 %0 = call i32 (i8*, ...)* @printf(i8* getelementptr ([30 x i8], [30 x i8]* @.str, i32 0, i32 0), i32 0) nounwind ; [#uses=0]
88 ret i16 0
99 }
1010
1818
1919 bb3: ; preds = %bb1, %bb
2020 %iftmp.0.0 = phi i32 [ 0, %bb1 ], [ -1, %bb ] ; [#uses=1]
21 %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([7 x i8]* @"\01LC", i32 0, i32 0), i32 0, i32 %iftmp.0.0) nounwind ; [#uses=0]
21 %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([7 x i8], [7 x i8]* @"\01LC", i32 0, i32 0), i32 0, i32 %iftmp.0.0) nounwind ; [#uses=0]
2222 %2 = load %struct.List*, %struct.List** null, align 4 ; <%struct.List*> [#uses=2]
2323 %phitmp = icmp eq %struct.List* %2, null ; [#uses=1]
2424 br i1 %phitmp, label %bb5, label %bb
5656 br i1 undef, label %bb5.i, label %bb1.outer2.i.i.outer
5757
5858 bb5.i: ; preds = %Fft.exit.i
59 %0 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([15 x i8]* @"\01LC", i32 0, i32 0), double undef, double undef) nounwind ; [#uses=0]
59 %0 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([15 x i8], [15 x i8]* @"\01LC", i32 0, i32 0), double undef, double undef) nounwind ; [#uses=0]
6060 unreachable
6161 }
4646 tail call void @diff(i8* undef, i8* %3, i32 undef, i32 undef, i32 undef, i32 undef) nounwind
4747 %4 = sitofp i32 undef to double ; [#uses=1]
4848 %5 = fdiv double %4, 1.000000e+01 ; [#uses=1]
49 %6 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([29 x i8]* @"\01LC12", i32 0, i32 0), double %5) nounwind ; [#uses=0]
49 %6 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([29 x i8], [29 x i8]* @"\01LC12", i32 0, i32 0), double %5) nounwind ; [#uses=0]
5050 %7 = load i32, i32* @al_len, align 4 ; [#uses=1]
5151 %8 = load i32, i32* @no_mat, align 4 ; [#uses=1]
5252 %9 = load i32, i32* @no_mis, align 4 ; [#uses=1]
5353 %10 = sub i32 %7, %8 ; [#uses=1]
5454 %11 = sub i32 %10, %9 ; [#uses=1]
55 %12 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([33 x i8]* @"\01LC16", i32 0, i32 0), i32 %11) nounwind ; [#uses=0]
56 %13 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([47 x i8]* @"\01LC17", i32 0, i32 0), i32 undef, i32 %1, i32 undef, i32 undef) nounwind ; [#uses=0]
55 %12 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([33 x i8], [33 x i8]* @"\01LC16", i32 0, i32 0), i32 %11) nounwind ; [#uses=0]
56 %13 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([47 x i8], [47 x i8]* @"\01LC17", i32 0, i32 0), i32 undef, i32 %1, i32 undef, i32 undef) nounwind ; [#uses=0]
5757 br i1 undef, label %bb15, label %bb12
5858
5959 bb12: ; preds = %bb11
4141 store i32 0, i32* @no_mis, align 4
4242 %4 = getelementptr i8, i8* %B, i32 %0 ; [#uses=1]
4343 tail call void @diff(i8* undef, i8* %4, i32 undef, i32 %3, i32 undef, i32 undef) nounwind
44 %5 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([33 x i8]* @"\01LC11", i32 0, i32 0), i32 %tmp13) nounwind ; [#uses=0]
44 %5 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([33 x i8], [33 x i8]* @"\01LC11", i32 0, i32 0), i32 %tmp13) nounwind ; [#uses=0]
4545 %6 = load i32, i32* @no_mis, align 4 ; [#uses=1]
46 %7 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([33 x i8]* @"\01LC15", i32 0, i32 0), i32 %6) nounwind ; [#uses=0]
47 %8 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([47 x i8]* @"\01LC17", i32 0, i32 0), i32 undef, i32 %1, i32 undef, i32 %2) nounwind ; [#uses=0]
46 %7 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([33 x i8], [33 x i8]* @"\01LC15", i32 0, i32 0), i32 %6) nounwind ; [#uses=0]
47 %8 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([47 x i8], [47 x i8]* @"\01LC17", i32 0, i32 0), i32 undef, i32 %1, i32 undef, i32 %2) nounwind ; [#uses=0]
4848 br i1 undef, label %bb15, label %bb12
4949
5050 bb12: ; preds = %bb11
10111011 br i1 %764, label %bb10, label %bb11
10121012
10131013 bb8: ; preds = %entry
1014 %768 = call i32 @puts(i8* getelementptr ([21 x i8]* @_2E_str7, i32 0, i32 0)) nounwind ; [#uses=0]
1014 %768 = call i32 @puts(i8* getelementptr ([21 x i8], [21 x i8]* @_2E_str7, i32 0, i32 0)) nounwind ; [#uses=0]
10151015 call void @exit(i32 -1) noreturn nounwind
10161016 unreachable
10171017
1313 br i1 %p, label %bb8, label %bb1
1414
1515 bb1: ; preds = %entry
16 %malloccall = tail call i8* @malloc(i32 ptrtoint (%struct.Village* getelementptr (%struct.Village* null, i32 1) to i32))
16 %malloccall = tail call i8* @malloc(i32 ptrtoint (%struct.Village* getelementptr (%struct.Village, %struct.Village* null, i32 1) to i32))
1717 %0 = bitcast i8* %malloccall to %struct.Village*
1818 %exp2 = call double @ldexp(double 1.000000e+00, i32 %level) nounwind ; [#uses=1]
1919 %.c = fptosi double %exp2 to i32 ; [#uses=1]
77 ;CHECK: [sp, #8]
88 ;CHECK: [sp, #12]
99 ;CHECK: [sp]
10 tail call void (i8*, ...)* @f(i8* getelementptr ([1 x i8]* @.str, i32 0, i32 0), i32 1, double 2.000000e+00, i32 3, double 4.000000e+00)
10 tail call void (i8*, ...)* @f(i8* getelementptr ([1 x i8], [1 x i8]* @.str, i32 0, i32 0), i32 1, double 2.000000e+00, i32 3, double 4.000000e+00)
1111 ret void
1212 }
1313
8181 ret void
8282
8383 bb1567: ; preds = %cond_true1254
84 %tmp1591 = load i64, i64* getelementptr inbounds (%struct.CHESS_POSITION* @search, i32 0, i32 4) ; [#uses=1]
84 %tmp1591 = load i64, i64* getelementptr inbounds (%struct.CHESS_POSITION, %struct.CHESS_POSITION* @search, i32 0, i32 4) ; [#uses=1]
8585 %tmp1572 = tail call fastcc i32 @FirstOne() ; [#uses=1]
8686 %tmp1594 = load i32, i32* undef ; [#uses=1]
8787 %tmp1594.upgrd.5 = trunc i32 %tmp1594 to i8 ; [#uses=1]
1818 %tmp21 = load i32, i32* undef ; [#uses=1]
1919 %0 = mul i32 1, %tmp21 ; [#uses=1]
2020 %vla22 = alloca i8, i32 %0, align 1 ; [#uses=1]
21 call void (...)* @zz(i8* getelementptr inbounds ([1 x i8]* @.str, i32 0, i32 0), i32 2, i32 1)
21 call void (...)* @zz(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i32 0, i32 0), i32 2, i32 1)
2222 br i1 undef, label %if.then, label %if.end36
2323
2424 if.then: ; preds = %entry
1212 define void @TW_oldinput(%struct.FILE* nocapture %fp) nounwind {
1313 entry:
1414 %xcenter = alloca i32, align 4 ; [#uses=2]
15 %0 = call i32 (%struct.FILE*, i8*, ...)* @fscanf(%struct.FILE* %fp, i8* getelementptr inbounds ([14 x i8]* @.str2708, i32 0, i32 0), i32* undef, i32* undef, i32* %xcenter, i32* null) nounwind ; [#uses=1]
15 %0 = call i32 (%struct.FILE*, i8*, ...)* @fscanf(%struct.FILE* %fp, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str2708, i32 0, i32 0), i32* undef, i32* undef, i32* %xcenter, i32* null) nounwind ; [#uses=1]
1616 %1 = icmp eq i32 %0, 4 ; [#uses=1]
1717 br i1 %1, label %bb, label %return
1818
136136 br i1 undef, label %bb248, label %bb445
137137
138138 bb445: ; preds = %bb322, %bb10, %bb
139 %49 = call i32 (%struct.FILE*, i8*, ...)* @fscanf(%struct.FILE* %fp, i8* getelementptr inbounds ([14 x i8]* @.str2708, i32 0, i32 0), i32* undef, i32* undef, i32* %xcenter, i32* null) nounwind ; [#uses=1]
139 %49 = call i32 (%struct.FILE*, i8*, ...)* @fscanf(%struct.FILE* %fp, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str2708, i32 0, i32 0), i32* undef, i32* undef, i32* %xcenter, i32* null) nounwind ; [#uses=1]
140140 %50 = icmp eq i32 %49, 4 ; [#uses=1]
141141 br i1 %50, label %bb, label %return
142142
127127 br i1 %cmp19, label %cond.false, label %cond.end
128128
129129 cond.false: ; preds = %if.end
130 tail call void @__assert_fail(i8* getelementptr inbounds ([45 x i8]* @.str51, i32 0, i32 0), i8* getelementptr inbounds ([47 x i8]* @.str8, i32 0, i32 0), i32 1141, i8* getelementptr inbounds ([116 x i8]* @__PRETTY_FUNCTION__._ZNK4llvm7VarInit12getFieldInitERNS_6RecordEPKNS_9RecordValERKSs, i32 0, i32 0)) noreturn
130 tail call void @__assert_fail(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str51, i32 0, i32 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str8, i32 0, i32 0), i32 1141, i8* getelementptr inbounds ([116 x i8], [116 x i8]* @__PRETTY_FUNCTION__._ZNK4llvm7VarInit12getFieldInitERNS_6RecordEPKNS_9RecordValERKSs, i32 0, i32 0)) noreturn
131131 unreachable
132132
133133 cond.end: ; preds = %if.end
77 %0 = shufflevector <2 x i64> undef, <2 x i64> zeroinitializer, <2 x i32> ; <<2 x i64>> [#uses=1]
88 store <2 x i64> %0, <2 x i64>* undef, align 16
99 %val4723 = load <8 x i16>, <8 x i16>* undef ; <<8 x i16>> [#uses=1]
10 call void @PrintShortX(i8* getelementptr inbounds ([21 x i8]* @.str271, i32 0, i32 0), <8 x i16> %val4723, i32 0) nounwind
10 call void @PrintShortX(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str271, i32 0, i32 0), <8 x i16> %val4723, i32 0) nounwind
1111 ret i32 undef
1212 }
1313
88 @d = internal global i32 0, align 4 ; [#uses=6]
99 @_ZTVN10__cxxabiv117__class_type_infoE = external global i8* ; [#uses=1]
1010 @_ZTS1A = internal constant [3 x i8] c"1A\00" ; <[3 x i8]*> [#uses=1]
11 @_ZTI1A = internal constant %0 { i8* bitcast (i8** getelementptr inbounds (i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([3 x i8]* @_ZTS1A, i32 0, i32 0) } ; <%0*> [#uses=1]
11 @_ZTI1A = internal constant %0 { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1A, i32 0, i32 0) } ; <%0*> [#uses=1]
1212 @.str2 = private constant [18 x i8] c"c == %d, d == %d\0A\00" ; <[18 x i8]*> [#uses=1]
1313 @.str3 = private constant [16 x i8] c"A(const A&) %d\0A\00" ; <[16 x i8]*> [#uses=1]
1414 @.str4 = private constant [9 x i8] c"~A() %d\0A\00" ; <[9 x i8]*> [#uses=1]
3030 entry:
3131 %tmp.i = getelementptr inbounds %struct.A, %struct.A* %this, i32 0, i32 0 ; [#uses=1]
3232 %tmp2.i = load i32, i32* %tmp.i ; [#uses=1]
33 %call.i = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8]* @.str4, i32 0, i32 0), i32 %tmp2.i) nounwind ; [#uses=0]
33 %call.i = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str4, i32 0, i32 0), i32 %tmp2.i) nounwind ; [#uses=0]
3434 %tmp3.i = load i32, i32* @d ; [#uses=1]
3535 %inc.i = add nsw i32 %tmp3.i, 1 ; [#uses=1]
3636 store i32 %inc.i, i32* @d
4141
4242 define i32 @main() ssp {
4343 entry:
44 %puts.i = tail call i32 @puts(i8* getelementptr inbounds ([14 x i8]* @str, i32 0, i32 0)) ; [#uses=0]
44 %puts.i = tail call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str, i32 0, i32 0)) ; [#uses=0]
4545 %exception.i = tail call i8* @__cxa_allocate_exception(i32 4) nounwind ; [#uses=2]
4646 %tmp2.i.i.i = bitcast i8* %exception.i to i32* ; [#uses=1]
4747 store i32 1, i32* %tmp2.i.i.i
48 %call.i.i.i = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([8 x i8]* @.str5, i32 0, i32 0), i32 1) nounwind ; [#uses=0]
48 %call.i.i.i = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str5, i32 0, i32 0), i32 1) nounwind ; [#uses=0]
4949 invoke void @__cxa_throw(i8* %exception.i, i8* bitcast (%0* @_ZTI1A to i8*), i8* bitcast (void (%struct.A*)* @_ZN1AD1Ev to i8*)) noreturn
5050 to label %.noexc unwind label %lpad
5151
5454
5555 try.cont: ; preds = %lpad
5656 %0 = tail call i8* @__cxa_get_exception_ptr(i8* %exn) nounwind ; [#uses=0]
57 %call.i.i = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([16 x i8]* @.str3, i32 0, i32 0), i32 2) nounwind ; [#uses=0]
57 %call.i.i = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str3, i32 0, i32 0), i32 2) nounwind ; [#uses=0]
5858 %1 = tail call i8* @__cxa_begin_catch(i8* %exn) nounwind ; [#uses=0]
59 %puts = tail call i32 @puts(i8* getelementptr inbounds ([8 x i8]* @str1, i32 0, i32 0)) ; [#uses=0]
60 %call.i.i3 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8]* @.str4, i32 0, i32 0), i32 2) nounwind ; [#uses=0]
59 %puts = tail call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str1, i32 0, i32 0)) ; [#uses=0]
60 %call.i.i3 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str4, i32 0, i32 0), i32 2) nounwind ; [#uses=0]
6161 %tmp3.i.i = load i32, i32* @d ; [#uses=1]
6262 %inc.i.i4 = add nsw i32 %tmp3.i.i, 1 ; [#uses=1]
6363 store i32 %inc.i.i4, i32* @d
6464 tail call void @__cxa_end_catch()
6565 %tmp13 = load i32, i32* @d ; [#uses=1]
66 %call14 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str2, i32 0, i32 0), i32 2, i32 %tmp13) ; [#uses=0]
66 %call14 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str2, i32 0, i32 0), i32 2, i32 %tmp13) ; [#uses=0]
6767 %tmp16 = load i32, i32* @d ; [#uses=1]
6868 %cmp = icmp ne i32 %tmp16, 2 ; [#uses=1]
6969 %conv = zext i1 %cmp to i32 ; [#uses=1]
4747 %tmp10 = zext i32 %tmp6 to i64
4848 %tmp11 = zext i32 %tmp5 to i64
4949 %tmp12 = mul nsw i64 %tmp10, %tmp11
50 %tmp13 = call i32 @foo(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0), i64 %tmp12, i32 %tmp5) nounwind
50 %tmp13 = call i32 @foo(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), i64 %tmp12, i32 %tmp5) nounwind
5151 br label %bb8
5252
5353 bb4:
1414 ; CHECK: ldr.w
1515 ; CHECK-NOT: ldm
1616 entry:
17 %tmp13 = load i32, i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 0), align 1
18 %tmp15 = load i32, i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 1), align 1
19 %tmp17 = load i32, i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 2), align 1
20 %tmp19 = load i32, i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 3), align 1
21 %tmp = load i32, i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 0), align 1
22 %tmp3 = load i32, i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 1), align 1
23 %tmp4 = load i32, i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 2), align 1
24 %tmp5 = load i32, i32* getelementptr inbounds (%struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 3), align 1
17 %tmp13 = load i32, i32* getelementptr inbounds (%struct.InformationBlock, %struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 0), align 1
18 %tmp15 = load i32, i32* getelementptr inbounds (%struct.InformationBlock, %struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 1), align 1
19 %tmp17 = load i32, i32* getelementptr inbounds (%struct.InformationBlock, %struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 2), align 1
20 %tmp19 = load i32, i32* getelementptr inbounds (%struct.InformationBlock, %struct.InformationBlock* @infoBlock, i32 0, i32 1, i32 0, i32 3), align 1
21 %tmp = load i32, i32* getelementptr inbounds (%struct.InformationBlock, %struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 0), align 1
22 %tmp3 = load i32, i32* getelementptr inbounds (%struct.InformationBlock, %struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 1), align 1
23 %tmp4 = load i32, i32* getelementptr inbounds (%struct.InformationBlock, %struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 2), align 1
24 %tmp5 = load i32, i32* getelementptr inbounds (%struct.InformationBlock, %struct.InformationBlock* @infoBlock, i32 0, i32 2, i32 0, i32 3), align 1
2525 %insert21 = insertvalue [4 x i32] undef, i32 %tmp13, 0
2626 %insert23 = insertvalue [4 x i32] %insert21, i32 %tmp15, 1
2727 %insert25 = insertvalue [4 x i32] %insert23, i32 %tmp17, 2
99 @foo = external global %0, align 16
1010
1111 define arm_aapcs_vfpcc void @bar(float, i1 zeroext, i1 zeroext) nounwind {
12 %4 = load <4 x float>, <4 x float>* getelementptr inbounds (%0* @foo, i32 0, i32 0), align 16
12 %4 = load <4 x float>, <4 x float>* getelementptr inbounds (%0, %0* @foo, i32 0, i32 0), align 16
1313 %5 = extractelement <4 x float> %4, i32 0
1414 %6 = extractelement <4 x float> %4, i32 1
1515 %7 = extractelement <4 x float> %4, i32 2
1313 entry:
1414 %a = getelementptr inbounds %struct_t, %struct_t* %val, i32 0, i32 0
1515 %0 = load double, double* %a
16 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8]* @.str, i32 0, i32 0), double %0)
16 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), double %0)
1717 ret void
1818 }
1414 %conv = sext i16 %b to i32
1515 %conv1 = sext i8 %E to i32
1616 %call = tail call i32 (i8*, ...)* @printf(
17 i8* getelementptr inbounds ([13 x i8]* @.str, i32 0, i32 0), ; --> R0
17 i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), ; --> R0
1818 i32 %a, ; --> R1
1919 i32 %conv, ; --> R2
2020 double %C, ; --> SP, NCRN := R4
55
66 define arm_aapcs_vfpcc void @function() {
77 entry:
8 call arm_aapcs_vfpcc void @callee(i8* getelementptr inbounds ([7 x i8]* @.str, i32 0, i32 0))
8 call arm_aapcs_vfpcc void @callee(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0))
99 ret void
1010 }
1111
11
22 @_ZTVN10__cxxabiv117__class_type_infoE = external global i8*
33 @_ZTS3Foo = linkonce_odr constant [5 x i8] c"3Foo\00"
4 @_ZTI3Foo = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([5 x i8]* @_ZTS3Foo, i32 0, i32 0) }
4 @_ZTI3Foo = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @_ZTS3Foo, i32 0, i32 0) }
55
66 define i32 @main() {
77 entry:
99 entry:
1010 %retval = alloca i32, align 4
1111 store i32 0, i32* %retval
12 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([32 x i8]* @buffer, i32 0, i32 0))
13 %call1 = call i8* @strcpy(i8* getelementptr inbounds ([32 x i8]* @buffer, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8]* @.str1, i32 0, i32 0)) #3
14 call void @llvm.clear_cache(i8* getelementptr inbounds ([32 x i8]* @buffer, i32 0, i32 0), i8* getelementptr inbounds (i8* getelementptr inbounds ([32 x i8]* @buffer, i32 0, i32 0), i32 32)) #3
15 %call2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([32 x i8]* @buffer, i32 0, i32 0))
12 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @buffer, i32 0, i32 0))
13 %call1 = call i8* @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @buffer, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str1, i32 0, i32 0)) #3
14 call void @llvm.clear_cache(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @buffer, i32 0, i32 0), i8* getelementptr inbounds (i8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @buffer, i32 0, i32 0), i32 32)) #3
15 %call2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @buffer, i32 0, i32 0))
1616 ret i32 0
1717 }
1818
2020 %letter = alloca i8 ; [#uses=0]
2121 %prodvers = alloca [256 x i8] ; <[256 x i8]*> [#uses=1]
2222 %buildver = alloca [256 x i8] ; <[256 x i8]*> [#uses=0]
23 call void @llvm.memcpy.p0i8.p0i8.i32(i8* undef, i8* getelementptr inbounds ([256 x i8]* @.str523, i32 0, i32 0), i32 256, i32 1, i1 false)
23 call void @llvm.memcpy.p0i8.p0i8.i32(i8* undef, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @.str523, i32 0, i32 0), i32 256, i32 1, i1 false)
2424 %prodvers2 = bitcast [256 x i8]* %prodvers to i8* ; [#uses=1]
25 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %prodvers2, i8* getelementptr inbounds ([256 x i8]* @.str523, i32 0, i32 0), i32 256, i32 1, i1 false)
25 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %prodvers2, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @.str523, i32 0, i32 0), i32 256, i32 1, i1 false)
2626 unreachable
2727 }
2222 br i1 false, label %while.end42, label %while.body37
2323
2424 while.end42: ; preds = %while.body37, %entry
25 %. = select i1 undef, i8* getelementptr inbounds ([200 x i8]* @F_floatmul.man1, i32 0, i32 0), i8* getelementptr inbounds ([200 x i8]* @F_floatmul.man2, i32 0, i32 0)
26 %.92 = select i1 undef, i8* getelementptr inbounds ([200 x i8]* @F_floatmul.man2, i32 0, i32 0), i8* getelementptr inbounds ([200 x i8]* @F_floatmul.man1, i32 0, i32 0)
25 %. = select i1 undef, i8* getelementptr inbounds ([200 x i8], [200 x i8]* @F_floatmul.man1, i32 0, i32 0), i8* getelementptr inbounds ([200 x i8], [200 x i8]* @F_floatmul.man2, i32 0, i32 0)
26 %.92 = select i1 undef, i8* getelementptr inbounds ([200 x i8], [200 x i8]* @F_floatmul.man2, i32 0, i32 0), i8* getelementptr inbounds ([200 x i8], [200 x i8]* @F_floatmul.man1, i32 0, i32 0)
2727 tail call void bitcast (void (...)* @S_trimzeros to void (i8*)*)(i8* %.92) nounwind
2828 %call47 = tail call i32 @strlen(i8* %.) nounwind
2929 unreachable
88 declare void @bar(i32*)
99
1010 define void @foo() {
11 %flag = load i32, i32* getelementptr inbounds([16 x i32]* @var, i32 0, i32 1)
11 %flag = load i32, i32* getelementptr inbounds([16 x i32], [16 x i32]* @var, i32 0, i32 1)
1212 %tst = icmp eq i32 %flag, 0
1313 br i1 %tst, label %true, label %false
1414 true:
15 tail call void @bar(i32* getelementptr inbounds([16 x i32]* @var, i32 0, i32 4))
15 tail call void @bar(i32* getelementptr inbounds([16 x i32], [16 x i32]* @var, i32 0, i32 4))
1616 ret void
1717 false:
1818 ret void
2727 for.end54: ; preds = %for.body9
2828 %tmp115 = extractelement <4 x float> %add19, i32 1
2929 %conv6.i75 = fpext float %tmp115 to double, !dbg !45
30 %call.i82 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([13 x i8]* @.str, i32 0, i32 0), double undef, double %conv6.i75, double undef, double undef) nounwind, !dbg !45
30 %call.i82 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), double undef, double %conv6.i75, double undef, double undef) nounwind, !dbg !45
3131 %tmp116 = extractelement <4 x float> %add20, i32 1
3232 %conv6.i76 = fpext float %tmp116 to double, !dbg !45
33 %call.i83 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([13 x i8]* @.str, i32 0, i32 0), double undef, double %conv6.i76, double undef, double undef) nounwind, !dbg !45
33 %call.i83 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), double undef, double %conv6.i76, double undef, double undef) nounwind, !dbg !45
3434 ret i32 0, !dbg !49
3535 }
3636
1515 tail call void @llvm.dbg.value(metadata double %val, i64 0, metadata !20, metadata !MDExpression()), !dbg !26
1616 tail call void @llvm.dbg.value(metadata i8 %c, i64 0, metadata !21, metadata !MDExpression()), !dbg !26
1717 %0 = zext i8 %c to i32, !dbg !27
18 %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %val, i32 %0) nounwind, !dbg !27
18 %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %val, i32 %0) nounwind, !dbg !27
1919 ret i32 0, !dbg !29
2020 }
2121
2525 tail call void @llvm.dbg.value(metadata double %val, i64 0, metadata !17, metadata !MDExpression()), !dbg !30
2626 tail call void @llvm.dbg.value(metadata i8 %c, i64 0, metadata !18, metadata !MDExpression()), !dbg !30
2727 %0 = zext i8 %c to i32, !dbg !31
28 %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %val, i32 %0) nounwind, !dbg !31
28 %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %val, i32 %0) nounwind, !dbg !31
2929 ret i32 0, !dbg !33
3030 }
3131
4040 %0 = sitofp i32 %argc to double, !dbg !35
4141 %1 = fadd double %0, 5.555552e+05, !dbg !35
4242 tail call void @llvm.dbg.value(metadata double %1, i64 0, metadata !24, metadata !MDExpression()), !dbg !35
43 %2 = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0)) nounwind, !dbg !36
43 %2 = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0)) nounwind, !dbg !36
4444 %3 = getelementptr inbounds i8, i8* bitcast (i32 (i32, i8**)* @main to i8*), i32 %argc, !dbg !37
4545 %4 = trunc i32 %argc to i8, !dbg !37
4646 %5 = add i8 %4, 97, !dbg !37
4848 tail call void @llvm.dbg.value(metadata double %1, i64 0, metadata !20, metadata !MDExpression()) nounwind, !dbg !38
4949 tail call void @llvm.dbg.value(metadata i8 %5, i64 0, metadata !21, metadata !MDExpression()) nounwind, !dbg !38
5050 %6 = zext i8 %5 to i32, !dbg !39
51 %7 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %3, double %1, i32 %6) nounwind, !dbg !39
51 %7 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* %3, double %1, i32 %6) nounwind, !dbg !39
5252 %8 = tail call i32 @printer(i8* %3, double %1, i8 zeroext %5) nounwind, !dbg !40
5353 ret i32 0, !dbg !41
5454 }
2626 tail call void @llvm.dbg.value(metadata <4 x float> %add19, i64 0, metadata !27, metadata !MDExpression()), !dbg !39
2727 %tmp115 = extractelement <4 x float> %add19, i32 1
2828 %conv6.i75 = fpext float %tmp115 to double, !dbg !45
29 %call.i82 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([13 x i8]* @.str, i32 0, i32 0), double undef, double %conv6.i75, double undef, double undef) nounwind, !dbg !45
29 %call.i82 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), double undef, double %conv6.i75, double undef, double undef) nounwind, !dbg !45
3030 ret i32 0, !dbg !49
3131 }
3232
1818 tail call void @llvm.dbg.value(metadata i8 %c, i64 0, metadata !12, metadata !MDExpression()), !dbg !26
1919 %conv = fpext float %val to double, !dbg !27
2020 %conv3 = zext i8 %c to i32, !dbg !27
21 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %conv, i32 %conv3) nounwind optsize, !dbg !27
21 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %conv, i32 %conv3) nounwind optsize, !dbg !27
2222 ret i32 0, !dbg !29
2323 }
2424
3131 tail call void @llvm.dbg.value(metadata i8 %c, i64 0, metadata !16, metadata !MDExpression()), !dbg !32
3232 %conv = fpext float %val to double, !dbg !33
3333 %conv3 = zext i8 %c to i32, !dbg !33
34 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %conv, i32 %conv3) nounwind optsize, !dbg !33
34 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %conv, i32 %conv3) nounwind optsize, !dbg !33
3535 ret i32 0, !dbg !35
3636 }
3737
4343 %add = fadd double %conv, 5.555552e+05, !dbg !38
4444 %conv1 = fptrunc double %add to float, !dbg !38
4545 tail call void @llvm.dbg.value(metadata float %conv1, i64 0, metadata !22, metadata !MDExpression()), !dbg !38
46 %call = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0)) nounwind optsize, !dbg !39
46 %call = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0)) nounwind optsize, !dbg !39
4747 %add.ptr = getelementptr i8, i8* bitcast (i32 (i32, i8**)* @main to i8*), i32 %argc, !dbg !40
4848 %add5 = add nsw i32 %argc, 97, !dbg !40
4949 %conv6 = trunc i32 %add5 to i8, !dbg !40
5252 tail call void @llvm.dbg.value(metadata i8 %conv6, i64 0, metadata !12, metadata !MDExpression()) nounwind, !dbg !43
5353 %conv.i = fpext float %conv1 to double, !dbg !44
5454 %conv3.i = and i32 %add5, 255, !dbg !44
55 %call.i = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %add.ptr, double %conv.i, i32 %conv3.i) nounwind optsize, !dbg !44
55 %call.i = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* %add.ptr, double %conv.i, i32 %conv3.i) nounwind optsize, !dbg !44
5656 %call14 = tail call i32 @printer(i8* %add.ptr, float %conv1, i8 zeroext %conv6) optsize, !dbg !45
5757 ret i32 0, !dbg !46
5858 }
1414
1515 @_ZTVN10__cxxabiv117__class_type_infoE = external global i8*
1616 @_ZTS9exception = linkonce_odr constant [11 x i8] c"9exception\00"
17 @_ZTI9exception = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([11 x i8]* @_ZTS9exception, i32 0, i32 0) }
17 @_ZTI9exception = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @_ZTS9exception, i32 0, i32 0) }
1818
1919 define void @f() uwtable {
2020 %1 = alloca i8*
5050 %tmp9 = call i8* @strcpy(i8* %tmp6, i8* %tag)
5151 %tmp6.len = call i32 @strlen(i8* %tmp6)
5252 %tmp6.indexed = getelementptr i8, i8* %tmp6, i32 %tmp6.len
53 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp6.indexed, i8* getelementptr inbounds ([2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1, i1 false)
53 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp6.indexed, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1, i1 false)
5454 %tmp15 = call i8* @strcat(i8* %tmp6, i8* %contents)
5555 call fastcc void @comment_add(%struct.comment* %vc, i8* %tmp6)
5656 ret void
1313 ; ARM: t1
1414 ; THUMB: t1
1515 %addr = alloca i32*, align 4
16 store i32* getelementptr inbounds ([2 x [2 x [2 x [2 x [2 x i32]]]]]* @arr, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1), i32** %addr, align 4
16 store i32* getelementptr inbounds ([2 x [2 x [2 x [2 x [2 x i32]]]]], [2 x [2 x [2 x [2 x [2 x i32]]]]]* @arr, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1), i32** %addr, align 4
1717 ; ARM: add r0, r0, #124
1818 ; THUMB: adds r0, #124
1919 %0 = load i32*, i32** %addr, align 4
2525 ; ARM: t2
2626 ; THUMB: t2
2727 %addr = alloca i32*, align 4
28 store i32* getelementptr inbounds ([3 x [3 x %struct.A]]* @A, i32 0, i32 2, i32 2, i32 3, i32 1, i32 2, i32 2), i32** %addr, align 4
28 store i32* getelementptr inbounds ([3 x [3 x %struct.A]], [3 x [3 x %struct.A]]* @A, i32 0, i32 2, i32 2, i32 3, i32 1, i32 2, i32 2), i32** %addr, align 4
2929 ; ARM: movw [[R:r[0-9]+]], #1148
3030 ; ARM: add r0, r{{[0-9]+}}, [[R]]
3131 ; THUMB: addw r0, r0, #1148
3838 ; ARM: t3
3939 ; THUMB: t3
4040 %addr = alloca i32*, align 4
41 store i32* getelementptr inbounds ([3 x [3 x %struct.A]]* @A, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1), i32** %addr, align 4
41 store i32* getelementptr inbounds ([3 x [3 x %struct.A]], [3 x [3 x %struct.A]]* @A, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1), i32** %addr, align 4
4242 ; ARM: add r0, r0, #140
4343 ; THUMB: adds r0, #140
4444 %0 = load i32*, i32** %addr, align 4
5050 ; ARM: t4
5151 ; THUMB: t4
5252 %addr = alloca i32*, align 4
53 store i32* getelementptr inbounds ([2 x [2 x [2 x %struct.B]]]* @B, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1, i32 3, i32 1, i32 2, i32 1), i32** %addr, align 4
53 store i32* getelementptr inbounds ([2 x [2 x [2 x %struct.B]]], [2 x [2 x [2 x %struct.B]]]* @B, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1, i32 3, i32 1, i32 2, i32 1), i32** %addr, align 4
5454 ; ARM-NOT: movw r{{[0-9]}}, #1060
5555 ; ARM-NOT: add r{{[0-9]}}, r{{[0-9]}}, #4
5656 ; ARM-NOT: add r{{[0-9]}}, r{{[0-9]}}, #132
5050 ; ARM: @word_aligned_f64_store
5151 ; THUMB: @word_aligned_f64_store
5252 %add = fadd double %a, %b
53 store double %add, double* getelementptr inbounds (%struct.anon.0* @foo_unpacked, i32 0, i32 0), align 4
53 store double %add, double* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @foo_unpacked, i32 0, i32 0), align 4
5454 ; ARM: vstr d16, [r0]
5555 ; THUMB: vstr d16, [r0]
5656 ret void
3838 ; THUMB-LONG: movt r3, :upper16:L_memset$non_lazy_ptr
3939 ; THUMB-LONG: ldr r3, [r3]
4040 ; THUMB-LONG: blx r3
41 call void @llvm.memset.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @message1, i32 0, i32 5), i8 64, i32 10, i32 4, i1 false)
41 call void @llvm.memset.p0i8.i32(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @message1, i32 0, i32 5), i8 64, i32 10, i32 4, i1 false)
4242 ret void
4343 }
4444
7777 ; THUMB-LONG: movt r3, :upper16:L_memcpy$non_lazy_ptr
7878 ; THUMB-LONG: ldr r3, [r3]
7979 ; THUMB-LONG: blx r3
80 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 16), i32 17, i32 4, i1 false)
80 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 16), i32 17, i32 4, i1 false)
8181 ret void
8282 }
8383
114114 ; THUMB-LONG: movt r3, :upper16:L_memmove$non_lazy_ptr
115115 ; THUMB-LONG: ldr r3, [r3]
116116 ; THUMB-LONG: blx r3
117 call void @llvm.memmove.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 16), i32 10, i32 1, i1 false)
117 call void @llvm.memmove.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 16), i32 10, i32 1, i1 false)
118118 ret void
119119 }
120120
141141 ; THUMB: ldrh r1, [r0, #24]
142142 ; THUMB: strh r1, [r0, #12]
143143 ; THUMB: bx lr
144 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 16), i32 10, i32 4, i1 false)
144 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 16), i32 10, i32 4, i1 false)
145145 ret void
146146 }
147147
178178 ; THUMB: ldrh r1, [r0, #24]
179179 ; THUMB: strh r1, [r0, #12]
180180 ; THUMB: bx lr
181 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 16), i32 10, i32 2, i1 false)
181 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 16), i32 10, i32 2, i1 false)
182182 ret void
183183 }
184184
233233 ; THUMB: ldrb r1, [r0, #25]
234234 ; THUMB: strb r1, [r0, #13]
235235 ; THUMB: bx lr
236 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 16), i32 10, i32 1, i1 false)
236 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 16), i32 10, i32 1, i1 false)
237237 ret void
238238 }
239239
240240 ; rdar://13202135
241241 define void @t7() nounwind ssp {
242242 ; Just make sure this doesn't assert when we have an odd length and an alignment of 2.
243 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 16), i32 3, i32 2, i1 false)
243 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @temp, i32 0, i32 16), i32 3, i32 2, i1 false)
244244 ret void
245245 }
246246
2828 ; Function Attrs: nounwind ssp
2929 define internal void @initialize() #0 {
3030 %1 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #3
31 store i32 %1, i32* getelementptr inbounds ([5 x i32]* @bar, i32 0, i32 0), align 4, !tbaa !1
31 store i32 %1, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i32 0, i32 0), align 4, !tbaa !1
3232 %2 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #3
33 store i32 %2, i32* getelementptr inbounds ([5 x i32]* @baz, i32 0, i32 0), align 4, !tbaa !1
33 store i32 %2, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i32 0, i32 0), align 4, !tbaa !1
3434 %3 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #3
35 store i32 %3, i32* getelementptr inbounds ([5 x i32]* @bar, i32 0, i32 1), align 4, !tbaa !1
35 store i32 %3, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i32 0, i32 1), align 4, !tbaa !1
3636 %4 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #3
37 store i32 %4, i32* getelementptr inbounds ([5 x i32]* @baz, i32 0, i32 1), align 4, !tbaa !1
37 store i32 %4, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i32 0, i32 1), align 4, !tbaa !1
3838 %5 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #3
39 store i32 %5, i32* getelementptr inbounds ([5 x i32]* @bar, i32 0, i32 2), align 4, !tbaa !1
39 store i32 %5, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i32 0, i32 2), align 4, !tbaa !1
4040 %6 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #3
41 store i32 %6, i32* getelementptr inbounds ([5 x i32]* @baz, i32 0, i32 2), align 4, !tbaa !1
41 store i32 %6, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i32 0, i32 2), align 4, !tbaa !1
4242 %7 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #3
43 store i32 %7, i32* getelementptr inbounds ([5 x i32]* @bar, i32 0, i32 3), align 4, !tbaa !1
43 store i32 %7, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i32 0, i32 3), align 4, !tbaa !1
4444 %8 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #3
45 store i32 %8, i32* getelementptr inbounds ([5 x i32]* @baz, i32 0, i32 3), align 4, !tbaa !1
45 store i32 %8, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i32 0, i32 3), align 4, !tbaa !1
4646 %9 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #3
47 store i32 %9, i32* getelementptr inbounds ([5 x i32]* @bar, i32 0, i32 4), align 4, !tbaa !1
47 store i32 %9, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i32 0, i32 4), align 4, !tbaa !1
4848 %10 = tail call i32 bitcast (i32 (...)* @calc to i32 ()*)() #3
49 store i32 %10, i32* getelementptr inbounds ([5 x i32]* @baz, i32 0, i32 4), align 4, !tbaa !1
49 store i32 %10, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i32 0, i32 4), align 4, !tbaa !1
5050 ret void
5151 }
5252
5858 %2 = load <4 x i32>, <4 x i32>* bitcast ([5 x i32]* @baz to <4 x i32>*), align 4
5959 %3 = mul <4 x i32> %2, %1
6060 store <4 x i32> %3, <4 x i32>* bitcast ([5 x i32]* @foo to <4 x i32>*), align 4
61 %4 = load i32, i32* getelementptr inbounds ([5 x i32]* @bar, i32 0, i32 4), align 4, !tbaa !1
62 %5 = load i32, i32* getelementptr inbounds ([5 x i32]* @baz, i32 0, i32 4), align 4, !tbaa !1
61 %4 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @bar, i32 0, i32 4), align 4, !tbaa !1
62 %5 = load i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @baz, i32 0, i32 4), align 4, !tbaa !1
6363 %6 = mul nsw i32 %5, %4
64 store i32 %6, i32* getelementptr inbounds ([5 x i32]* @foo, i32 0, i32 4), align 4, !tbaa !1
64 store i32 %6, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @foo, i32 0, i32 4), align 4, !tbaa !1
6565 ret void
6666 }
6767
6868 ; Function Attrs: nounwind readnone ssp
6969 define internal i32* @returnFoo() #2 {
70 ret i32* getelementptr inbounds ([5 x i32]* @foo, i32 0, i32 0)
70 ret i32* getelementptr inbounds ([5 x i32], [5 x i32]* @foo, i32 0, i32 0)
7171 }
7272
7373 attributes #0 = { nounwind ssp "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
99 @str = internal constant [12 x i8] c"Hello World\00"
1010
1111 define i32 @main() {
12 %tmp = call i32 @puts( i8* getelementptr ([12 x i8]* @str, i32 0, i64 0) ) ; [#uses=0]
12 %tmp = call i32 @puts( i8* getelementptr ([12 x i8], [12 x i8]* @str, i32 0, i64 0) ) ; [#uses=0]
1313 ret i32 0
1414 }
1515
66 ; Function Attrs: nounwind ssp
77 define i32 @sfu() {
88 entry:
9 %bf.load = load i32, i32* getelementptr inbounds (%union.opcode* @opcode, i32 0, i32 0), align 4
9 %bf.load = load i32, i32* getelementptr inbounds (%union.opcode, %union.opcode* @opcode, i32 0, i32 0), align 4
1010 %bf.lshr = lshr i32 %bf.load, 26
1111 %bf.clear = and i32 %bf.lshr, 7
1212 switch i32 %bf.clear, label %return [
2626 %9 = load i32, i32* %8
2727 %10 = add i32 %9, ptrtoint (i8* blockaddress(@func, %4) to i32)
2828 %11 = inttoptr i32 %10 to i8*
29 %12 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([45 x i8]* @0, i32 0, i32 0))
29 %12 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @0, i32 0, i32 0))
3030 indirectbr i8* %11, [label %13, label %14]
3131
3232 ;
77 ; CHECK: pop
88 ; V4T-LABEL: t1:
99 ; V4T: pop
10 %tmp = load i32, i32* getelementptr ([0 x i32]* @X, i32 0, i32 0) ; [#uses=1]
11 %tmp3 = load i32, i32* getelementptr ([0 x i32]* @X, i32 0, i32 1) ; [#uses=1]
10 %tmp = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 0) ; [#uses=1]
11 %tmp3 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 1) ; [#uses=1]
1212 %tmp4 = tail call i32 @f1( i32 %tmp, i32 %tmp3 ) ; [#uses=1]
1313 ret i32 %tmp4
1414 }
1818 ; CHECK: pop
1919 ; V4T-LABEL: t2:
2020 ; V4T: pop
21 %tmp = load i32, i32* getelementptr ([0 x i32]* @X, i32 0, i32 2) ; [#uses=1]
22 %tmp3 = load i32, i32* getelementptr ([0 x i32]* @X, i32 0, i32 3) ; [#uses=1]
23 %tmp5 = load i32, i32* getelementptr ([0 x i32]* @X, i32 0, i32 4) ; [#uses=1]
21 %tmp = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 2) ; [#uses=1]
22 %tmp3 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 3) ; [#uses=1]
23 %tmp5 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 4) ; [#uses=1]
2424 %tmp6 = tail call i32 @f2( i32 %tmp, i32 %tmp3, i32 %tmp5 ) ; [#uses=1]
2525 ret i32 %tmp6
2626 }
3333 ; V4T: ldmib
3434 ; V4T: pop
3535 ; V4T-NEXT: bx lr
36 %tmp = load i32, i32* getelementptr ([0 x i32]* @X, i32 0, i32 1) ; [#uses=1]
37 %tmp3 = load i32, i32* getelementptr ([0 x i32]* @X, i32 0, i32 2) ; [#uses=1]
38 %tmp5 = load i32, i32* getelementptr ([0 x i32]* @X, i32 0, i32 3) ; [#uses=1]
36 %tmp = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 1) ; [#uses=1]
37 %tmp3 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 2) ; [#uses=1]
38 %tmp5 = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @X, i32 0, i32 3) ; [#uses=1]
3939 %tmp6 = call i32 @f2( i32 %tmp, i32 %tmp3, i32 %tmp5 ) ; [#uses=1]
4040 ret i32 %tmp6
4141 }
8383 ; A8-NEXT: str [[FIELD1]], {{\[}}[[BASE]]{{\]}}
8484 %orig_blocks = alloca [256 x i16], align 2
8585 %0 = bitcast [256 x i16]* %orig_blocks to i8*call void @llvm.lifetime.start(i64 512, i8* %0) nounwind
86 %tmp1 = load i32, i32* getelementptr inbounds (%struct.Test* @TestVar, i32 0, i32 1), align 4
87 %tmp2 = load i32, i32* getelementptr inbounds (%struct.Test* @TestVar, i32 0, i32 2), align 4
86 %tmp1 = load i32, i32* getelementptr inbounds (%struct.Test, %struct.Test* @TestVar, i32 0, i32 1), align 4
87 %tmp2 = load i32, i32* getelementptr inbounds (%struct.Test, %struct.Test* @TestVar, i32 0, i32 2), align 4
8888 %add = add nsw i32 %tmp2, %tmp1
89 store i32 %add, i32* getelementptr inbounds (%struct.Test* @TestVar, i32 0, i32 0), align 4
89 store i32 %add, i32* getelementptr inbounds (%struct.Test, %struct.Test* @TestVar, i32 0, i32 0), align 4
9090 call void @llvm.lifetime.end(i64 512, i8* %0) nounwind
9191 ret void
9292 }
3636 for.body.lr.ph: ; preds = %entry
3737 %1 = icmp sgt i32 %0, 1
3838 %smax = select i1 %1, i32 %0, i32 1
39 call void @llvm.memset.p0i8.i32(i8* getelementptr inbounds ([250 x i8]* @bar, i32 0, i32 0), i8 0, i32 %smax, i32 1, i1 false)
39 call void @llvm.memset.p0i8.i32(i8* getelementptr inbounds ([250 x i8], [250 x i8]* @bar, i32 0, i32 0), i8 0, i32 %smax, i32 1, i1 false)
4040 unreachable
4141
4242 for.cond1.preheader: ; preds = %entry
2222 ; CHECK-T1: strb [[TREG1]],
2323 ; CHECK-T1: ldrh [[TREG2:r[0-9]]],
2424 ; CHECK-T1: strh [[TREG2]]
25 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds (%struct.x* @dst, i32 0, i32 0), i8* getelementptr inbounds (%struct.x* @src, i32 0, i32 0), i32 11, i32 8, i1 false)
25 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds (%struct.x, %struct.x* @dst, i32 0, i32 0), i8* getelementptr inbounds (%struct.x, %struct.x* @src, i32 0, i32 0), i32 11, i32 8, i1 false)
2626 ret i32 0
2727 }
2828
3535 ; CHECK: adds r1, #15
3636 ; CHECK: vld1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r1]
3737 ; CHECK: vst1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r0]
38 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([31 x i8]* @.str1, i64 0, i64 0), i64 31, i32 1, i1 false)
38 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str1, i64 0, i64 0), i64 31, i32 1, i1 false)
3939 ret void
4040 }
4141
4949 ; CHECK: vst1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r0]!
5050 ; CHECK: vld1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r1]
5151 ; CHECK: vst1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r0]
52 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([36 x i8]* @.str2, i64 0, i64 0), i64 36, i32 1, i1 false)
52 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str2, i64 0, i64 0), i64 36, i32 1, i1 false)
5353 ret void
5454 }
5555
6060 ; CHECK: vst1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r0]!
6161 ; CHECK: vld1.8 {d{{[0-9]+}}}, [r1]
6262 ; CHECK: vst1.8 {d{{[0-9]+}}}, [r0]
63 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([24 x i8]* @.str3, i64 0, i64 0), i64 24, i32 1, i1 false)
63 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str3, i64 0, i64 0), i64 24, i32 1, i1 false)
6464 ret void
6565 }
6666
7070 ; CHECK: vld1.8 {[[REG3:d[0-9]+]], [[REG4:d[0-9]+]]}, [r1]
7171 ; CHECK: vst1.8 {[[REG3]], [[REG4]]}, [r0]!
7272 ; CHECK: strh [[REG5:r[0-9]+]], [r0]
73 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([18 x i8]* @.str4, i64 0, i64 0), i64 18, i32 1, i1 false)
73 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str4, i64 0, i64 0), i64 18, i32 1, i1 false)
7474 ret void
7575 }
7676
8989 ; CHECK-T1: strb [[TREG3]],
9090 ; CHECK-T1: movs [[TREG4:r[0-9]]],
9191 ; CHECK-T1: strb [[TREG4]],
92 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([7 x i8]* @.str5, i64 0, i64 0), i64 7, i32 1, i1 false)
92 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %C, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str5, i64 0, i64 0), i64 7, i32 1, i1 false)
9393 ret void
9494 }
9595
107107 ; CHECK-T1: strh [[TREG5]],
108108 ; CHECK-T1: ldr [[TREG6:r[0-9]]],
109109 ; CHECK-T1: str [[TREG6]]
110 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([512 x i8]* @spool.splbuf, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8]* @.str6, i64 0, i64 0), i64 14, i32 1, i1 false)
110 call void @llvm.memcpy.p0i8.p0i8.i64(i8* getelementptr inbounds ([512 x i8], [512 x i8]* @spool.splbuf, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str6, i64 0, i64 0), i64 14, i32 1, i1 false)
111111 ret void
112112 }
113113
144144 store i32 %1, i32* %out0, align 4
145145 %2 = call i32 asm "foo $1,$0", "=r,X"(i32 1) nounwind
146146 store i32 %2, i32* %out0, align 4
147 %3 = call i32 asm "foo $1,$0", "=r,X"(i32* getelementptr inbounds ([2 x i32]* @marray, i32 0, i32 0)) nounwind
147 %3 = call i32 asm "foo $1,$0", "=r,X"(i32* getelementptr inbounds ([2 x i32], [2 x i32]* @marray, i32 0, i32 0)) nounwind
148148 store i32 %3, i32* %out0, align 4
149149 ; No lowering support.
150150 ; %4 = call i32 asm "foo $1,$0", "=r,X"(double 1.000000e+001) nounwind
158158 entry:
159159 %out0 = alloca i32, align 4
160160 store i32 0, i32* %out0, align 4
161 %0 = call i32 asm "foo $1,$0", "=r,r"(i32* getelementptr inbounds ([2 x i32]* @marray, i32 0, i32 0)) nounwind
161 %0 = call i32 asm "foo $1,$0", "=r,r"(i32* getelementptr inbounds ([2 x i32], [2 x i32]* @marray, i32 0, i32 0)) nounwind
162162 store i32 %0, i32* %out0, align 4
163163 ret void
164164 }
302302 store i32 %1, i32* %out0, align 4
303303 %2 = call i32 asm "foo $1,$0", "=r|r,r|X"(i32 1) nounwind
304304 store i32 %2, i32* %out0, align 4
305 %3 = call i32 asm "foo $1,$0", "=r|r,r|X"(i32* getelementptr inbounds ([2 x i32]* @marray, i32 0, i32 0)) nounwind
305 %3 = call i32 asm "foo $1,$0", "=r|r,r|X"(i32* getelementptr inbounds ([2 x i32], [2 x i32]* @marray, i32 0, i32 0)) nounwind
306306 store i32 %3, i32* %out0, align 4
307307 ; No lowering support.
308308 ; %4 = call i32 asm "foo $1,$0", "=r|r,r|X"(double 1.000000e+001) nounwind
316316 entry:
317317 %out0 = alloca i32, align 4
318318 store i32 0, i32* %out0, align 4
319 %0 = call i32 asm "foo $1,$0", "=r|r,r|r"(i32* getelementptr inbounds ([2 x i32]* @marray, i32 0, i32 0)) nounwind
320 store i32 %0, i32* %out0, align 4
321 ret void
322 }
319 %0 = call i32 asm "foo $1,$0", "=r|r,r|r"(i32* getelementptr inbounds ([2 x i32], [2 x i32]* @marray, i32 0, i32 0)) nounwind
320 store i32 %0, i32* %out0, align 4
321 ret void
322 }
6363 ; CHECK-DARWINA15: vmul.f32 s{{[0-9]*}}
6464 ; CHECK-DARWINSWIFT: vmul.f32 d{{[0-9]*}}
6565 %conv = fpext float %mul to double
66 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8]* @.str, i32 0, i32 0), double %conv) #1
66 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), double %conv) #1
6767 %inc = add nsw i32 %i.04, 1
6868 %exitcond = icmp eq i32 %inc, 16000
6969 br i1 %exitcond, label %for.end, label %for.body
88 ; Function Attrs: nounwind ssp
99 define void @xfr() {
1010 entry:
11 %bf.load4 = load i32, i32* getelementptr inbounds (%union.opcode.0.2.5.8.15.28* @opcode, i32 0, i32 0), align 4
11 %bf.load4 = load i32, i32* getelementptr inbounds (%union.opcode.0.2.5.8.15.28, %union.opcode.0.2.5.8.15.28* @opcode, i32 0, i32 0), align 4
1212 %bf.clear10 = and i32 %bf.load4, 65535
1313 %and11 = and i32 %bf.load4, 32768
1414 %tobool12 = icmp ne i32 %and11, 0
1616 %or = or i32 %cond13, %bf.clear10
1717 %shl = shl nuw i32 %or, 2
1818 %add = add i32 0, %shl
19 tail call void (i8*, i32, i32, i8*, ...)* @__sprintf_chk(i8* getelementptr inbounds ([50 x i8]* @operands, i32 0, i32 0), i32 0, i32 50, i8* getelementptr inbounds ([13 x i8]* @.str86, i32 0, i32 0), i32 undef, i32 undef, i32 %add)
19 tail call void (i8*, i32, i32, i8*, ...)* @__sprintf_chk(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @operands, i32 0, i32 0), i32 0, i32 50, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str86, i32 0, i32 0), i32 undef, i32 undef, i32 %add)
2020 ret void
2121 }
2222
9292 define void @_Z4foo1c(i8 signext %a) {
9393 entry:
9494 %s1 = alloca %"class.std::__1::basic_string", align 4
95 call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm(%"class.std::__1::basic_string"* %s1, i8* getelementptr inbounds ([12 x i8]* @.str, i32 0, i32 0), i32 11)
95 call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm(%"class.std::__1::basic_string"* %s1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), i32 11)
9696 %call.i.i.i14.i.i = invoke noalias i8* @_Znwm(i32 1024)
9797 to label %do.body.i.i.i unwind label %lpad.body
9898
1414 entry:
1515 %title = alloca [15 x i8], align 1
1616 %0 = getelementptr inbounds [15 x i8], [15 x i8]* %title, i32 0, i32 0
17 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %0, i8* getelementptr inbounds ([15 x i8]* @main.title, i32 0, i32 0), i32 15, i32 1, i1 false)
18 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i8* %0) #3
17 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @main.title, i32 0, i32 0), i32 15, i32 1, i1 false)
18 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8* %0) #3
1919 ret i32 0
2020 }
2121
99 ; CHECK: main
1010 ; CHECK: push
1111 ; CHECK: stm
12 %0 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([26 x i8]* @"\01LC1", i32 0, i32 0), i32 -2, i32 -3, i32 2, i32 -6) nounwind ; [#uses=0]
13 %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([32 x i8]* @"\01LC", i32 0, i32 0), i32 0, i32 1, i32 0, i32 1, i32 0, i32 1) nounwind ; [#uses=0]
12 %0 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([26 x i8], [26 x i8]* @"\01LC1", i32 0, i32 0), i32 -2, i32 -3, i32 2, i32 -6) nounwind ; [#uses=0]
13 %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([32 x i8], [32 x i8]* @"\01LC", i32 0, i32 0), i32 0, i32 1, i32 0, i32 1, i32 0, i32 1) nounwind ; [#uses=0]
1414 ret i32 0
1515 }
55
66 define i32 @main() {
77 entry:
8 %tmp2 = load i32, i32* getelementptr (%struct.anon* @teste, i32 0, i32 0), align 8 ; [#uses=1]
8 %tmp2 = load i32, i32* getelementptr (%struct.anon, %struct.anon* @teste, i32 0, i32 0), align 8 ; [#uses=1]
99 ret i32 %tmp2
1010 }
99 %0 = load i64, i64* null, align 4 ; [#uses=1]
1010 %1 = uitofp i64 %0 to double ; [#uses=1]
1111 %2 = fdiv double 0.000000e+00, %1 ; [#uses=1]
12 %3 = call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* null, i8* getelementptr ([54 x i8]* @"\01LC10", i32 0, i32 0), i64 0, double %2) ; [#uses=0]
12 %3 = call i32 (%struct.FILE*, i8*, ...)* @fprintf(%struct.FILE* null, i8* getelementptr ([54 x i8], [54 x i8]* @"\01LC10", i32 0, i32 0), i64 0, double %2) ; [#uses=0]
1313 ret void
1414 }
1515
33
44 define i32 @main() {
55 entry:
6 %tmp = call i32 (i8*, ...)* @printf( i8* getelementptr ([43 x i8]* @str, i32 0, i64 0), i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10 ) ; [#uses=0]
7 %tmp2 = call i32 (i8*, ...)* @printf( i8* getelementptr ([43 x i8]* @str, i32 0, i64 0), i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1 ) ; [#uses=0]
6 %tmp = call i32 (i8*, ...)* @printf( i8* getelementptr ([43 x i8], [43 x i8]* @str, i32 0, i64 0), i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10 ) ; [#uses=0]
7 %tmp2 = call i32 (i8*, ...)* @printf( i8* getelementptr ([43 x i8], [43 x i8]* @str, i32 0, i64 0), i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1 ) ; [#uses=0]
88 ret i32 11
99 }
1010
1111 %devname = alloca [3 x i8], align 1
1212 %fmt = alloca [15 x i8], align 1
1313 %1 = getelementptr inbounds [3 x i8], [3 x i8]* %devname, i64 0, i64 0
14 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* getelementptr inbounds ([3 x i8]* @bpf_prog1.devname, i64 0, i64 0), i64 3, i32 1, i1 false)
14 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @bpf_prog1.devname, i64 0, i64 0), i64 3, i32 1, i1 false)
1515 %2 = getelementptr inbounds %struct.bpf_context, %struct.bpf_context* %ctx, i64 0, i32 0
1616 %3 = load i64, i64* %2, align 8
1717 %4 = inttoptr i64 %3 to %struct.sk_buff*
2424
2525 ;
2626 %11 = getelementptr inbounds [15 x i8], [15 x i8]* %fmt, i64 0, i64 0
27 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %11, i8* getelementptr inbounds ([15 x i8]* @bpf_prog1.fmt, i64 0, i64 0), i64 15, i32 1, i1 false)
27 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %11, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @bpf_prog1.fmt, i64 0, i64 0), i64 15, i32 1, i1 false)
2828 %12 = call i32 (i8*, i32, ...)* inttoptr (i64 11 to i32 (i8*, i32, ...)*)(i8* %11, i32 15, %struct.sk_buff* %4, i8* %7) #1
2929 ; CHECK-LABEL: bpf_prog1:
3030 ; CHECK: call 4
3535 @baz = common global %S zeroinitializer, align 1
3636
3737 define i16 @am6() nounwind {
38 %1 = load i16, i16* getelementptr (%S* @baz, i32 0, i32 1)
38 %1 = load i16, i16* getelementptr (%S, %S* @baz, i32 0, i32 1)
3939 ret i16 %1
4040 }
4141 ; CHECK-LABEL: am6:
102102 define void @foo_printf() #1 {
103103 %fmt = alloca [9 x i8], align 1
104104 %1 = getelementptr inbounds [9 x i8], [9 x i8]* %fmt, i64 0, i64 0
105 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* getelementptr inbounds ([9 x i8]* @foo_printf.fmt, i64 0, i64 0), i64 9, i32 1, i1 false)
105 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @foo_printf.fmt, i64 0, i64 0), i64 9, i32 1, i1 false)
106106 ; CHECK-LABEL: foo_printf:
107107 ; CHECK: ld_64 r1, 729618802566522216
108108 %2 = call i32 (i8*, ...)* @printf(i8* %1) #3
99 define { i64, i32 } @bar(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) #0 {
1010 entry:
1111 %retval.sroa.0.0.copyload = load i64, i64* bitcast (%struct.S* @s to i64*), align 4
12 %retval.sroa.2.0.copyload = load i32, i32* getelementptr inbounds (%struct.S* @s, i64 0, i32 2), align 4
12 %retval.sroa.2.0.copyload = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @s, i64 0, i32 2), align 4
1313 %.fca.0.insert = insertvalue { i64, i32 } undef, i64 %retval.sroa.0.0.copyload, 0
1414 %.fca.1.insert = insertvalue { i64, i32 } %.fca.0.insert, i32 %retval.sroa.2.0.copyload, 1
1515 ret { i64, i32 } %.fca.1.insert
3030 br i1 %tmp.8, label %then, label %else
3131
3232 then: ; preds = %entry
33 %tmp.11 = call i32 (i8*, ...)* @printf( i8* getelementptr ([6 x i8]* @.str_1, i64 0, i64 0) ) ; [#uses=0]
33 %tmp.11 = call i32 (i8*, ...)* @printf( i8* getelementptr ([6 x i8], [6 x i8]* @.str_1, i64 0, i64 0) ) ; [#uses=0]
3434 br label %UnifiedExitNode
3535
3636 else: ; preds = %entry
37 %tmp.13 = call i32 (i8*, ...)* @printf( i8* getelementptr ([7 x i8]* @.str_2, i64 0, i64 0) ) ; [#uses=0]
37 %tmp.13 = call i32 (i8*, ...)* @printf( i8* getelementptr ([7 x i8], [7 x i8]* @.str_2, i64 0, i64 0) ) ; [#uses=0]
3838 br label %UnifiedExitNode
3939
4040 UnifiedExitNode: ; preds = %else, %then
1313 %tmp.11 = call i64 @getL( ) ; [#uses=2]
1414 %tmp.5 = trunc i64 %tmp.11 to i32 ; [#uses=2]
1515 %tmp.23 = and i64 %tmp.11, -4294967296 ; [#uses=2]
16 %tmp.16 = call i32 (i8*, ...)* @printf( i8* getelementptr ([42 x i8]* @.str_1, i64 0, i64 0), i32 %tmp.5, i32 %tmp.5, i64 %tmp.23, i64 %tmp.23 ) ; [#uses=0]
16 %tmp.16 = call i32 (i8*, ...)* @printf( i8* getelementptr ([42 x i8], [42 x i8]* @.str_1, i64 0, i64 0), i32 %tmp.5, i32 %tmp.5, i64 %tmp.23, i64 %tmp.23 ) ; [#uses=0]
1717 ret i32 0
1818 }
1919
2727 define i32 @main() {
2828 entry:
2929 %result = call i32 @adj( i32 3, i32 2 ) ; [#uses=1]
30 %tmp.0 = call i32 (i8*, ...)* @printf( i8* getelementptr ([30 x i8]* @.str_1, i64 0, i64 0), i32 3, i32 2, i32 %result ) ; [#uses=0]
30 %tmp.0 = call i32 (i8*, ...)* @printf( i8* getelementptr ([30 x i8], [30 x i8]* @.str_1, i64 0, i64 0), i32 3, i32 2, i32 %result ) ; [#uses=0]
3131 ret i32 0
3232 }
3333
2727 %i = phi i64 [ 0, %entry ], [ %inc.i, %loopentry ] ; [#uses=3]
2828 %cptr = getelementptr [6 x i8], [6 x i8]* @yy_ec, i64 0, i64 %i ; [#uses=1]
2929 %c = load i8, i8* %cptr ; [#uses=1]
30 %ignore = call i32 (i8*, ...)* @printf( i8* getelementptr ([8 x i8]* @.str_3, i64 0, i64 0), i64 %i ) ; [#uses=0]
31 %ignore2 = call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @.str_4, i64 0, i64 0), i8 %c ) ; [#uses=0]
30 %ignore = call i32 (i8*, ...)* @printf( i8* getelementptr ([8 x i8], [8 x i8]* @.str_3, i64 0, i64 0), i64 %i ) ; [#uses=0]
31 %ignore2 = call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @.str_4, i64 0, i64 0), i8 %c ) ; [#uses=0]
3232 %inc.i = add i64 %i, 1 ; [#uses=2]
3333 %done = icmp sle i64 %inc.i, 5 ; [#uses=1]
3434 br i1 %done, label %loopentry, label %exit.1
1111
1212 else.0: ; preds = %cond_true, %entry
1313 %tmp.167.1 = phi i32 [ ptrtoint ([17 x i8]* @.str_87 to i32), %entry ], [ 0, %cond_true ] ; [#uses=0]
14 call void @Pr( i8* getelementptr ([4 x i8]* @.str_67, i32 0, i32 0), i32 0, i32 0 )
14 call void @Pr( i8* getelementptr ([4 x i8], [4 x i8]* @.str_67, i32 0, i32 0), i32 0, i32 0 )
1515 ret void
1616 }
1717
1010 define void @printArgsNoRet(i32 %a1, float %a2, i8 %a3, double %a4, i8* %a5, i32 %a6, float %a7, i8 %a8, double %a9, i8* %a10, i32 %a11, float %a12, i8 %a13, double %a14, i8* %a15) {
1111 entry:
1212 %tmp17 = sext i8 %a13 to i32 ; [#uses=1]
13 %tmp23 = call i32 (i8*, ...)* @printf( i8* getelementptr ([29 x i8]* @str2, i32 0, i64 0), i32 %a11, double 0.000000e+00, i32 %tmp17, double %a14, i32 0 ) ; [#uses=0]
13 %tmp23 = call i32 (i8*, ...)* @printf( i8* getelementptr ([29 x i8], [29 x i8]* @str2, i32 0, i64 0), i32 %a11, double 0.000000e+00, i32 %tmp17, double %a14, i32 0 ) ; [#uses=0]
1414 ret void
1515 }
1616
7777 ret void
7878
7979 bb1567: ; preds = %cond_true1254
80 %tmp1580 = load i64, i64* getelementptr (%struct.CHESS_POSITION* @search, i32 0, i32 3) ; [#uses=1]
81 %tmp1591 = load i64, i64* getelementptr (%struct.CHESS_POSITION* @search, i32 0, i32 4) ; [#uses=1]
80 %tmp1580 = load i64, i64* getelementptr (%struct.CHESS_POSITION, %struct.CHESS_POSITION* @search, i32 0, i32 3) ; [#uses=1]
81 %tmp1591 = load i64, i64* getelementptr (%struct.CHESS_POSITION, %struct.CHESS_POSITION* @search, i32 0, i32 4) ; [#uses=1]
8282 %tmp1572 = tail call fastcc i32 @FirstOne( ) ; [#uses=5]
8383 %tmp1582 = getelementptr [64 x i32], [64 x i32]* @bishop_shift_rl45, i32 0, i32 %tmp1572 ; [#uses=1]
8484 %tmp1583 = load i32, i32* %tmp1582 ; [#uses=1]
44
55 define void @typeinfo() {
66 entry:
7 %eh_typeid = tail call i32 @llvm.eh.typeid.for.i32( i8* getelementptr (%struct.exception* @program_error, i32 0, i32 0) ) ; [#uses=0]
7 %eh_typeid = tail call i32 @llvm.eh.typeid.for.i32( i8* getelementptr (%struct.exception, %struct.exception* @program_error, i32 0, i32 0) ) ; [#uses=0]
88 ret void
99 }
1010
99 %tmp38 = trunc i64 %tmp37 to i32 ; :0 [#uses=1]
1010 %tmp48 = trunc i64 %tmp47 to i32 ; :0 [#uses=1]
1111 %tmp58 = trunc i64 %tmp57 to i32 ; :0 [#uses=1]
12 %tmp40 = tail call i32 (i8*, ...)* @printf( i8* noalias getelementptr ([14 x i8]* @.str, i32 0, i32 0), i64 %arg, i32 %tmp38, i32 %tmp48, i32 %tmp58 ) nounwind ; [#uses=0]
12 %tmp40 = tail call i32 (i8*, ...)* @printf( i8* noalias getelementptr ([14 x i8], [14 x i8]* @.str, i32 0, i32 0), i64 %arg, i32 %tmp38, i32 %tmp48, i32 %tmp58 ) nounwind ; [#uses=0]
1313 ret i32 0
1414 }
1515
11 ; PR2603
22 %struct.A = type { i8 }
33 %struct.B = type { i8, [1 x i8] }
4 @Foo = constant %struct.A { i8 ptrtoint (i8* getelementptr ([1 x i8]* inttoptr (i32 17 to [1 x i8]*), i32 0, i32 -16) to i8) } ; <%struct.A*> [#uses=0]
4 @Foo = constant %struct.A { i8 ptrtoint (i8* getelementptr ([1 x i8], [1 x i8]* inttoptr (i32 17 to [1 x i8]*), i32 0, i32 -16) to i8) } ; <%struct.A*> [#uses=0]
1515
1616 not_less: ; preds = %less, %entry
1717 %t2 = phi i32 [ sub (i32 ptrtoint (i32* @XA to i32), i32 ptrtoint (i32* @XB to i32)), %less ], [ sub (i32 ptrtoint (i32* @XA to i32), i32 ptrtoint (i32* @XB to i32)), %entry ] ; [#uses=1]
18 %tmp.39 = call i32 (i8*, ...)* @printf( i8* getelementptr ([16 x i8]* @.str_1, i64 0, i64 0), i32 %t2 ) ; [#uses=0]
18 %tmp.39 = call i32 (i8*, ...)* @printf( i8* getelementptr ([16 x i8], [16 x i8]* @.str_1, i64 0, i64 0), i32 %t2 ) ; [#uses=0]
1919 ret void
2020 }
2121
1313 br i1 %obit, label %carry, label %normal
1414
1515 normal:
16 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @ok, i32 0, i32 0), i32 %sum32 ) nounwind
16 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @ok, i32 0, i32 0), i32 %sum32 ) nounwind
1717 ret i1 true
1818
1919 carry:
20 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @no, i32 0, i32 0) ) nounwind
20 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @no, i32 0, i32 0) ) nounwind
2121 ret i1 false
2222 }
2323
1111 br i1 %obit, label %overflow, label %normal
1212
1313 normal:
14 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @ok, i32 0, i32 0), i32 %sum32 ) nounwind
14 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @ok, i32 0, i32 0), i32 %sum32 ) nounwind
1515 ret i1 true
1616
1717 overflow:
18 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @no, i32 0, i32 0) ) nounwind
18 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @no, i32 0, i32 0) ) nounwind
1919 ret i1 false
2020 }
2121
2828 br i1 %obit, label %carry, label %normal
2929
3030 normal:
31 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @ok, i32 0, i32 0), i32 %sum32 ) nounwind
31 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @ok, i32 0, i32 0), i32 %sum32 ) nounwind
3232 ret i1 true
3333
3434 carry:
35 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @no, i32 0, i32 0) ) nounwind
35 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @no, i32 0, i32 0) ) nounwind
3636 ret i1 false
3737 }
3838
1111 br i1 %obit, label %overflow, label %normal
1212
1313 normal:
14 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @ok, i32 0, i32 0), i32 %sum ) nounwind
14 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @ok, i32 0, i32 0), i32 %sum ) nounwind
1515 ret i1 true
1616
1717 overflow:
18 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @no, i32 0, i32 0) ) nounwind
18 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @no, i32 0, i32 0) ) nounwind
1919 ret i1 false
2020 }
2121
2727 br i1 %obit, label %overflow, label %normal
2828
2929 normal:
30 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @ok, i32 0, i32 0), i32 %sum ) nounwind
30 %t1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @ok, i32 0, i32 0), i32 %sum ) nounwind
3131 ret i1 true
3232
3333 overflow:
34 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @no, i32 0, i32 0) ) nounwind
34 %t2 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8], [4 x i8]* @no, i32 0, i32 0) ) nounwind
3535 ret i1 false
3636 }
3737
77
88 define i32 @foo(i32 %a) {
99 entry:
10 %0 = call i32 @llvm.annotation.i32(i32 %a, i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8]* @.str1, i32 0, i32 0), i32 2)
10 %0 = call i32 @llvm.annotation.i32(i32 %a, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str1, i32 0, i32 0), i32 2)
1111 ret i32 %0
1212 }
1313
2626 %reg323 = phi double [ -1.000000e+00, %bb25 ], [ %reg317, %bb42 ] ; [#uses=1]
2727 %reg324 = phi double [ -1.000000e+00, %bb25 ], [ %reg318, %bb42 ] ; [#uses=1]
2828 %reg325 = phi double [ 1.000000e+00, %bb25 ], [ %reg319, %bb42 ] ; [#uses=1]
29 %reg609 = call i32 (i8*, ...)* @printf( i8* getelementptr ([44 x i8]* @.LC12, i64 0, i64 0), double %reg325, double %reg324, double %reg323, double %reg322, double %reg321 ) ; [#uses=0]
29 %reg609 = call i32 (i8*, ...)* @printf( i8* getelementptr ([44 x i8], [44 x i8]* @.LC12, i64 0, i64 0), double %reg325, double %reg324, double %reg323, double %reg322, double %reg321 ) ; [#uses=0]
3030 ret i32 0
3131 }
33 %struct.AVCodecTag = type {}
44 @ff_codec_bmp_tags = external global [0 x %struct.AVCodecTag]
55 @tags = global [1 x %struct.AVCodecTag*] [%struct.AVCodecTag* getelementptr
6 inbounds ([0 x %struct.AVCodecTag]* @ff_codec_bmp_tags, i32 0, i32 0)]
6 inbounds ([0 x %struct.AVCodecTag], [0 x %struct.AVCodecTag]* @ff_codec_bmp_tags, i32 0, i32 0)]
77
88
99 ; rdar://8878965
66
77 define fastcc void @gcov_read_words(i32 %words) {
88 entry:
9 store i32 %words, i32* getelementptr (%struct.__gcov_var*
9 store i32 %words, i32* getelementptr (%struct.__gcov_var, %struct.__gcov_var*
1010 @__gcov_var,
1111 i32 0, i32 0)
1212 ret void
99 entry:
1010 %Qux = alloca [33 x i8]
1111 %Qux1 = bitcast [33 x i8]* %Qux to i8*
12 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %Qux1, i8* getelementptr inbounds ([33 x i8]* @C.0.1173, i32 0, i32 0), i64 33, i32 8, i1 false)
12 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %Qux1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @C.0.1173, i32 0, i32 0), i64 33, i32 8, i1 false)
1313 ret void
1414 }
1515
99 define void @foo() {
1010 entry:
1111 %m = alloca i8, align 4
12 %0 = call i8* @llvm.ptr.annotation.p0i8(i8* %m, i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8]* @.str1, i32 0, i32 0), i32 2)
12 %0 = call i8* @llvm.ptr.annotation.p0i8(i8* %m, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str1, i32 0, i32 0), i32 2)
1313 store i8 1, i8* %0, align 4
1414 ret void
1515 }
1111 br i1 %cmp, label %if.then, label %if.end
1212
1313 if.then: ; preds = %entry
14 %0 = load i32, i32* getelementptr inbounds (%struct.struc* @foo, i32 0, i32 3), align 4
14 %0 = load i32, i32* getelementptr inbounds (%struct.struc, %struct.struc* @foo, i32 0, i32 3), align 4
1515 store i32 %0, i32* %ival, align 4
1616 br label %if.end
1717
2626 br i1 %cmp, label %if.then, label %if.end
2727
2828 if.then: ; preds = %entry
29 %0 = load i8, i8* getelementptr inbounds (%struct.struc* @foo, i32 0, i32 1), align 1
29 %0 = load i8, i8* getelementptr inbounds (%struct.struc, %struct.struc* @foo, i32 0, i32 1), align 1
3030 store i8 %0, i8* %ival, align 1
3131 br label %if.end
3232
4141 br i1 %cmp, label %if.then, label %if.end
4242
4343 if.then: ; preds = %entry
44 %0 = load i16, i16* getelementptr inbounds (%struct.struc* @foo, i32 0, i32 2), align 2
44 %0 = load i16, i16* getelementptr inbounds (%struct.struc, %struct.struc* @foo, i32 0, i32 2), align 2
4545 store i16 %0, i16* %ival, align 2
4646 br label %if.end
4747
1111 br i1 %cmp, label %if.then, label %if.end
1212
1313 if.then: ; preds = %entry
14 store i8 %ival, i8* getelementptr inbounds (%struct.struc* @foo, i32 0, i32 1), align 1
14 store i8 %ival, i8* getelementptr inbounds (%struct.struc, %struct.struc* @foo, i32 0, i32 1), align 1
1515 br label %if.end
1616
1717 if.end: ; preds = %if.then, %entry
2525 br i1 %cmp, label %if.then, label %if.end
2626
2727 if.then: ; preds = %entry
28 store i16 %ival, i16* getelementptr inbounds (%struct.struc* @foo, i32 0, i32 2), align 2
28 store i16 %ival, i16* getelementptr inbounds (%struct.struc, %struct.struc* @foo, i32 0, i32 2), align 2
2929 br label %if.end
3030
3131 if.end: ; preds = %if.then, %entry
77
88 define i16 @main() noreturn nounwind {
99 entry:
10 %0 = tail call i8* asm "", "=r,0"(i8* getelementptr inbounds ([10 x i8]* @buf, i16 0, i16 0)) nounwind ; [#uses=1]
10 %0 = tail call i8* asm "", "=r,0"(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @buf, i16 0, i16 0)) nounwind ; [#uses=1]
1111 %sub.ptr = getelementptr inbounds i8, i8* %0, i16 1 ; [#uses=1]
1212 %sub.ptr.lhs.cast = ptrtoint i8* %sub.ptr to i16 ; [#uses=1]
1313 %sub.ptr.sub = sub i16 %sub.ptr.lhs.cast, ptrtoint ([10 x i8]* @buf to i16) ; [#uses=1]
5151 @baz = common global %S zeroinitializer, align 1
5252
5353 define i16 @am6(i16 %x) nounwind {
54 %1 = load i16, i16* getelementptr (%S* @baz, i32 0, i32 1)
54 %1 = load i16, i16* getelementptr (%S, %S* @baz, i32 0, i32 1)
5555 %2 = or i16 %1,%x
5656 ret i16 %2
5757 }
5656 @baz = common global %S zeroinitializer
5757
5858 define void @am6(i16 %x) nounwind {
59 %1 = load i16, i16* getelementptr (%S* @baz, i32 0, i32 1)
59 %1 = load i16, i16* getelementptr (%S, %S* @baz, i32 0, i32 1)
6060 %2 = or i16 %x, %1
61 store i16 %2, i16* getelementptr (%S* @baz, i32 0, i32 1)
61 store i16 %2, i16* getelementptr (%S, %S* @baz, i32 0, i32 1)
6262 ret void
6363 }
6464 ; CHECK-LABEL: am6:
4646 @baz = common global %S zeroinitializer, align 1
4747
4848 define i16 @am6() nounwind {
49 %1 = load i16, i16* getelementptr (%S* @baz, i32 0, i32 1)
49 %1 = load i16, i16* getelementptr (%S, %S* @baz, i32 0, i32 1)
5050 ret i16 %1
5151 }
5252 ; CHECK-LABEL: am6:
4646 @baz = common global %S zeroinitializer, align 1
4747
4848 define void @am6(i16 %a) nounwind {
49 store i16 %a, i16* getelementptr (%S* @baz, i32 0, i32 1)
49 store i16 %a, i16* getelementptr (%S, %S* @baz, i32 0, i32 1)
5050 ret void
5151 }
5252 ; CHECK-LABEL: am6:
1414 @foo = global i16 0, align 2
1515
1616 define void @immmem() nounwind {
17 call void asm sideeffect "bic\09$0,r2", "i"(i16* getelementptr(i16* @foo, i32 1)) nounwind
17 call void asm sideeffect "bic\09$0,r2", "i"(i16* getelementptr(i16, i16* @foo, i32 1)) nounwind
1818 ret void
1919 }
2020
144144 store i16 %1, i16* %out0, align 2
145145 %2 = call i16 asm "foo $1,$0", "=r,X"(i16 1) nounwind
146146 store i16 %2, i16* %out0, align 2
147 %3 = call i16 asm "foo $1,$0", "=r,X"(i16* getelementptr inbounds ([2 x i16]* @marray, i32 0, i32 0)) nounwind
147 %3 = call i16 asm "foo $1,$0", "=r,X"(i16* getelementptr inbounds ([2 x i16], [2 x i16]* @marray, i32 0, i32 0)) nounwind
148148 store i16 %3, i16* %out0, align 2
149149 ; No lowering support.
150150 ; %4 = call i16 asm "foo $1,$0", "=r,X"(double 1.000000e+001) nounwind
158158 entry:
159159 %out0 = alloca i16, align 2
160160 store i16 0, i16* %out0, align 2
161 %0 = call i16 asm "foo $1,$0", "=r,r"(i16* getelementptr inbounds ([2 x i16]* @marray, i32 0, i32 0)) nounwind
161 %0 = call i16 asm "foo $1,$0", "=r,r"(i16* getelementptr inbounds ([2 x i16], [2 x i16]* @marray, i32 0, i32 0)) nounwind
162162 store i16 %0, i16* %out0, align 2
163163 ret void
164164 }
302302 store i16 %1, i16* %out0, align 2
303303 %2 = call i16 asm "foo $1,$0", "=r|r,r|X"(i16 1) nounwind
304304 store i16 %2, i16* %out0, align 2
305 %3 = call i16 asm "foo $1,$0", "=r|r,r|X"(i16* getelementptr inbounds ([2 x i16]* @marray, i32 0, i32 0)) nounwind
305 %3 = call i16 asm "foo $1,$0", "=r|r,r|X"(i16* getelementptr inbounds ([2 x i16], [2 x i16]* @marray, i32 0, i32 0)) nounwind
306306 store i16 %3, i16* %out0, align 2
307307 ; No lowering support.
308308 ; %4 = call i16 asm "foo $1,$0", "=r|r,r|X"(double 1.000000e+001) nounwind
316316 entry:
317317 %out0 = alloca i16, align 2
318318 store i16 0, i16* %out0, align 2
319 %0 = call i16 asm "foo $1,$0", "=r|r,r|r"(i16* getelementptr inbounds ([2 x i16]* @marray, i32 0, i32 0)) nounwind
320 store i16 %0, i16* %out0, align 2
321 ret void
322 }
319 %0 = call i16 asm "foo $1,$0", "=r|r,r|r"(i16* getelementptr inbounds ([2 x i16], [2 x i16]* @marray, i32 0, i32 0)) nounwind
320 store i16 %0, i16* %out0, align 2
321 ret void
322 }
77 ; CHECK: foo
88 ; CHECK: %hi(.str)
99 ; CHECK: %lo(.str)
10 ret i8* getelementptr ([10 x i8]* @.str, i32 0, i32 0)
10 ret i8* getelementptr ([10 x i8], [10 x i8]* @.str, i32 0, i32 0)
1111 }
1212
1313 define i32* @bar() nounwind {
1515 ; CHECK: bar
1616 ; CHECK: %hi(i0)
1717 ; CHECK: %lo(i0)