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:
30665bd
)
add comment
author
Simon Marlow
<simonmar@microsoft.com>
Wed, 28 Nov 2007 11:14:17 +0000
(11:14 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Wed, 28 Nov 2007 11:14:17 +0000
(11:14 +0000)
compiler/cmm/CmmOpt.hs
patch
|
blob
|
history
diff --git
a/compiler/cmm/CmmOpt.hs
b/compiler/cmm/CmmOpt.hs
index
7c88add
..
379d7a2
100644
(file)
--- a/
compiler/cmm/CmmOpt.hs
+++ b/
compiler/cmm/CmmOpt.hs
@@
-343,6
+343,8
@@
cmmMachOpFold cmp [CmmMachOp conv [x], CmmLit (CmmInt i _)]
maybe_conversion (MO_U_Conv from _) = Just (from, narrowU)
maybe_conversion (MO_S_Conv from _)
| not (isFloatingRep from) = Just (from, narrowS)
maybe_conversion (MO_U_Conv from _) = Just (from, narrowU)
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)