aco: follow through temporary when merging tests into constant comparisons
This can happen with v_mov_b32(s_mov_b32(literal)) pipeline-db (Navi): Totals from affected shaders: SGPRS: 632 -> 632 (0.00 %) VGPRS: 492 -> 492 (0.00 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 77488 -> 76928 (-0.72 %) bytes Max Waves: 67 -> 67 (0.00 %) Instructions: 14426 -> 14332 (-0.65 %) pipeline-db (Vega): Totals from affected shaders: SGPRS: 632 -> 632 (0.00 %) VGPRS: 492 -> 492 (0.00 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 77512 -> 76952 (-0.72 %) bytes Max Waves: 67 -> 67 (0.00 %) Instructions: 14432 -> 14338 (-0.65 %) Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2883>
This commit is contained in:
@@ -1394,7 +1394,8 @@ bool combine_constant_comparison_ordering(opt_ctx &ctx, aco_ptr<Instruction>& in
|
||||
if (cmp->operands[constant_operand].isConstant()) {
|
||||
constant = cmp->operands[constant_operand].constantValue();
|
||||
} else if (cmp->operands[constant_operand].isTemp()) {
|
||||
unsigned id = cmp->operands[constant_operand].tempId();
|
||||
Temp tmp = cmp->operands[constant_operand].getTemp();
|
||||
unsigned id = original_temp_id(ctx, tmp);
|
||||
if (!ctx.info[id].is_constant() && !ctx.info[id].is_literal())
|
||||
return false;
|
||||
constant = ctx.info[id].val;
|
||||
|
||||
Reference in New Issue
Block a user