projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6d4d67
)
FIX #1916: don't try to convert float constants to int in CMM optimizer
author
Bertram Felgenhauer
<int-e@gmx.de>
Thu, 22 Nov 2007 09:55:13 +0000
(09:55 +0000)
committer
Bertram Felgenhauer
<int-e@gmx.de>
Thu, 22 Nov 2007 09:55:13 +0000
(09:55 +0000)
compiler/cmm/CmmOpt.hs
patch
|
blob
|
history
diff --git
a/compiler/cmm/CmmOpt.hs
b/compiler/cmm/CmmOpt.hs
index
320f0a5
..
7c88add
100644
(file)
--- a/
compiler/cmm/CmmOpt.hs
+++ b/
compiler/cmm/CmmOpt.hs
@@
-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)