i965/cse: Don't eliminate instructions with side-effects

This casues problems when converting atomics to use the GRF.  Sometimes the atomic operation would get eaten by CSE when it shouldn't.

v2: Roll the has_side_effects check into is_expression

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Jason Ekstrand 2014-08-08 14:30:25 -07:00
parent 34ee3f5a34
commit f5cc3fdcf1
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ is_expression(const fs_inst *const inst)
case SHADER_OPCODE_LOAD_PAYLOAD:
return !is_copy_payload(inst);
default:
return inst->is_send_from_grf();
return inst->is_send_from_grf() && !inst->has_side_effects();
}
}

View File

@ -82,7 +82,7 @@ is_expression(const vec4_instruction *const inst)
case SHADER_OPCODE_COS:
return inst->mlen == 0;
default:
return false;
return !inst->has_side_effects();
}
}