1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 -relocation-model=pic -disable-fp-elim -mcpu=cortex-a8 | FileCheck %s
3 ; Do not form Thumb2 ldrd / strd if the offset is not multiple of 4.
6 %struct.Outer = type { i32, [2 x %"struct.Outer::Inner"] }
7 %"struct.Outer::Inner" = type { i32, i32, i8, i8 }
9 @oStruct = external global %struct.Outer, align 4
11 define void @main() nounwind {
18 for.body: ; preds = %_Z14printIsNotZeroi.exit17.for.body_crit_edge, %for.body.lr.ph
19 %tmp3 = phi i1 [ false, %for.body.lr.ph ], [ %phitmp27, %_Z14printIsNotZeroi.exit17.for.body_crit_edge ]
20 %i.022 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %_Z14printIsNotZeroi.exit17.for.body_crit_edge ]
21 %x = getelementptr %struct.Outer* @oStruct, i32 0, i32 1, i32 %i.022, i32 0
22 %y = getelementptr %struct.Outer* @oStruct, i32 0, i32 1, i32 %i.022, i32 1
23 %inc = add i32 %i.022, 1
24 br i1 %tmp3, label %_Z14printIsNotZeroi.exit, label %if.then.i
26 if.then.i: ; preds = %for.body
29 _Z14printIsNotZeroi.exit: ; preds = %for.body
30 %tmp8 = load i32* %x, align 4, !tbaa !0
31 %tmp11 = load i32* %y, align 4, !tbaa !0
32 %mul = mul nsw i32 %tmp11, %tmp8
33 %tobool.i14 = icmp eq i32 %mul, 0
34 br i1 %tobool.i14, label %_Z14printIsNotZeroi.exit17, label %if.then.i16
36 if.then.i16: ; preds = %_Z14printIsNotZeroi.exit
39 _Z14printIsNotZeroi.exit17: ; preds = %_Z14printIsNotZeroi.exit
40 br i1 undef, label %_Z14printIsNotZeroi.exit17.for.body_crit_edge, label %for.end
42 _Z14printIsNotZeroi.exit17.for.body_crit_edge: ; preds = %_Z14printIsNotZeroi.exit17
43 %b.phi.trans.insert = getelementptr %struct.Outer* @oStruct, i32 0, i32 1, i32 %inc, i32 3
44 %tmp3.pre = load i8* %b.phi.trans.insert, align 1, !tbaa !3
45 %phitmp27 = icmp eq i8 undef, 0
48 for.end: ; preds = %_Z14printIsNotZeroi.exit17
52 !0 = metadata !{metadata !"int", metadata !1}
53 !1 = metadata !{metadata !"omnipotent char", metadata !2}
54 !2 = metadata !{metadata !"Simple C/C++ TBAA", null}
55 !3 = metadata !{metadata !"bool", metadata !1}