From 1e0003ec107dff77cd579d245f6314cbf7d4f3fc Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Tue, 11 Aug 2026 17:59:16 +0800 Subject: [RISCV] Legalize narrow atomic compare exchange --- backend/lib/CodeGen/GenericOpcodes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/lib/CodeGen/GenericOpcodes.cpp') diff --git a/backend/lib/CodeGen/GenericOpcodes.cpp b/backend/lib/CodeGen/GenericOpcodes.cpp index 0ffb26a..4c60675 100644 --- a/backend/lib/CodeGen/GenericOpcodes.cpp +++ b/backend/lib/CodeGen/GenericOpcodes.cpp @@ -891,12 +891,12 @@ private: if (MemoryOperands.size() != 1 || MemoryOperands.front()->description().AtomicKind != AtomicOperation::CompareExchange) return semanticError("G_ATOMIC_CMPXCHG_WITH_SUCCESS requires one compare-exchange MMO"); - return VerifySingleAccess(2, 0, true, true, SizeRelation::Equal); + return VerifySingleAccess(2, 0, true, true, SizeRelation::NoLarger); case GO::G_ATOMIC_CMPXCHG: if (MemoryOperands.size() != 1 || MemoryOperands.front()->description().AtomicKind != AtomicOperation::CompareExchange) return semanticError("G_ATOMIC_CMPXCHG requires one compare-exchange MMO"); - return VerifySingleAccess(1, 0, true, true, SizeRelation::Equal); + return VerifySingleAccess(1, 0, true, true, SizeRelation::NoLarger); case GO::G_ATOMICRMW_XCHG: case GO::G_ATOMICRMW_ADD: case GO::G_ATOMICRMW_SUB: -- cgit v1.2.3