i965: Update the live interval when coalescing regs.
authorEric Anholt <eric@anholt.net>
Thu, 14 Oct 2010 05:39:06 +0000 (22:39 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 14 Oct 2010 17:42:55 +0000 (10:42 -0700)
src/mesa/drivers/dri/i965/brw_fs.cpp

index c0fee114a86bf4f4ae1b35c6699f8d2a462d565d..e2c7dbde6a575dd2b5753acd8f59186d6ba6528f 100644 (file)
@@ -2563,6 +2563,10 @@ fs_visitor::register_coalesce()
         continue;
       }
 
+      /* Update live interval so we don't have to recalculate. */
+      this->virtual_grf_use[inst->src[0].reg] = MAX2(virtual_grf_use[inst->src[0].reg],
+                                                    virtual_grf_use[inst->dst.reg]);
+
       /* Rewrite the later usage to point at the source of the move to
        * be removed.
        */