shithub: mc

Download patch

ref: 64e3b36c8a1cc2c10248a4761e092234b8eccfe2
parent: 9c8878e3976780b0c04bd2a737edd09dd47816c7
author: Ori Bernstein <[email protected]>
date: Mon Dec 30 08:34:09 EST 2013

Elide floating point moves.

--- a/6/isel.c
+++ b/6/isel.c
@@ -807,6 +807,11 @@
                 }
             }
             break;
+        case Imovs:
+            /* moving a reg to itself is dumb. */
+            if (insn->args[0]->reg.colour == insn->args[1]->reg.colour)
+                return;
+            break;
         case Imov:
             assert(!isfloatmode(insn->args[1]->mode));
             if (insn->args[0]->type != Locreg || insn->args[1]->type != Locreg)