summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiang Yu <[email protected]>2019-04-12 11:35:34 +0800
committerQiang Yu <[email protected]>2019-04-14 12:10:23 +0800
commitb46b661f532978c0e41ba81e4c203978fa9ba4ac (patch)
treea48fad7e76439e07b7d50c5a903e1ac3656a49ca
parent8d91cd64aa8e6aa730c4fc3613a848f767d27089 (diff)
lima/gpir: fix alu check miss last store slot
Fixes: 92d7ca4b1cd "gallium: add lima driver" Signed-off-by: Qiang Yu <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]>
-rw-r--r--src/gallium/drivers/lima/ir/gp/instr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/lima/ir/gp/instr.c b/src/gallium/drivers/lima/ir/gp/instr.c
index 0ff7e7eabc2..158a9a93fd4 100644
--- a/src/gallium/drivers/lima/ir/gp/instr.c
+++ b/src/gallium/drivers/lima/ir/gp/instr.c
@@ -90,7 +90,7 @@ static bool gpir_instr_insert_alu_check(gpir_instr *instr, gpir_node *node)
* complex1 won't be any of this instr's store node's child,
* because it has two instr latency before store can use it.
*/
- for (int i = GPIR_INSTR_SLOT_STORE0; i < GPIR_INSTR_SLOT_STORE3; i++) {
+ for (int i = GPIR_INSTR_SLOT_STORE0; i <= GPIR_INSTR_SLOT_STORE3; i++) {
gpir_store_node *s = gpir_node_to_store(instr->slots[i]);
if (s && s->child == node) {
/* acc node may consume 2 slots, so even it's the child of a
@@ -119,7 +119,7 @@ static void gpir_instr_remove_alu(gpir_instr *instr, gpir_node *node)
{
int consume_slot = gpir_instr_get_consume_slot(instr, node);
- for (int i = GPIR_INSTR_SLOT_STORE0; i < GPIR_INSTR_SLOT_STORE3; i++) {
+ for (int i = GPIR_INSTR_SLOT_STORE0; i <= GPIR_INSTR_SLOT_STORE3; i++) {
gpir_store_node *s = gpir_node_to_store(instr->slots[i]);
if (s && s->child == node) {
instr->alu_num_slot_needed_by_store++;