Skip to contentSkip to conversation

nv50/ir: make sure to reverse cond codes on all the OP_SET variants

PATCH In review Ilia Mirkin 2 participants 2 messages May 10, 2014 – May 11, 2014 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nv50/ir: make sure to reverse cond codes on all the OP_SET variants

---

Found this while tracking a regression on nvc0 for my patch which fixes ir_unop_any to emit or's instead of dp3's. (That patch is fine, this code was always broken.)

 src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +2 -1
index c89e1c3..cdae3c8 100644
@@ -187,7 +187,8 @@ LoadPropagation::checkSwapSrc01(Instruction *insn)
       return;
    }
 
-   if (insn->op == OP_SET)
+   if (insn->op == OP_SET || insn->op == OP_SET_AND ||
+       insn->op == OP_SET_OR || insn->op == OP_SET_XOR)
       insn->asCmp()->setCond = reverseCondCode(insn->asCmp()->setCond);
    else
    if (insn->op == OP_SLCT)
Signature · 1 line
1.8.5.5

A message that is not in the archive (sent off-list or not yet received): 1399748766-26374-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]

Reviewed-by
#2 lore raw
Quoted 2 lines · Ilia Mirkin
Quoted 30 lines

---

Found this while tracking a regression on nvc0 for my patch which fixes ir_unop_any to emit or's instead of dp3's. (That patch is fine, this code was always broken.)

 src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +2 -2
index c89e1c3..cdae3c8 100644
@@ -187,7 +187,8 @@ LoadPropagation::checkSwapSrc01(Instruction *insn)
       return;
    }
 
-   if (insn->op == OP_SET)
+   if (insn->op == OP_SET || insn->op == OP_SET_AND ||
+       insn->op == OP_SET_OR || insn->op == OP_SET_XOR)
       insn->asCmp()->setCond = reverseCondCode(insn->asCmp()->setCond);
    else
    if (insn->op == OP_SLCT)
--

1.8.5.5

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau