[llvm] [AArch64] Count the async-EH nop that follows an EH_LABEL (PR #219275)

Jonas Heinle via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 05:26:08 PDT 2026


================
@@ -2093,7 +2093,10 @@ void AsmPrinter::emitFunctionBody() {
   // Print out code for the function.
   bool HasAnyRealCode = false;
   int NumInstsInFunction = 0;
-  bool IsEHa = MMI->getModule()->getModuleFlag("eh-asynch");
+  // The AArch64 unwinder backs the PC up over a call itself, so it does not
+  // need the padding the EH_LABEL case below emits for the other targets.
+  bool NeedsEHaNops = MMI->getModule()->getModuleFlag("eh-asynch") &&
+                      !TM.getTargetTriple().isAArch64();
----------------
Kataglyphis wrote:

Hi @nikic ,
Thanks for your comments — they all make sense to me. I'll update the PR accordingly later in the day..

https://github.com/llvm/llvm-project/pull/219275


More information about the llvm-commits mailing list