From: Eric Anholt Date: Fri, 12 Jan 2018 23:38:04 +0000 (-0800) Subject: broadcom/vc5: Use XOR instead of SUB for execute flags comparisons. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=762dd52951e3c23666b5c6d7c7836555a7a13bd1;p=mesa.git broadcom/vc5: Use XOR instead of SUB for execute flags comparisons. I think this should be equivalent other than power, and it's the kind of comparison we use for nir_op_ieq. --- diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index 955083b717d..bc18b19f802 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -1596,7 +1596,7 @@ ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr) static void ntq_activate_execute_for_block(struct v3d_compile *c) { - vir_PF(c, vir_SUB(c, c->execute, vir_uniform_ui(c, c->cur_block->index)), + vir_PF(c, vir_XOR(c, c->execute, vir_uniform_ui(c, c->cur_block->index)), V3D_QPU_PF_PUSHZ); vir_MOV_cond(c, V3D_QPU_COND_IFA, c->execute, vir_uniform_ui(c, 0)); @@ -1658,7 +1658,7 @@ ntq_emit_if(struct v3d_compile *c, nir_if *if_stmt) vir_uniform_ui(c, after_block->index)); /* If everything points at ENDIF, then jump there immediately. */ - vir_PF(c, vir_SUB(c, c->execute, + vir_PF(c, vir_XOR(c, c->execute, vir_uniform_ui(c, after_block->index)), V3D_QPU_PF_PUSHZ); vir_BRANCH(c, V3D_QPU_BRANCH_COND_ALLA); @@ -1772,7 +1772,7 @@ ntq_emit_loop(struct v3d_compile *c, nir_loop *loop) * * XXX: Use the .ORZ flags update, instead. */ - vir_PF(c, vir_SUB(c, + vir_PF(c, vir_XOR(c, c->execute, vir_uniform_ui(c, c->loop_cont_block->index)), V3D_QPU_PF_PUSHZ);