[llvm] [SPIRV] Audit `select` Result in SPIRVInstructionSelector (PR #115193)

Sarah Spall via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 14:52:02 PST 2024


================
@@ -1229,17 +1244,26 @@ bool SPIRVInstructionSelector::selectAtomicCmpXchg(Register ResVReg,
     const MachineMemOperand *MemOp = *I.memoperands_begin();
     unsigned Scope = static_cast<uint32_t>(getMemScope(
         GR.CurMF->getFunction().getContext(), MemOp->getSyncScopeID()));
-    ScopeReg = buildI32Constant(Scope, I);
+    auto ScopeConstant = buildI32Constant(Scope, I);
+    ScopeReg = ScopeConstant.first;
+    Result &= ScopeConstant.second;
----------------
spall wrote:

ditto

https://github.com/llvm/llvm-project/pull/115193


More information about the llvm-commits mailing list