According to the spec, we do not need to add a memory fence
for SLM's access. But, in pratice, we have to add it to make
sure get correct result. Don't know the root cause yet, just
use this work around now.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
const ir::Register reg = sel.reg(FAMILY_DWORD);
const uint32_t params = insn.getParameters();
- //need to double check local barrier whether need fence or not
- if(params == syncGlobalBarrier) {
+ //XXX TODO need to double check local barrier whether need fence or not
+ if(params == syncGlobalBarrier || params == syncLocalBarrier) {
const ir::Register fenceDst = sel.reg(FAMILY_DWORD);
sel.FENCE(sel.selReg(fenceDst, ir::TYPE_U32));
}