Created attachment 23288 [details] Program that will crash if compiled and run on aarch64-pc-windows-msvc The generated code for a funclet can have an add to sp in the epilogue for which there is no corresponding sub in the prologue. To trigger this case we must be generating a funclet and: 1) The function must make a call where arguments are passed on the stack (these are the extra bytes the epilog adds). 2) We must not be able to combine the stack adjustment into a single sub to sp when saving callee-save registers, which will happen if we have an aligned object or are using alloca. Attaching simple C++ repro. Bug exists in both LLVM9 and master.
See https://reviews.llvm.org/D77015