[llvm] [MC] [Win64EH] Clarify the Windows versions with bugs that are avoided (PR #169784)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 27 02:02:28 PST 2025


https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/169784

Clarify that the issue that is being worked around by 924defada9bc0e3c89b0c0e288d7cb4dd654e7d4 (discussed in https://github.com/llvm/llvm-project/issues/54879) is fixed in the latest versions, and reference versions that still have the bug present.

As long as we can't be sure the generated code won't run on older versions, the workaround still stands though (and it is unlikely that we'd ever really hit this case in practice - so there's not much gain to be had by removing the workaround).

>From 50aa5ae8425d173a1e1168990730f98a236b1829 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
Date: Thu, 27 Nov 2025 11:58:50 +0200
Subject: [PATCH] [MC] [Win64EH] Clarify the Windows versions with bugs that
 are avoided

Clarify that the issue that is being worked around by
924defada9bc0e3c89b0c0e288d7cb4dd654e7d4 (discussed in
https://github.com/llvm/llvm-project/issues/54879) is fixed in the
latest versions, and reference versions that still have the bug
present.

As long as we can't be sure the generated code won't run on older
versions, the workaround still stands though (and it is unlikely
that we'd ever really hit this case in practice - so there's not
much gain to be had by removing the workaround).
---
 llvm/lib/MC/MCWin64EH.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/llvm/lib/MC/MCWin64EH.cpp b/llvm/lib/MC/MCWin64EH.cpp
index 6d146f6cedd6e..ca457c0db8b8e 100644
--- a/llvm/lib/MC/MCWin64EH.cpp
+++ b/llvm/lib/MC/MCWin64EH.cpp
@@ -1260,6 +1260,8 @@ static bool tryARM64PackedUnwind(WinEH::FrameInfo *info, uint32_t FuncLength,
   // RtlVirtualUnwind behaves as if it does expect the epilogue to contain
   // the same nops. See https://github.com/llvm/llvm-project/issues/54879.
   // To play it safe, don't produce packed unwind info with homed parameters.
+  // This seems to be fixed in 10.0.26100.6899, but was still broken at least
+  // in 10.0.22000.2176.
   if (H)
     return false;
   int IntSZ = 8 * RegI;



More information about the llvm-commits mailing list