mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
elk/algebraic: Don't optimize float SEL.CMOD to MOV
Floating point SEL.CMOD may flush denorms to zero. We don't have enough information at this point in compilation to know whether or not it is safe to remove that. Integer SEL or SEL without a conditional modifier is just a fancy MOV. Those are always safe to eliminate. See also3f782cdd25. Fixes:fab92fa1cb("i965/fs: Optimize SEL with the same sources into a MOV.") Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34192>
This commit is contained in:
parent
f4ede9c10a
commit
e783930b10
1 changed files with 3 additions and 1 deletions
|
|
@ -2397,7 +2397,9 @@ elk_fs_visitor::opt_algebraic()
|
|||
inst->remove(block);
|
||||
progress = true;
|
||||
}
|
||||
if (inst->src[0].equals(inst->src[1])) {
|
||||
if (inst->src[0].equals(inst->src[1]) &&
|
||||
(!elk_reg_type_is_floating_point(inst->dst.type) ||
|
||||
inst->conditional_mod == ELK_CONDITIONAL_NONE)) {
|
||||
inst->opcode = ELK_OPCODE_MOV;
|
||||
inst->sources = 1;
|
||||
inst->src[1] = reg_undef;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue