[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:05 PST 2024
================
@@ -2712,16 +2744,22 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
case Intrinsic::spv_firstbitshigh: // There is no CL equivalent of FindSMsb
return selectFirstBitHigh(ResVReg, ResType, I, /*IsSigned=*/true);
case Intrinsic::spv_group_memory_barrier_with_group_sync: {
- Register MemSemReg =
+ bool Result = true;
+ auto MemSemConstant =
buildI32Constant(SPIRV::MemorySemantics::SequentiallyConsistent, I);
- Register ScopeReg = buildI32Constant(SPIRV::Scope::Workgroup, I);
+ Register MemSemReg = MemSemConstant.first;
+ Result &= MemSemConstant.second;
----------------
spall wrote:
ditto
https://github.com/llvm/llvm-project/pull/115193
More information about the llvm-commits
mailing list