projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add comment
[ghc-hetmet.git]
/
compiler
/
cmm
/
CmmOpt.hs
diff --git
a/compiler/cmm/CmmOpt.hs
b/compiler/cmm/CmmOpt.hs
index
320f0a5
..
379d7a2
100644
(file)
--- a/
compiler/cmm/CmmOpt.hs
+++ b/
compiler/cmm/CmmOpt.hs
@@
-341,7
+341,10
@@
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)
= 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)
+ -- don't attempt to apply this optimisation when the source
+ -- is a float; see #1916
maybe_conversion _ = Nothing
maybe_comparison (MO_U_Gt _) rep = Just (MO_U_Gt rep)
maybe_conversion _ = Nothing
maybe_comparison (MO_U_Gt _) rep = Just (MO_U_Gt rep)