Skip to content

Commit 8f294df

Browse files
sarnexMrSidims
authored andcommitted
[Backport to 15] Translate atomicrmw fsub into FNegate and AtomicFAddEXT (#1780)
Signed-off-by: Sarnie, Nick <[email protected]>
1 parent 69aa387 commit 8f294df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/SPIRV/SPIRVWriter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,8 +2282,8 @@ LLVMToSPIRVBase::transValueWithoutDecoration(Value *V, SPIRVBasicBlock *BB,
22822282
AtomicRMWInst::BinOp Op = ARMW->getOperation();
22832283
const bool SupportedAtomicInst =
22842284
AtomicRMWInst::isFPOperation(Op)
2285-
? (Op == AtomicRMWInst::FAdd || Op == AtomicRMWInst::FMin ||
2286-
Op == AtomicRMWInst::FMax)
2285+
? (Op == AtomicRMWInst::FAdd || Op == AtomicRMWInst::FSub ||
2286+
Op == AtomicRMWInst::FMin || Op == AtomicRMWInst::FMax)
22872287
: Op != AtomicRMWInst::Nand;
22882288
if (!BM->getErrorLog().checkError(
22892289
SupportedAtomicInst, SPIRVEC_InvalidInstruction, V,

0 commit comments

Comments
 (0)