Commit
b16b3c87 began performing CSE on CMP instructions with null
destinations. I relaxed the restrictions a bit too much, thereby
allowing CSE to be performed on instructions with, for instance, an
explicit accumulator destination.
This broke the arb_gpu_shader5/fs-imulExtended shader tests because
they emit MUL instructions with the accumulator as the destination. CSE
would instead cause the MUL to write to a GRF, which is lower precision
than the accumulator.
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: 10.0 <mesa-stable@lists.freedesktop.org>
inst = (fs_inst *) inst->next) {
/* Skip some cases. */
- if (is_expression(inst) && !inst->is_partial_write())
+ if (is_expression(inst) && !inst->is_partial_write() &&
+ (inst->dst.file != HW_REG || inst->dst.is_null()))
{
bool found = false;