[Openmp-commits] [PATCH] D138495: [openmp][mlir] Lower parallel if to new fork_call_if function.

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Sep 5 19:29:58 PDT 2023


tianshilei1992 added inline comments.


================
Comment at: openmp/runtime/src/kmp_csupport.cpp:356
+    if (args)
+      microtask(&gtid, &zero, args);
+    else
----------------
tianshilei1992 wrote:
> This doesn't work on ARM64. The last argument is not pushed to stack but it is accessed in the callee.
> ```
>     0x10021a84c <+188>: 0x910053e0   add    x0, sp, #0x14
>     0x10021a850 <+192>: 0x910043e1   add    x1, sp, #0x10
>     0x10021a854 <+196>: 0xd63f0100   blr    x8
> ->  0x10021a858 <+200>: 0x14000006   b      0x10021a870               ; <+224> at kmp_csupport.cpp:360:36
> ```
> `x2` is supposed to contain the last argument, but for some reason it is not pushed. I'm looking at this right now. This one breaks tests on Apple Silicone.
Sorry, not "pushed to stack". It should be store to `x2`, based on ARM64 calling convention.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138495/new/

https://reviews.llvm.org/D138495



More information about the Openmp-commits mailing list