diff options
author | Cheng Shao <astrohavoc@gmail.com> | 2022-10-24 13:11:29 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-11 00:26:55 -0500 |
commit | 06f01c747551954e37108b714950f1fca8b6cd66 (patch) | |
tree | 24e7d1f58b9d53a2b3305cfed702e856ff327f18 | |
parent | 177c56c1841f6ade0677730d7ab4fb1cd3936f52 (diff) | |
download | haskell-06f01c747551954e37108b714950f1fca8b6cd66.tar.gz |
compiler: allow big arith for wasm32
This patch enables Cmm big arithmetic on wasm32, since 64-bit
arithmetic can be efficiently lowered to wasm32 opcodes.
-rw-r--r-- | compiler/GHC/Driver/Config/StgToCmm.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Config/StgToCmm.hs b/compiler/GHC/Driver/Config/StgToCmm.hs index fab7b213e3..c7f716bbfc 100644 --- a/compiler/GHC/Driver/Config/StgToCmm.hs +++ b/compiler/GHC/Driver/Config/StgToCmm.hs @@ -46,7 +46,7 @@ initStgToCmmConfig dflags mod = StgToCmmConfig , stgToCmmDoBoundsCheck = gopt Opt_DoBoundsChecking dflags , stgToCmmDoTagCheck = gopt Opt_DoTagInferenceChecks dflags -- backend flags - , stgToCmmAllowBigArith = not ncg + , stgToCmmAllowBigArith = not ncg || platformArch platform == ArchWasm32 , stgToCmmAllowQuotRemInstr = ncg && (x86ish || ppc) , stgToCmmAllowQuotRem2 = (ncg && (x86ish || ppc)) || llvm , stgToCmmAllowExtendedAddSubInstrs = (ncg && (x86ish || ppc)) || llvm |