1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -arm-atomic-cfg-tidy=0 -O3 | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; rdar://7493908 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker; Make sure the result of the first dynamic_alloc isn't copied back to sp more 5*9880d681SAndroid Build Coastguard Worker; than once. We'll deal with poor codegen later. 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Workerdefine void @t() nounwind ssp { 8*9880d681SAndroid Build Coastguard Workerentry: 9*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t: 10*9880d681SAndroid Build Coastguard Worker %size = mul i32 8, 2 11*9880d681SAndroid Build Coastguard Worker; CHECK: sub.w r0, sp, #16 12*9880d681SAndroid Build Coastguard Worker; CHECK: mov sp, r0 13*9880d681SAndroid Build Coastguard Worker %vla_a = alloca i8, i32 %size, align 8 14*9880d681SAndroid Build Coastguard Worker; CHECK: sub.w r0, sp, #16 15*9880d681SAndroid Build Coastguard Worker; CHECK: mov sp, r0 16*9880d681SAndroid Build Coastguard Worker %vla_b = alloca i8, i32 %size, align 8 17*9880d681SAndroid Build Coastguard Worker unreachable 18*9880d681SAndroid Build Coastguard Worker} 19