Fix bug in multi-destination jump patching.
authorEdward Z. Yang <ezyang@mit.edu>
Wed, 27 Apr 2011 16:54:15 +0000 (17:54 +0100)
committerEdward Z. Yang <ezyang@mit.edu>
Wed, 27 Apr 2011 17:01:53 +0000 (18:01 +0100)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs

index 903082f..ef6ae9b 100644 (file)
@@ -190,7 +190,7 @@ joinToTargets_again
                 _      -> let  instr'  =  patchJumpInstr instr 
                                                (\bid -> if bid == dest 
                                                                then mkBlockId fixup_block_id 
-                                                               else dest)
+                                                               else bid) -- no change!
                                                
                           in   joinToTargets' block_live (block : new_blocks) block_id instr' dests