Module: Mesa
Branch: main
Commit: a6be8fd0ea68b0af615258d41b9b6f23c218d523
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a6be8fd0ea68b0af615258d41b9b6f23c218d523

Author: Connor Abbott <[email protected]>
Date:   Wed Dec  1 16:24:46 2021 +0100

ir3/dce: Support multiple destinations

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14107>

---

 src/freedreno/ir3/ir3_dce.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/freedreno/ir3/ir3_dce.c b/src/freedreno/ir3/ir3_dce.c
index 76298e64af9..a3ddbe802b1 100644
--- a/src/freedreno/ir3/ir3_dce.c
+++ b/src/freedreno/ir3/ir3_dce.c
@@ -53,8 +53,10 @@ instr_dce(struct ir3_instruction *instr, bool falsedep)
    if (ir3_instr_check_mark(instr))
       return;
 
-   if (writes_gpr(instr))
-      mark_array_use(instr, instr->dsts[0]); /* dst */
+   foreach_dst (dst, instr) {
+      if (is_dest_gpr(dst))
+         mark_array_use(instr, dst);
+   }
 
    foreach_src (reg, instr)
       mark_array_use(instr, reg); /* src */

Reply via email to