[llvm] X86: Simplify the EH_LABEL Expand condition (PR #213130)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 21:46:27 PDT 2026


================
@@ -570,9 +570,9 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
   if (Subtarget.canUseCMPXCHG16B())
     setOperationAction(ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS, MVT::i128, Custom);
 
-  // FIXME - use subtarget debug flags
-  if (!Subtarget.isTargetDarwin() && !Subtarget.isTargetELF() &&
-      !Subtarget.isTargetCygMing() && !Subtarget.isTargetWin64() &&
+  // 32-bit Windows non-GNU EH (MSVC/Itanium SEH) does not use per-invoke
+  // EH labels, so expand them away. SjLj EH does use them.
----------------
rnk wrote:

```suggestion
  // 32-bit Windows non-GNU EH (MSVC/Itanium SEH) explicitly stores EH
  // state numbers, so we can expand away the labels. SjLj EH does use them.
```

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


More information about the llvm-commits mailing list