i965/fs: Optimize OR with identical sources into a MOV.
Helps a lot of Steam games. total instructions in shared programs: 1409360 -> 1409124 (-0.02%) instructions in affected programs: 20842 -> 20606 (-1.13%) Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
@@ -1872,6 +1872,14 @@ fs_visitor::opt_algebraic()
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case BRW_OPCODE_OR:
|
||||
if (inst->src[0].equals(inst->src[1])) {
|
||||
inst->opcode = BRW_OPCODE_MOV;
|
||||
inst->src[1] = reg_undef;
|
||||
progress = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user