The Windows ARM64 runtime passes the establisher frame to funclets as the first argument. This change just copies x1 to fp in that case.
The test case depends on https://reviews.llvm.org/D53540, which lowers the localaddr intrinsic.
The casting/stripPointerCasts/hasPersonalityFn is unnecessary here, I think; llvm::classifyEHPersonality will do it for you.
Checking the personality here seems a little awkward, but I guess it works.
Clarify the comment. By looking at cl.exe generated code, it looks like only the frame pointer is passed in x1. The base pointer, if needed, is used directly (e.g. x19). I will verify with a more complicated test case.