25 lines · plain
1; This test should cause the TargetMaterializeAlloca to be invoked2; RUN: llc -O0 -fast-isel -fast-isel-abort=1 -verify-machineinstrs -mtriple=arm64-apple-darwin -frame-pointer=all < %s | FileCheck %s3 4%struct.S1Ty = type { i64 }5%struct.S2Ty = type { %struct.S1Ty, %struct.S1Ty }6 7define void @takeS1(ptr %V) nounwind {8entry:9 %V.addr = alloca ptr, align 810 store ptr %V, ptr %V.addr, align 811 ret void12}13 14define void @main() nounwind {15entry:16; CHECK: main17; CHECK: add x29, sp, #1618; CHECK: mov [[REG:x[0-9]+]], sp19; CHECK-NEXT: add x0, [[REG]], #820 %E = alloca %struct.S2Ty, align 421 %B = getelementptr inbounds %struct.S2Ty, ptr %E, i32 0, i32 122 call void @takeS1(ptr %B)23 ret void24}25