summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/RegAlloc/Graph/Main.hs
diff options
context:
space:
mode:
authorBen.Lippmeier@anu.edu.au <unknown>2009-05-19 03:55:28 +0000
committerBen.Lippmeier@anu.edu.au <unknown>2009-05-19 03:55:28 +0000
commitf20b0d8aa7f04fe42d4bebfb78317b2969f92b07 (patch)
tree84d74c255224bae72136a8c2eaaab015a24f99c7 /compiler/nativeGen/RegAlloc/Graph/Main.hs
parentf9288086f935c97812b2d80defcff38baf7b6a6c (diff)
downloadhaskell-f20b0d8aa7f04fe42d4bebfb78317b2969f92b07.tar.gz
Don't try and coalesce RealReg->RealReg moves
Diffstat (limited to 'compiler/nativeGen/RegAlloc/Graph/Main.hs')
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/Main.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs
index 94b18aeb0a..d239d0d3c5 100644
--- a/compiler/nativeGen/RegAlloc/Graph/Main.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs
@@ -311,9 +311,13 @@ graphAddCoalesce (r1, r2) graph
(vr2, classOfVirtualReg vr2)
graph
- | otherwise
- = panic "RegAlloc.Graph.Main.graphAddCoalesce: can't coalesce two real regs"
-
+ -- We can't coalesce two real regs, but there could well be existing
+ -- hreg,hreg moves in the input code. We'll just ignore these
+ -- for coalescing purposes.
+ | RegReal _ <- r1
+ , RegReal _ <- r2
+ = graph
+
-- | Patch registers in code using the reg -> reg mapping in this graph.
patchRegsFromGraph