================
@@ -2928,18 +2928,19 @@ bool
SPIRVInstructionSelector::selectBarrierInst(MachineInstr &I,
"Device Scope must set UniformMemory and ImageMemory semantic "
"in Barrier instruction");
- Register MemSemReg = buildI32Constant(MemSem, I);
- Register ScopeReg = buildI32Constant(Scope, I);
MachineBasicBlock &BB = *I.getParent();
- auto MI =
- BuildMI(BB, I, I.getDebugLoc(), TII.get(BarrierType)).addUse(ScopeReg);
+ auto MI = BuildMI(BB, I, I.getDebugLoc(), TII.get(BarrierType));
// OpControlBarrier needs to also set Execution Scope
if (WithGroupSync) {
- MI.addUse(ScopeReg);
+ Register ExecReg = buildI32Constant(SPIRV::Scope::Workgroup, I);
+ MI.addUse(ExecReg);
----------------
bob80905 wrote:
Hmm, we were re-adding the ScopeReg as a use when it was already added! Looks
like a bug to me, thanks for catching this.
https://github.com/llvm/llvm-project/pull/190633
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits