summaryrefslogtreecommitdiff
path: root/libraries/ghc-bignum
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-10-07 11:48:07 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-20 17:49:07 -0400
commita901a1ae6709b8e241cb93a9013b41f48fe3ecca (patch)
tree3528674ee06e97a252b5c3be925a56934705b00d /libraries/ghc-bignum
parent758e0d7bbe517b67fb20c3fb591e76b65b2959af (diff)
downloadhaskell-a901a1ae6709b8e241cb93a9013b41f48fe3ecca.tar.gz
Bignum: allow Integer's signum to inline (#20361)
Allow T12545 to increase because it only happens on CI with dwarf enabled and probably not related to this patch. Metric Increase: T12545
Diffstat (limited to 'libraries/ghc-bignum')
-rw-r--r--libraries/ghc-bignum/src/GHC/Num/Integer.hs2
1 files changed, 0 insertions, 2 deletions
diff --git a/libraries/ghc-bignum/src/GHC/Num/Integer.hs b/libraries/ghc-bignum/src/GHC/Num/Integer.hs
index 2f9a5432cf..2c8da3dcc6 100644
--- a/libraries/ghc-bignum/src/GHC/Num/Integer.hs
+++ b/libraries/ghc-bignum/src/GHC/Num/Integer.hs
@@ -514,13 +514,11 @@ integerAbs n@(IS i)
-- | Return @-1@, @0@, and @1@ depending on whether argument is
-- negative, zero, or positive, respectively
integerSignum :: Integer -> Integer
-{-# NOINLINE integerSignum #-}
integerSignum !j = IS (integerSignum# j)
-- | Return @-1#@, @0#@, and @1#@ depending on whether argument is
-- negative, zero, or positive, respectively
integerSignum# :: Integer -> Int#
-{-# NOINLINE integerSignum# #-}
integerSignum# (IN _) = -1#
integerSignum# (IS i#) = sgnI# i#
integerSignum# (IP _ ) = 1#