Skip to content

GHC.Real.gcdInt is no longer optimized.

This is a regression since ghc-7.2, related to #5767 (closed). GHC.Real defines

gcdInt :: Int -> Int -> Int
gcdInt a b = fromIntegral (gcdInteger (fromIntegral a) (fromIntegral b))

which used to optimize to GHC.Integer.Type.gcdInt. But since fromInteger = integerToInt and fromIntegral = smallInteger are no longer inlined, this optimization is lost. This results in unecessary allocations.

Trac metadata
Trac field Value
Version 7.5
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information