diff --git a/compiler/GHC/Cmm/MachOp.hs b/compiler/GHC/Cmm/MachOp.hs
--- a/compiler/GHC/Cmm/MachOp.hs
+++ b/compiler/GHC/Cmm/MachOp.hs
@@ -7,7 +7,6 @@
     , pprMachOp, isCommutableMachOp, isAssociativeMachOp
     , isComparisonMachOp, maybeIntComparison, machOpResultType
     , machOpArgReps, maybeInvertComparison, isFloatComparison
-    , isCommutableCallishMachOp
 
     -- MachOp builders
     , mo_wordAdd, mo_wordSub, mo_wordEq, mo_wordNe,mo_wordMul, mo_wordSQuot
@@ -846,17 +845,3 @@
   MO_Memmove align -> Just align
   MO_Memcmp  align -> Just align
   _                -> Nothing
-
-isCommutableCallishMachOp :: CallishMachOp -> Bool
-isCommutableCallishMachOp op =
-  case op of
-    MO_x64_Add  -> True
-    MO_x64_Mul  -> True
-    MO_x64_Eq   -> True
-    MO_x64_Ne   -> True
-    MO_x64_And  -> True
-    MO_x64_Or   -> True
-    MO_x64_Xor  -> True
-    MO_S_Mul2 _ -> True
-    MO_U_Mul2 _ -> True
-    _ -> False
diff --git a/compiler/GHC/Driver/DynFlags.hs b/compiler/GHC/Driver/DynFlags.hs
--- a/compiler/GHC/Driver/DynFlags.hs
+++ b/compiler/GHC/Driver/DynFlags.hs
@@ -1290,6 +1290,8 @@
 --   RegsGraph suffers performance regression. See #7679
 --  , ([2],     Opt_StaticArgumentTransformation)
 --   Static Argument Transformation needs investigation. See #9374
+    , ([0,1,2], Opt_SpecEval)
+    , ([0,1,2], Opt_SpecEvalDictFun)
     ]
 
 
diff --git a/compiler/GHC/Driver/Flags.hs b/compiler/GHC/Driver/Flags.hs
--- a/compiler/GHC/Driver/Flags.hs
+++ b/compiler/GHC/Driver/Flags.hs
@@ -664,7 +664,10 @@
    | Opt_NumConstantFolding
    | Opt_CoreConstantFolding
    | Opt_FastPAPCalls                  -- #6084
+   | Opt_SpecEval
+   | Opt_SpecEvalDictFun   -- See Note [Controlling Speculative Evaluation]
 
+
    -- Inference flags
    | Opt_DoTagInferenceChecks
 
@@ -902,6 +905,8 @@
    , Opt_WorkerWrapper
    , Opt_WorkerWrapperUnlift
    , Opt_SolveConstantDicts
+   , Opt_SpecEval
+   , Opt_SpecEvalDictFun
    ]
 
 -- | The set of flags which affect code generation and can change a program's
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -2534,6 +2534,8 @@
   flagSpec "num-constant-folding"             Opt_NumConstantFolding,
   flagSpec "core-constant-folding"            Opt_CoreConstantFolding,
   flagSpec "fast-pap-calls"                   Opt_FastPAPCalls,
+  flagSpec "spec-eval"                        Opt_SpecEval,
+  flagSpec "spec-eval-dictfun"                Opt_SpecEvalDictFun,
   flagSpec "cmm-control-flow"                 Opt_CmmControlFlow,
   flagSpec "show-warning-groups"              Opt_ShowWarnGroups,
   flagSpec "hide-source-paths"                Opt_HideSourcePaths,
diff --git a/compiler/cbits/genSym.c b/compiler/cbits/genSym.c
--- a/compiler/cbits/genSym.c
+++ b/compiler/cbits/genSym.c
@@ -9,7 +9,7 @@
 //
 // The CPP is thus about the RTS version GHC is linked against, and not the
 // version of the GHC being built.
-#if !MIN_VERSION_GLASGOW_HASKELL(9,8,4,0)
+#if !MIN_VERSION_GLASGOW_HASKELL(9,9,0,0)
 HsWord64 ghc_unique_counter64 = 0;
 #endif
 #if !MIN_VERSION_GLASGOW_HASKELL(9,3,0,0)
diff --git a/compiler/ghc.cabal b/compiler/ghc.cabal
--- a/compiler/ghc.cabal
+++ b/compiler/ghc.cabal
@@ -3,7 +3,7 @@
 -- ./configure.  Make sure you are editing ghc.cabal.in, not ghc.cabal.
 
 Name: ghc
-Version: 9.12.1
+Version: 9.12.2
 License: BSD-3-Clause
 License-File: LICENSE
 Author: The GHC Team
@@ -130,16 +130,16 @@
                    exceptions == 0.10.*,
                    semaphore-compat,
                    stm,
-                   ghc-boot   == 9.12.1,
-                   ghc-heap   == 9.12.1,
-                   ghci == 9.12.1
+                   ghc-boot   == 9.12.2,
+                   ghc-heap   == 9.12.2,
+                   ghci == 9.12.2
 
     if flag(bootstrap)
       Build-Depends:
-        ghc-boot-th-next     == 9.12.1
+        ghc-boot-th-next     == 9.12.2
     else
       Build-Depends:
-        ghc-boot-th          == 9.12.1
+        ghc-boot-th          == 9.12.2
 
     if os(windows)
         Build-Depends: Win32  >= 2.3 && < 2.15
diff --git a/ghc-lib-parser.cabal b/ghc-lib-parser.cabal
--- a/ghc-lib-parser.cabal
+++ b/ghc-lib-parser.cabal
@@ -1,7 +1,7 @@
 cabal-version: 3.0
 build-type: Simple
 name: ghc-lib-parser
-version: 9.12.1.20250314
+version: 9.12.2.20250320
 license: BSD-3-Clause
 license-file: LICENSE
 category: Development
diff --git a/ghc-lib/stage0/compiler/build/GHC/Settings/Config.hs b/ghc-lib/stage0/compiler/build/GHC/Settings/Config.hs
--- a/ghc-lib/stage0/compiler/build/GHC/Settings/Config.hs
+++ b/ghc-lib/stage0/compiler/build/GHC/Settings/Config.hs
@@ -22,10 +22,10 @@
 cProjectName          = "The Glorious Glasgow Haskell Compilation System"
 
 cBooterVersion        :: String
-cBooterVersion        = "9.12.1"
+cBooterVersion        = "9.12.2"
 
 cStage                :: String
 cStage                = show (1 :: Int)
 
 cProjectUnitId :: String
-cProjectUnitId = "ghc-9.12.1-inplace"
+cProjectUnitId = "ghc-9.12.2-inplace"
diff --git a/ghc-lib/stage0/libraries/ghc-boot/build/GHC/Version.hs b/ghc-lib/stage0/libraries/ghc-boot/build/GHC/Version.hs
--- a/ghc-lib/stage0/libraries/ghc-boot/build/GHC/Version.hs
+++ b/ghc-lib/stage0/libraries/ghc-boot/build/GHC/Version.hs
@@ -3,19 +3,19 @@
 import Prelude -- See Note [Why do we import Prelude here?]
 
 cProjectGitCommitId   :: String
-cProjectGitCommitId   = "daf659b6e3c8f2a84100fbee797cd9d457c00df5"
+cProjectGitCommitId   = "383be28ffdddf65b57b7b111bfc89808b4229ebc"
 
 cProjectVersion       :: String
-cProjectVersion       = "9.12.1"
+cProjectVersion       = "9.12.2"
 
 cProjectVersionInt    :: String
 cProjectVersionInt    = "912"
 
 cProjectPatchLevel    :: String
-cProjectPatchLevel    = "1"
+cProjectPatchLevel    = "2"
 
 cProjectPatchLevel1   :: String
-cProjectPatchLevel1   = "1"
+cProjectPatchLevel1   = "2"
 
 cProjectPatchLevel2   :: String
 cProjectPatchLevel2   = "0"
diff --git a/ghc/ghc-bin.cabal b/ghc/ghc-bin.cabal
--- a/ghc/ghc-bin.cabal
+++ b/ghc/ghc-bin.cabal
@@ -2,7 +2,7 @@
 -- ./configure.  Make sure you are editing ghc-bin.cabal.in, not ghc-bin.cabal.
 
 Name: ghc-bin
-Version: 9.12.1
+Version: 9.12.2
 Copyright: XXX
 -- License: XXX
 -- License-File: XXX
@@ -39,8 +39,8 @@
                    filepath   >= 1.5 && < 1.6,
                    containers >= 0.5 && < 0.8,
                    transformers >= 0.5 && < 0.7,
-                   ghc-boot      == 9.12.1,
-                   ghc           == 9.12.1
+                   ghc-boot      == 9.12.2,
+                   ghc           == 9.12.2
 
     if os(windows)
         Build-Depends: Win32  >= 2.3 && < 2.15
@@ -58,7 +58,7 @@
         Build-depends:
             deepseq        >= 1.4 && < 1.6,
             ghc-prim       >= 0.5.0 && < 0.14,
-            ghci           == 9.12.1,
+            ghci           == 9.12.2,
             haskeline      == 0.8.*,
             exceptions     == 0.10.*,
             time           >= 1.8 && < 1.15
diff --git a/libraries/ghc-boot-th/ghc-boot-th.cabal b/libraries/ghc-boot-th/ghc-boot-th.cabal
--- a/libraries/ghc-boot-th/ghc-boot-th.cabal
+++ b/libraries/ghc-boot-th/ghc-boot-th.cabal
@@ -3,7 +3,7 @@
 -- ghc-boot-th.cabal.in, not ghc-boot-th.cabal.
 
 name:           ghc-boot-th
-version:        9.12.1
+version:        9.12.2
 license:        BSD3
 license-file:   LICENSE
 category:       GHC
diff --git a/libraries/ghc-boot/ghc-boot.cabal b/libraries/ghc-boot/ghc-boot.cabal
--- a/libraries/ghc-boot/ghc-boot.cabal
+++ b/libraries/ghc-boot/ghc-boot.cabal
@@ -5,7 +5,7 @@
 -- ghc-boot.cabal.
 
 name:           ghc-boot
-version:        9.12.1
+version:        9.12.2
 license:        BSD-3-Clause
 license-file:   LICENSE
 category:       GHC
@@ -94,10 +94,10 @@
 
     if flag(bootstrap)
       build-depends:
-              ghc-boot-th-next    == 9.12.1
+              ghc-boot-th-next    == 9.12.2
     else
       build-depends:
-              ghc-boot-th         == 9.12.1
+              ghc-boot-th         == 9.12.2
 
     if !os(windows)
         build-depends:
diff --git a/libraries/ghc-heap/ghc-heap.cabal b/libraries/ghc-heap/ghc-heap.cabal
--- a/libraries/ghc-heap/ghc-heap.cabal
+++ b/libraries/ghc-heap/ghc-heap.cabal
@@ -1,6 +1,6 @@
 cabal-version:  3.0
 name:           ghc-heap
-version:        9.12.1
+version:        9.12.2
 license:        BSD-3-Clause
 license-file:   LICENSE
 maintainer:     libraries@haskell.org
@@ -28,7 +28,7 @@
                   , containers       >= 0.6.2.1 && < 0.8
 
   if impl(ghc >= 9.9)
-    build-depends:  ghc-internal     >= 9.900 && < 9.1201.99999
+    build-depends:  ghc-internal     >= 9.900 && < 9.1202.99999
 
   ghc-options:      -Wall
   if !os(ghcjs)
diff --git a/libraries/ghci/GHCi/Message.hs b/libraries/ghci/GHCi/Message.hs
--- a/libraries/ghci/GHCi/Message.hs
+++ b/libraries/ghci/GHCi/Message.hs
@@ -503,7 +503,7 @@
 #define MIN_VERSION_ghc_heap(major1,major2,minor) (\
   (major1) <  9 || \
   (major1) == 9 && (major2) <  12 || \
-  (major1) == 9 && (major2) == 12 && (minor) <= 1)
+  (major1) == 9 && (major2) == 12 && (minor) <= 2)
 #endif /* MIN_VERSION_ghc_heap */
 #if MIN_VERSION_ghc_heap(8,11,0)
 instance Binary Heap.StgTSOProfInfo
diff --git a/libraries/ghci/ghci.cabal b/libraries/ghci/ghci.cabal
--- a/libraries/ghci/ghci.cabal
+++ b/libraries/ghci/ghci.cabal
@@ -2,7 +2,7 @@
 -- ../../configure.  Make sure you are editing ghci.cabal.in, not ghci.cabal.
 
 name:           ghci
-version:        9.12.1
+version:        9.12.2
 license:        BSD3
 license-file:   LICENSE
 category:       GHC
@@ -85,7 +85,7 @@
         rts,
         array            == 0.5.*,
         base             >= 4.8 && < 4.22,
-        -- ghc-internal     == 9.1201.*
+        -- ghc-internal     == 9.1202.*
         -- TODO: Use GHC.Internal.Desugar and GHC.Internal.Base from
         -- ghc-internal instead of ignoring the deprecation warning in GHCi.TH
         -- and GHCi.CreateBCO when we require ghc-internal of the bootstrap
@@ -96,19 +96,19 @@
         containers       >= 0.5 && < 0.8,
         deepseq          >= 1.4 && < 1.6,
         filepath         >= 1.4 && < 1.6,
-        ghc-boot         == 9.12.1,
-        ghc-heap         == 9.12.1,
+        ghc-boot         == 9.12.2,
+        ghc-heap         == 9.12.2,
         transformers     >= 0.5 && < 0.7
 
     if flag(bootstrap)
       build-depends:
-            ghc-boot-th-next  == 9.12.1
+            ghc-boot-th-next  == 9.12.2
     else
       build-depends:
-            ghc-boot-th       == 9.12.1
+            ghc-boot-th       == 9.12.2
 
     if !os(windows)
         Build-Depends: unix >= 2.7 && < 2.9
 
     if arch(wasm32)
-        build-depends: ghc-experimental == 9.1201.0
+        build-depends: ghc-experimental == 9.1202.0
diff --git a/libraries/template-haskell/template-haskell.cabal b/libraries/template-haskell/template-haskell.cabal
--- a/libraries/template-haskell/template-haskell.cabal
+++ b/libraries/template-haskell/template-haskell.cabal
@@ -53,7 +53,7 @@
 
     build-depends:
         base        >= 4.11 && < 4.22,
-        ghc-boot-th == 9.12.1
+        ghc-boot-th == 9.12.2
 
     build-depends:
       filepath
