OSDN Git Service

i965/fs: Avoid inappropriate optimization with regs_written > 1.
authorEric Anholt <eric@anholt.net>
Fri, 15 Mar 2013 21:31:46 +0000 (14:31 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 1 Apr 2013 23:17:25 +0000 (16:17 -0700)
Right now we don't have anything with regs_written() > 1 and !inst->mlen,
but that's about to change.

NOTE: This is a candidate for the 9.1 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.cpp

index da3ac15..c60d041 100644 (file)
@@ -2082,6 +2082,12 @@ fs_visitor::compute_to_mrf()
               break;
            }
 
+            /* Things returning more than one register would need us to
+             * understand coalescing out more than one MOV at a time.
+             */
+            if (scan_inst->regs_written() > 1)
+               break;
+
            /* SEND instructions can't have MRF as a destination. */
            if (scan_inst->mlen)
               break;