From bf0737c0b86a36ccc5523582dea6979e020fb547 Mon Sep 17 00:00:00 2001
From: Cheng Shao <terrorjack@type.dance>
Date: Thu, 30 May 2024 14:01:41 +0000
Subject: [PATCH] compiler: remove ArchWasm32 special case in
 cmmDoCmmSwitchPlans

This patch removes special consideration for ArchWasm32 in
cmmDoCmmSwitchPlans, which means the compiler will now disable
cmmImplementSwitchPlans for wasm unreg backend, just like unreg
backend of other targets. We enabled it in the past to workaround some
compile-time panic in older versions of LLVM, but those panics are no
longer present, hence no need to keep this workaround.
---
 compiler/GHC/Driver/Config/Cmm.hs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/compiler/GHC/Driver/Config/Cmm.hs b/compiler/GHC/Driver/Config/Cmm.hs
index 0cee96e4c3b..382213bc4a1 100644
--- a/compiler/GHC/Driver/Config/Cmm.hs
+++ b/compiler/GHC/Driver/Config/Cmm.hs
@@ -22,7 +22,6 @@ initCmmConfig dflags = CmmConfig
   , cmmGenStackUnwindInstr = debugLevel dflags > 0
   , cmmExternalDynamicRefs = gopt Opt_ExternalDynamicRefs dflags
   , cmmDoCmmSwitchPlans    = not (backendHasNativeSwitch (backend dflags))
-                             || platformArch platform == ArchWasm32
   , cmmSplitProcPoints     = not (backendSupportsUnsplitProcPoints (backend dflags))
                              || not (platformTablesNextToCode platform)
                              || usingInconsistentPicReg
-- 
GitLab