intel/fs/ra: Store the last non-spill VGRF node

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7084>
diff --git a/src/intel/compiler/brw_fs_reg_allocate.cpp b/src/intel/compiler/brw_fs_reg_allocate.cpp
index ca7d14f..c7b37a9 100644
--- a/src/intel/compiler/brw_fs_reg_allocate.cpp
+++ b/src/intel/compiler/brw_fs_reg_allocate.cpp
@@ -434,6 +434,7 @@
       first_mrf_hack_node = 0;
       grf127_send_hack_node = 0;
       first_vgrf_node = 0;
+      last_vgrf_node = 0;
       first_spill_node = 0;
 
       spill_vgrf_ip = NULL;
@@ -481,6 +482,7 @@
    int first_mrf_hack_node;
    int grf127_send_hack_node;
    int first_vgrf_node;
+   int last_vgrf_node;
    int first_spill_node;
 
    int *spill_vgrf_ip;
@@ -597,7 +599,7 @@
     * of interference will take care of the rest.
     */
    for (unsigned n2 = first_vgrf_node;
-        n2 < (unsigned)first_spill_node && n2 < node; n2++) {
+        n2 <= (unsigned)last_vgrf_node && n2 < node; n2++) {
       unsigned vgrf = n2 - first_vgrf_node;
       if (!(node_end_ip <= live.vgrf_start[vgrf] ||
             live.vgrf_end[vgrf] <= node_start_ip))
@@ -744,6 +746,7 @@
    }
    first_vgrf_node = node_count;
    node_count += fs->alloc.count;
+   last_vgrf_node = node_count - 1;
    first_spill_node = node_count;
 
    fs->calculate_payload_ranges(payload_node_count,