46 lines · plain
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 %s4 5; Same as the dynamic-alloca-lifetime.ll X86 test, which was used to fix a bug6; in stack colouring + lifetime markers.7 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 incorrect10; lifetimes being applied to the stack protector frame index.11 12; CHECK: stack_chk_guard13; CHECK-NOT: remark{{.*}}foo14 15; Function Attrs: nounwind16declare void @llvm.lifetime.start.p0(i64, ptr nocapture) #017 18; Function Attrs: nounwind19declare void @llvm.lifetime.end.p0(i64, ptr nocapture) #020 21; Function Attrs: ssp22define void @foo(i1 %cond1, i1 %cond2) #1 {23entry:24 %bitmapBuffer = alloca [8192 x i8], align 125 br i1 %cond1, label %end1, label %bb126 27bb1:28 %bitmapBuffer229 = alloca [8192 x i8], align 129 br i1 %cond2, label %end1, label %if.else13030 31end1:32 ret void33 34if.else130: ; preds = %bb135 call void @llvm.lifetime.start.p0(i64 8192, ptr %bitmapBuffer) #036 call void @llvm.lifetime.end.p0(i64 8192, ptr %bitmapBuffer) #037 call void @llvm.lifetime.start.p0(i64 8192, ptr %bitmapBuffer229) #038 call void @llvm.lifetime.end.p0(i64 8192, ptr %bitmapBuffer229) #039 br label %end140}41 42declare void @bar()43 44attributes #0 = { nounwind }45attributes #1 = { ssp }46