summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/GHC/Core/Opt/ConstantFold.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Opt/ConstantFold.hs b/compiler/GHC/Core/Opt/ConstantFold.hs
index 8a22124779..dbbb36b8e6 100644
--- a/compiler/GHC/Core/Opt/ConstantFold.hs
+++ b/compiler/GHC/Core/Opt/ConstantFold.hs
@@ -2244,7 +2244,7 @@ builtinBignumRules =
-- We use a host Int to compute the popCount. If we compile on a 32-bit
-- host for a 64-bit target, the result may be different than if computed
-- by the target. So we disable this rule if sizes don't match.
- guard (platformWordSizeInBits platform == finiteBitSize (0 :: Word))
+ guard (platformWordSizeInBits platform <= finiteBitSize (0 :: Word))
[a0] <- getArgs
x <- isBignumLiteral a0
pure $ Lit (mk_lit platform (fromIntegral (popCount x)))