aco: fix neg(mul)/abs(mul) optimization with different bit-size
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/14810>
This commit is contained in:
parent
13bbc7c882
commit
6b1dfa7eac
|
@ -3509,6 +3509,8 @@ combine_instruction(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
if (mul_instr->opcode == aco_opcode::v_mul_legacy_f32 &&
|
||||
ctx.fp_mode.preserve_signed_zero_inf_nan32)
|
||||
return;
|
||||
if (mul_instr->definitions[0].bytes() != instr->definitions[0].bytes())
|
||||
return;
|
||||
|
||||
/* convert to mul(neg(a), b), mul(abs(a), abs(b)) or mul(neg(abs(a)), abs(b)) */
|
||||
ctx.uses[mul_instr->definitions[0].tempId()]--;
|
||||
|
|
Loading…
Reference in New Issue