git.haskell.org
/
ghc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf3fb95
)
comment
author
Simon Marlow
<marlowsd@gmail.com>
Fri, 3 Aug 2012 15:38:01 +0000
(16:38 +0100)
committer
Simon Marlow
<marlowsd@gmail.com>
Mon, 6 Aug 2012 08:47:33 +0000
(09:47 +0100)
compiler/cmm/CmmOpt.hs
patch
|
blob
|
history
diff --git
a/compiler/cmm/CmmOpt.hs
b/compiler/cmm/CmmOpt.hs
index
2e3da5c
..
09cbf50
100644
(file)
--- a/
compiler/cmm/CmmOpt.hs
+++ b/
compiler/cmm/CmmOpt.hs
@@
-605,6
+605,11
@@
cmmMachOpFoldM platform mop [x, (CmmLit (CmmInt n _))]
Just (cmmMachOpFold platform (MO_S_Shr rep) [x3, CmmLit (CmmInt p rep)])
_ -> Nothing
+-- ToDo (#7116): optimise floating-point multiplication, e.g. x*2.0 -> x+x
+-- Unfortunately this needs a unique supply because x might not be a
+-- register. See #2253 (program 6) for an example.
+
+
-- Anything else is just too hard.
cmmMachOpFoldM _ _ _ = Nothing