[LLVM 10][Windows/MSVC] llvm.eh.sjlj.setjmp does not lower to _setjmp() call any more


In our project we use llvm.eh.sjlj.setjmp intrinsic to establish a
recovering chain which implies that it's 'longjmp' counterpart would
be called from a C code, so it uses a runtime implementation of
For LLVM 7 llvm.eh.sjlj.setjmp lowers to a call to Windows CRT
function _setjmp(). After migrating to LLVM 10 we've found that it's
no longer true.
Is it done intentionally? If yes, why? The doc for llvm.eh.sjlj.setjmp
says that this intrinsic is compatible with the GCC __builtin_setjmp
implementation, so why isn't it compatible with MSVC CRT (in case of
using MSVC CRT)?

The timeline appears to coincide with Windows EH support for ARM64:

I looked at the logs, but it’s not immediately obvious when the behavior changed. If you want to dig deeper, it would be straightforward to bisect this behavior change to a specific revision, and the commit message should be explanatory.