brintos

brintos / llvm-project-archived public Read only

0
0
Text · 905 B · e014d28 Raw
28 lines · plain
1; RUN: llc -O0 -mtriple thumbv7-windows-itanium -filetype asm -o - %s | FileCheck %s2; RUN: llc -O0 -mtriple thumbv7-windows-msvc -filetype asm -o - %s | FileCheck %s3; RUN: llc -O0 -mtriple thumbv7-windows-mingw32 -filetype asm -o - %s | FileCheck %s4 5declare arm_aapcs_vfpcc i32 @num_entries()6 7define arm_aapcs_vfpcc void @test___builtin_alloca() {8entry:9  %array = alloca ptr, align 410  %call = call arm_aapcs_vfpcc i32 @num_entries()11  %mul = mul i32 4, %call12  %0 = alloca i8, i32 %mul13  store ptr %0, ptr %array, align 414  ret void15}16 17; CHECK: bl num_entries18; Any register is actually valid here, but turns out we use lr,19; because we do not have the kill flag on R0.20; CHECK: mov [[R0:r[0-9]+]], r021; CHECK: movs [[R1:r[0-9]+]], #722; CHECK: add.w [[R2:r[0-9]+]], [[R1]], [[R0]], lsl #223; CHECK: bic [[R2]], [[R2]], #424; CHECK: lsrs r4, [[R2]], #225; CHECK: bl __chkstk26; CHECK: sub.w sp, sp, r427 28