i965/fs: Add missing analysis invalidation in fixup_3src_null_dest().
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 11 Mar 2016 23:27:22 +0000 (15:27 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 14 Mar 2016 21:57:58 +0000 (14:57 -0700)
Bug found by the liveness analysis validation pass that will be
introduced in a later commit.  fixup_3src_null_dest() was allocating
registers which makes the cached liveness analysis calculation
incomplete, so it must be invalidated.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 42bc5e2a0270303b713246a2ff1affc0a23db559..86d2bd92726e68ee15648e20a9d0a574a31c5ac6 100644 (file)
@@ -5190,12 +5190,18 @@ fs_visitor::optimize()
 void
 fs_visitor::fixup_3src_null_dest()
 {
+   bool progress = false;
+
    foreach_block_and_inst_safe (block, fs_inst, inst, cfg) {
       if (inst->is_3src() && inst->dst.is_null()) {
          inst->dst = fs_reg(VGRF, alloc.allocate(dispatch_width / 8),
                             inst->dst.type);
+         progress = true;
       }
    }
+
+   if (progress)
+      invalidate_live_intervals();
 }
 
 void