[PATCH] D131578: [AArch64][SME] Implement ABI for calls from streaming-compatible functions.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 08:07:35 PDT 2022


sdesmalen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:2345-2352
+  // In the case of a smstart/smstop before a unreachable,
+  // just remove the pseudo.
+  if (std::next(MI.getIterator()) == OrigBB->end() &&
+      MI.getParent()->successors().begin() ==
+      MI.getParent()->successors().end()) {
+    MI.eraseFromParent();
+    return OrigBB;
----------------
aemerson wrote:
> Not a big deal, but this seems like an odd optimization to do. One would think that this would be infrequent enough that we wouldn't need to add special handling for it, and if it's not infrequent, why?
The code later expects that the block can be split at `MI` and that the block has successors. It will fail if we don't bail out early.

We encountered this case around exception handling code generated by Clang.


================
Comment at: llvm/test/CodeGen/AArch64/sme-streaming-compatible-interface.ll:255
+
+declare void @normal_callee_scalable_vec_arg(<vscale x 2 x i64>)
+
----------------
shruthiashwath wrote:
> For the function 'normal_callee_scalable_vec_arg', the declaration and the call both have different types.  
Good catch!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131578



More information about the llvm-commits mailing list