mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 23:40:10 +01:00
i965/fs: Optimize LRP with x == y into a MOV.
total instructions in shared programs: 1487331 -> 1485988 (-0.09%) instructions in affected programs: 45638 -> 44295 (-2.94%) GAINED: 7 LOST: 0 Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
8d37e9915a
commit
bf0773aeca
1 changed files with 10 additions and 0 deletions
|
|
@ -2000,6 +2000,16 @@ fs_visitor::opt_algebraic()
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case BRW_OPCODE_LRP:
|
||||
if (inst->src[1].equals(inst->src[2])) {
|
||||
inst->opcode = BRW_OPCODE_MOV;
|
||||
inst->src[0] = inst->src[1];
|
||||
inst->src[1] = reg_undef;
|
||||
inst->src[2] = reg_undef;
|
||||
progress = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case BRW_OPCODE_SEL:
|
||||
if (inst->saturate && inst->src[1].file == IMM) {
|
||||
switch (inst->conditional_mod) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue