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:
parent
34ee3f5a34
commit
f5cc3fdcf1
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue