cvs commit: fptools/ghc/compiler/simplCore CSE.lhs
Simon Peyton Jones
simonpj at glass.cse.ogi.edu
Thu Jan 8 03:53:30 EST 2004
simonpj 2004/01/08 03:53:30 PST
Modified files:
ghc/compiler/simplCore CSE.lhs
Log:
---------------------------------------
Fix a long-standing CSE bug with unboxed tuples
---------------------------------------
Merge to stable
Consider
case f x of
(# a,b #) -> if a>0
then f x -- CSE opportunity
else (# b,a #)
GHC 6.2's CSE pass wrongly optimised this to:
case f x of t
(# a,b #) -> if a>0 then
t -- WRONG
else (# b,a #)
(Wrong because we aren't allowed to mention a case binder for
an unboxed-tuple case.)
This commit fixes the problem.
Revision Changes Path
1.15 +55 -30 fptools/ghc/compiler/simplCore/CSE.lhs
More information about the Cvs-ghc
mailing list