summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2019-05-14 10:36:09 -0500
committerJuan A. Suarez Romero <jasuarez@igalia.com>2019-05-15 08:26:52 +0000
commit8cf49e16623b4d778405707d0b518c01be32ed74 (patch)
treef2348f1a75bbd3437145427b3a51e30ccba3bb66
parentc03d9a7fa939c35e9a7d583f91eda011cfa5d794 (diff)
intel/fs/ra: Only add dest interference to sources that exist
Fixes: 83dedb6354d "i965: Add src/dst interference for certain" Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 88cac12230807456824d1f86f990a3926371a198)
-rw-r--r--src/intel/compiler/brw_fs_reg_allocate.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}