From 88cac12230807456824d1f86f990a3926371a198 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 14 May 2019 10:36:09 -0500 Subject: [PATCH] intel/fs/ra: Only add dest interference to sources that exist Fixes: 83dedb6354d "i965: Add src/dst interference for certain" Reviewed-by: Kenneth Graunke --- src/intel/compiler/brw_fs_reg_allocate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_fs_reg_allocate.cpp b/src/intel/compiler/brw_fs_reg_allocate.cpp index 17a9dc8e9c4..f8921175f9a 100644 --- a/src/intel/compiler/brw_fs_reg_allocate.cpp +++ b/src/intel/compiler/brw_fs_reg_allocate.cpp @@ -591,7 +591,7 @@ fs_visitor::assign_regs(bool allow_spilling, bool spill_all) */ foreach_block_and_inst(block, fs_inst, inst, cfg) { if (inst->dst.file == VGRF && inst->has_source_and_destination_hazard()) { - for (unsigned i = 0; i < 3; i++) { + for (unsigned i = 0; i < inst->sources; i++) { if (inst->src[i].file == VGRF) { ra_add_node_interference(g, inst->dst.nr, inst->src[i].nr); } -- 2.30.2