Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
30665bdd
Commit
30665bdd
authored
Nov 22, 2007
by
Bertram Felgenhauer
Browse files
FIX #1916: don't try to convert float constants to int in CMM optimizer
parent
a6d4d67e
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/cmm/CmmOpt.hs
View file @
30665bdd
...
...
@@ -341,7 +341,8 @@ cmmMachOpFold cmp [CmmMachOp conv [x], CmmLit (CmmInt i _)]
=
cmmMachOpFold
narrow_cmp
[
x
,
CmmLit
(
CmmInt
narrow_i
rep
)]
where
maybe_conversion
(
MO_U_Conv
from
_
)
=
Just
(
from
,
narrowU
)
maybe_conversion
(
MO_S_Conv
from
_
)
=
Just
(
from
,
narrowS
)
maybe_conversion
(
MO_S_Conv
from
_
)
|
not
(
isFloatingRep
from
)
=
Just
(
from
,
narrowS
)
maybe_conversion
_
=
Nothing
maybe_comparison
(
MO_U_Gt
_
)
rep
=
Just
(
MO_U_Gt
rep
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment