Skip to content

Commit

Permalink
Remove 64-bit buffer atomic cmpswap workaround
Browse files Browse the repository at this point in the history
Remove a special case for 64-bit buffer atomic cmpswap which is not
required when the LLVM backend supports codegen for this operation.
  • Loading branch information
jayfoad committed Oct 30, 2023
1 parent 44115d2 commit 0404a39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lgc/patch/PatchBufferOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ void BufferOpLowering::visitAtomicCmpXchgInst(AtomicCmpXchgInst &atomicCmpXchgIn
Value *const baseIndex = m_builder.CreatePtrToInt(values[1], m_builder.getInt32Ty());
copyMetadata(baseIndex, &atomicCmpXchgInst);

// If our buffer descriptor is divergent or is not a 32-bit integer, need to handle it differently.
if (getDescriptorInfo(bufferDesc).divergent.value() || !storeType->isIntegerTy(32)) {
// If our buffer descriptor is divergent, need to handle it differently.
if (getDescriptorInfo(bufferDesc).divergent.value()) {
Value *const baseAddr = getBaseAddressFromBufferDesc(bufferDesc);

// The 2nd element in the buffer descriptor is the byte bound, we do this to support robust buffer access.
Expand Down

0 comments on commit 0404a39

Please sign in to comment.