aco: Use plain VOPC for vcmpx when possible.

Foz-DB Navi21:
Totals from 66947 (49.62% of 134913) affected shaders:
CodeSize: 210383024 -> 210033376 (-0.17%)

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18417>
This commit is contained in:
Georg Lehmann 2022-09-05 13:10:06 +02:00 committed by Marge Bot
parent 9cbc609db3
commit 28a69b72d8

View file

@ -461,7 +461,10 @@ try_optimize_branching_sequence(ssa_elimination_ctx& ctx, Block& block, const in
*exec_val->definitions.rbegin() = Definition(exec, ctx.program->lane_mask);
/* TODO: change instruction from VOP3 to plain VOPC when possible. */
/* Change instruction from VOP3 to plain VOPC when possible. */
if (ctx.program->gfx_level >= GFX10 && !exec_val->usesModifiers() &&
(exec_val->operands.size() < 2 || exec_val->operands[1].isOfType(RegType::vgpr)))
exec_val->format = Format::VOPC;
} else {
/* Reassign the instruction to write exec directly. */
exec_val->definitions[0] = Definition(exec, ctx.program->lane_mask);