From: Matt Turner Date: Fri, 29 Nov 2013 19:28:54 +0000 (-0800) Subject: i965/fs: Let register_coalesce_2() eliminate self-moves. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1520ae48b880d9bee287583d15ac40c89d0ced8b;p=mesa.git i965/fs: Let register_coalesce_2() eliminate self-moves. This is the last thing that register_coalesce() still handled. total instructions in shared programs: 1561060 -> 1560908 (-0.01%) instructions in affected programs: 15758 -> 15606 (-0.96%) Reviewed-by: Eric Anholt --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index eecde6271d9..168411cc14d 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2271,7 +2271,8 @@ fs_visitor::register_coalesce_2() int var_from = live_intervals->var_from_reg(&inst->src[0]); int var_to = live_intervals->var_from_reg(&inst->dst); - if (live_intervals->vars_interfere(var_from, var_to)) + if (live_intervals->vars_interfere(var_from, var_to) && + !inst->dst.equals(inst->src[0])) continue; int reg_from = inst->src[0].reg;