mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 15:50:11 +01:00
i965/fs: Optimize SEL with the same sources into a MOV.
instructions in affected programs: 474 -> 462 (-2.53%) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
35bc02dee8
commit
fab92fa1cb
1 changed files with 7 additions and 1 deletions
|
|
@ -2021,7 +2021,13 @@ fs_visitor::opt_algebraic()
|
|||
}
|
||||
break;
|
||||
case BRW_OPCODE_SEL:
|
||||
if (inst->saturate && inst->src[1].file == IMM) {
|
||||
if (inst->src[0].equals(inst->src[1])) {
|
||||
inst->opcode = BRW_OPCODE_MOV;
|
||||
inst->src[1] = reg_undef;
|
||||
inst->predicate = BRW_PREDICATE_NONE;
|
||||
inst->predicate_inverse = false;
|
||||
progress = true;
|
||||
} else if (inst->saturate && inst->src[1].file == IMM) {
|
||||
switch (inst->conditional_mod) {
|
||||
case BRW_CONDITIONAL_LE:
|
||||
case BRW_CONDITIONAL_L:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue