1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 -relocation-model=pic -disable-fp-elim -mcpu=cortex-a8 | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; Do not form Thumb2 ldrd / strd if the offset is not multiple of 4. 4*9880d681SAndroid Build Coastguard Worker; rdar://9133587 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker%struct.Outer = type { i32, [2 x %"struct.Outer::Inner"] } 7*9880d681SAndroid Build Coastguard Worker%"struct.Outer::Inner" = type { i32, i32, i8, i8 } 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker@oStruct = external global %struct.Outer, align 4 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Workerdefine void @main(i8 %val8) nounwind { 12*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: main: 13*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: ldrd 14*9880d681SAndroid Build Coastguard Worker; CHECK: mul 15*9880d681SAndroid Build Coastguard Workerfor.body.lr.ph: 16*9880d681SAndroid Build Coastguard Worker br label %for.body 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Workerfor.body: ; preds = %_Z14printIsNotZeroi.exit17.for.body_crit_edge, %for.body.lr.ph 19*9880d681SAndroid Build Coastguard Worker %tmp3 = phi i1 [ false, %for.body.lr.ph ], [ %phitmp27, %_Z14printIsNotZeroi.exit17.for.body_crit_edge ] 20*9880d681SAndroid Build Coastguard Worker %i.022 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %_Z14printIsNotZeroi.exit17.for.body_crit_edge ] 21*9880d681SAndroid Build Coastguard Worker %x = getelementptr %struct.Outer, %struct.Outer* @oStruct, i32 0, i32 1, i32 %i.022, i32 0 22*9880d681SAndroid Build Coastguard Worker %y = getelementptr %struct.Outer, %struct.Outer* @oStruct, i32 0, i32 1, i32 %i.022, i32 1 23*9880d681SAndroid Build Coastguard Worker %inc = add i32 %i.022, 1 24*9880d681SAndroid Build Coastguard Worker %tmp8 = load i32, i32* %x, align 4 25*9880d681SAndroid Build Coastguard Worker %tmp11 = load i32, i32* %y, align 4 26*9880d681SAndroid Build Coastguard Worker %mul = mul nsw i32 %tmp11, %tmp8 27*9880d681SAndroid Build Coastguard Worker %tobool.i14 = icmp eq i32 %mul, 0 28*9880d681SAndroid Build Coastguard Worker br i1 %tobool.i14, label %_Z14printIsNotZeroi.exit17, label %if.then.i16 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard Workerif.then.i16: ; preds = %_Z14printIsNotZeroi.exit 31*9880d681SAndroid Build Coastguard Worker ret void 32*9880d681SAndroid Build Coastguard Worker 33*9880d681SAndroid Build Coastguard Worker_Z14printIsNotZeroi.exit17: ; preds = %_Z14printIsNotZeroi.exit 34*9880d681SAndroid Build Coastguard Worker br label %_Z14printIsNotZeroi.exit17.for.body_crit_edge 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Worker_Z14printIsNotZeroi.exit17.for.body_crit_edge: ; preds = %_Z14printIsNotZeroi.exit17 37*9880d681SAndroid Build Coastguard Worker %b.phi.trans.insert = getelementptr %struct.Outer, %struct.Outer* @oStruct, i32 0, i32 1, i32 %inc, i32 3 38*9880d681SAndroid Build Coastguard Worker %tmp3.pre = load i8, i8* %b.phi.trans.insert, align 1 39*9880d681SAndroid Build Coastguard Worker %phitmp27 = icmp eq i8 %val8, 0 40*9880d681SAndroid Build Coastguard Worker br label %for.body 41*9880d681SAndroid Build Coastguard Worker 42*9880d681SAndroid Build Coastguard Workerfor.end: ; preds = %_Z14printIsNotZeroi.exit17 43*9880d681SAndroid Build Coastguard Worker ret void 44*9880d681SAndroid Build Coastguard Worker} 45