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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 00:17:12 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();
----------------
nikic wrote:

If so, you can also drop the code at https://github.com/llvm/llvm-project/blob/d3e5f97569f0d058b4a58f5fab37e50f115e339d/llvm/include/llvm/CodeGen/TargetInstrInfo.h#L453-L455

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


More information about the llvm-commits mailing list