1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 -relocation-model=pic -frame-pointer=all -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(i8 %val8) 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, ptr @oStruct, i32 0, i32 1, i32 %i.022, i32 0
22 %y = getelementptr %struct.Outer, ptr @oStruct, i32 0, i32 1, i32 %i.022, i32 1
23 %inc = add i32 %i.022, 1
24 %tmp8 = load i32, ptr %x, align 4
25 %tmp11 = load i32, ptr %y, align 4
26 %mul = mul nsw i32 %tmp11, %tmp8
27 %tobool.i14 = icmp eq i32 %mul, 0
28 br i1 %tobool.i14, label %_Z14printIsNotZeroi.exit17, label %if.then.i16
30 if.then.i16: ; preds = %_Z14printIsNotZeroi.exit
33 _Z14printIsNotZeroi.exit17: ; preds = %_Z14printIsNotZeroi.exit
34 br label %_Z14printIsNotZeroi.exit17.for.body_crit_edge
36 _Z14printIsNotZeroi.exit17.for.body_crit_edge: ; preds = %_Z14printIsNotZeroi.exit17
37 %b.phi.trans.insert = getelementptr %struct.Outer, ptr @oStruct, i32 0, i32 1, i32 %inc, i32 3
38 %tmp3.pre = load i8, ptr %b.phi.trans.insert, align 1
39 %phitmp27 = icmp eq i8 %val8, 0
42 for.end: ; preds = %_Z14printIsNotZeroi.exit17