https://bugs.winehq.org/show_bug.cgi?id=38470
--- Comment #15 from André H. nerv@dawncrow.de --- (In reply to MY123 from comment #14)
There is a separate issue with LLVM -mcode-model=large because that also uses r12 for __chkstk calls, but that bug is not triggered by MSVC or the normal LLVM code model.
No, no problem. AJ optimized your code, and it doesn't use r12/ip anymore: https://source.winehq.org/git/wine.git/commitdiff/2b095beace7b457586bd33b3b1...
With you original version there wouldn't have been an issue either, you modified r12 in the function, llvm modifies r12 to call the function and can't expect it to be unchanged afterwards as it's a scratch register