[OpenMP] Fix issue of indirect function call in `__kmpc_fork_call_if` (#65436)
The outlined function is typically invoked by using `__kmp_invoke_microtask`, which is written in asm. D138495 introduces a new interface function for parallel region for OpenMPIRBuilder, where the outlined function is called via the function pointer. For some reason, it works perfectly well on x86 and x86-64 system, but doesn't work on Apple Silicon. The 3rd argument in the callee is always `nullptr`, even if it is not in caller. It appears `x2` always contains `0x0`. This patch adopts the typical method to invoke the function pointer. It works on my M2 Ultra Mac. Fix #63194.
Loading
Please sign in to comment