#1512: NCG to handle cyclic fixups for rematching register assignment for jump
blocks
-------------------------+--------------------------------------------------
    Reporter:  guest     |        Owner:                  
        Type:  bug       |       Status:  new             
    Priority:  normal    |    Milestone:                  
   Component:  Compiler  |      Version:                  
    Severity:  normal    |   Resolution:                  
    Keywords:            |   Difficulty:  Moderate (1 day)
          Os:  Unknown   |     Testcase:                  
Architecture:  Unknown   |  
-------------------------+--------------------------------------------------
Comment (by duncan):

 {{{
 Basically, we have to move A to B, and B to A. There is no move sequence
 that allows this without using a scratch register.
 }}}

 As Ian pointed out, actually there is!

 {{{
 x := x `xor` y;
 y := x `xor` y;
 x := x `xor` y
 }}}

 This might give you a cheaper way out than spilling and using a scratch
 register.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1512>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to