From 5338ff59be500dac1a97a5406a4f4fc6d17d9f68 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.

(cherry picked from commit bf0737c0b86a36ccc5523582dea6979e020fb547)
(cherry picked from commit 8bd28cf28cd1628d04e50b8f16956f7db20dc797)
(cherry picked from commit 2e15c41c8457452c04e488fec6e2a5bb1091027e)
---
 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 e130385cb0c..73cab8da696 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