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>
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();
}
}
case SHADER_OPCODE_COS:
return inst->mlen == 0;
default:
- return false;
+ return !inst->has_side_effects();
}
}