1 ; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s
5 %struct.s1 = type { %ptr, %ptr }
6 %struct.s2 = type { i32, i8*, i8*, [256 x %struct.s1*], [8 x i32], i64, i8*, i32, i64, i64, i32, %struct.s3*, %struct.s3*, [49 x i64] }
7 %struct.s3 = type { %struct.s3*, %struct.s3*, i32, i32, i32 }
9 define fastcc i8* @t(i32 %base) nounwind {
12 ; CHECK: leaq (%rax,%rax,4)
13 %0 = zext i32 %base to i64
14 %1 = getelementptr inbounds %struct.s2* null, i64 %0
15 br i1 undef, label %bb1, label %bb2
22 %2 = getelementptr inbounds %struct.s2* null, i64 %0, i32 0
23 call void @bar(i32* %2) nounwind
30 %3 = call fastcc i8* @foo(%struct.s2* %1) nounwind
37 declare void @bar(i32*)
39 declare fastcc i8* @foo(%struct.s2*) nounwind
43 declare void @printf(...) nounwind
45 define void @commute(i32 %test_case, i32 %scale) nounwind ssp {
48 switch i32 %test_case, label %sw.bb307 [
54 sw.bb: ; preds = %entry, %entry, %entry
55 %mul = mul nsw i32 %test_case, 3
56 %mul20 = mul nsw i32 %mul, %scale
57 br i1 undef, label %if.end34, label %sw.bb307
59 if.end34: ; preds = %sw.bb
64 tail call void (...)* @printf(i32 %test_case, i32 %mul20) nounwind
65 %tmp = mul i32 %scale, %test_case
66 %tmp752 = mul i32 %tmp, 3
67 %tmp753 = zext i32 %tmp752 to i64
68 br label %bb.nph743.us
70 for.body53.us: ; preds = %bb.nph743.us, %for.body53.us
71 %exitcond = icmp eq i64 undef, %tmp753
72 br i1 %exitcond, label %bb.nph743.us, label %for.body53.us
74 bb.nph743.us: ; preds = %for.body53.us, %if.end34
75 br label %for.body53.us
77 sw.bb307: ; preds = %sw.bb, %entry