brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 19fe9b8 Raw
63 lines · plain
1; RUN: llc -o - %s -mtriple=aarch64-windows | FileCheck %s2; Check that the stack bump around a funclet is computed correctly in both the3; prologue and epilogue in the case we have a MaxCallFrameSize > 0 and are doing alloca4target datalayout = "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128"5target triple = "aarch64-pc-windows-msvc19.25.28611"6 7; // requires passing arguments on the stack8; void test2(ptr, int, int, int, int, int, int, int, int);9;10; // function with the funclet being checked11; void test1(size_t bytes)12; {13;   // alloca forces a separate callee save bump and stack bump14;   ptr data = _alloca(bytes);15;   try {16;     test2(data, 0, 1, 2, 3, 4, 5, 6, 7);17;   } catch (...) {18;     // the funclet being checked19;   }20; }21 22; CHECK-LABEL: ?catch$2@?0??test1@@YAX_K@Z@4HA23; CHECK: sub sp, sp, #1624; CHECK: add sp, sp, #1625; Function Attrs: uwtable26define dso_local void @"?test1@@YAX_K@Z"(i64 %0) #0 personality ptr @__CxxFrameHandler3 {27  %2 = alloca i64, align 828  %3 = alloca ptr, align 829  store i64 %0, ptr %2, align 830  %4 = load i64, ptr %2, align 831  %5 = alloca i8, i64 %4, align 1632  store ptr %5, ptr %3, align 833  %6 = load ptr, ptr %3, align 834  invoke void @"?test2@@YAXPEAXHHHHHHHH@Z"(ptr %6, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7)35          to label %13 unwind label %736 377:                                                ; preds = %138  %8 = catchswitch within none [label %9] unwind to caller39 409:                                                ; preds = %741  %10 = catchpad within %8 [ptr null, i32 64, ptr null]42  catchret from %10 to label %1143 4411:                                               ; preds = %945  br label %1246 4712:                                               ; preds = %11, %1348  ret void49 5013:                                               ; preds = %151  br label %1252}53 54declare dso_local void @"?test2@@YAXPEAXHHHHHHHH@Z"(ptr, i32, i32, i32, i32, i32, i32, i32, i32) #155 56declare dso_local i32 @__CxxFrameHandler3(...)57 58attributes #0 = { uwtable }59 60!llvm.module.flags = !{!0}61 62!0 = !{i32 1, !"wchar_size", i32 2}63