mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
intel/vec4: Don't optimize multiply by 1.0 away
The SPIR-V compiler's implementation of tanh generates a multiply by 1.0 to flush denorms to zero. Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20232>
This commit is contained in:
parent
dcad4a2cd1
commit
56667002fd
1 changed files with 6 additions and 0 deletions
|
|
@ -668,6 +668,12 @@ vec4_visitor::opt_algebraic()
|
|||
break;
|
||||
|
||||
case BRW_OPCODE_MUL:
|
||||
if (inst->src[1].file != IMM)
|
||||
continue;
|
||||
|
||||
if (brw_reg_type_is_floating_point(inst->src[1].type))
|
||||
break;
|
||||
|
||||
if (inst->src[1].is_zero()) {
|
||||
inst->opcode = BRW_OPCODE_MOV;
|
||||
switch (inst->src[0].type) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue