1 ; RUN: llc -mtriple aarch64-unknown-unknown -global-isel \
2 ; RUN: -no-stack-coloring=false -pass-remarks-missed=gisel* < %s \
3 ; RUN: 2>&1 | FileCheck %s
5 ; Same as the dynamic-alloca-lifetime.ll X86 test, which was used to fix a bug
6 ; in stack colouring + lifetime markers.
8 ; This test crashed in PEI because the stack protector was dead.
9 ; This was due to it being colored, which was in turn due to incorrect
10 ; lifetimes being applied to the stack protector frame index.
12 ; CHECK: stack_chk_guard
13 ; CHECK-NOT: remark{{.*}}foo
15 ; Function Attrs: nounwind
16 declare void @llvm.lifetime.start.p0(i64, ptr nocapture) #0
18 ; Function Attrs: nounwind
19 declare void @llvm.lifetime.end.p0(i64, ptr nocapture) #0
22 define void @foo(i1 %cond1, i1 %cond2) #1 {
24 %bitmapBuffer = alloca [8192 x i8], align 1
25 br i1 %cond1, label %end1, label %bb1
28 %bitmapBuffer229 = alloca [8192 x i8], align 1
29 br i1 %cond2, label %end1, label %if.else130
34 if.else130: ; preds = %bb1
35 call void @llvm.lifetime.start.p0(i64 8192, ptr %bitmapBuffer) #0
36 call void @llvm.lifetime.end.p0(i64 8192, ptr %bitmapBuffer) #0
37 call void @llvm.lifetime.start.p0(i64 8192, ptr %bitmapBuffer229) #0
38 call void @llvm.lifetime.end.p0(i64 8192, ptr %bitmapBuffer229) #0
44 attributes #0 = { nounwind }
45 attributes #1 = { ssp }