blob: c447a1f25b656063a0711b436666430d40036b9e [file] [log] [blame]
Evan Chengadb9c032011-03-11 00:48:56 +00001; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 -relocation-model=pic -disable-fp-elim -mcpu=cortex-a8
2
3; rdar://9117613
4
5%struct.mo = type { i32, %struct.mo_pops* }
6%struct.mo_pops = type { void (%struct.mo*)*, void (%struct.mo*)*, i32 (%struct.mo*, i32*, i32)*, i32 (%struct.mo*)*, i32 (%struct.mo*, i64, i32, i32, i32*, i64, i32)*, i32 (%struct.mo*, i64, i32, i64*, i32*, i32, i32, i32)*, i32 (%struct.mo*, i64, i32)*, i32 (%struct.mo*, i64, i64, i32)*, i32 (%struct.mo*, i64, i64, i32)*, i32 (%struct.mo*, i32)*, i32 (%struct.mo*)*, i32 (%struct.mo*, i32)*, i8* }
7%struct.ui = type { %struct.mo*, i32*, i32, i32*, i32*, i64, i32*, i32*, i32* }
8
9
10define internal fastcc i32 @t(i32* %vp, i32 %withfsize, i64 %filesize) nounwind {
11entry:
12 br i1 undef, label %bb1, label %bb
13
14bb: ; preds = %entry
15 unreachable
16
17bb1: ; preds = %entry
18 %0 = call %struct.ui* @vn_pp_to_ui(i32* undef) nounwind
Pete Cooper67cf9a72015-11-19 05:56:52 +000019 call void @llvm.memset.p0i8.i32(i8* undef, i8 0, i32 40, i32 4, i1 false)
David Blaikie79e6c742015-02-27 19:29:02 +000020 %1 = getelementptr inbounds %struct.ui, %struct.ui* %0, i32 0, i32 0
Evan Chengadb9c032011-03-11 00:48:56 +000021 store %struct.mo* undef, %struct.mo** %1, align 4
David Blaikie79e6c742015-02-27 19:29:02 +000022 %2 = getelementptr inbounds %struct.ui, %struct.ui* %0, i32 0, i32 5
David Blaikiea79ac142015-02-27 21:17:42 +000023 %3 = load i64, i64* %2, align 4
Evan Chengadb9c032011-03-11 00:48:56 +000024 %4 = call i32 @mo_create_nnm(%struct.mo* undef, i64 %3, i32** undef) nounwind
25 br i1 undef, label %bb3, label %bb2
26
27bb2: ; preds = %bb1
28 unreachable
29
30bb3: ; preds = %bb1
31 br i1 undef, label %bb4, label %bb6
32
33bb4: ; preds = %bb3
34 %5 = call i32 @vn_size(i32* %vp, i64* %2, i32* undef) nounwind
35 unreachable
36
37bb6: ; preds = %bb3
38 ret i32 0
39}
40
41declare %struct.ui* @vn_pp_to_ui(i32*)
42
Pete Cooper67cf9a72015-11-19 05:56:52 +000043declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
Evan Chengadb9c032011-03-11 00:48:56 +000044
45declare i32 @mo_create_nnm(%struct.mo*, i64, i32**)
46
47declare i32 @vn_size(i32*, i64*, i32*)