diff options
author | Ben Gamari <ben@well-typed.com> | 2022-12-21 17:23:25 +0000 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-12-21 15:13:05 -0500 |
commit | 87e87896bd640c39afeeb76189f989a8374f0e37 (patch) | |
tree | ca3836f71ca35776df77514240d2f82d97f3cdeb | |
parent | f6aee84621a2d91649258a29078921c80828fafe (diff) | |
download | haskell-87e87896bd640c39afeeb76189f989a8374f0e37.tar.gz |
llvmGen: Fix relaxed ordering
Previously I used LLVM's `unordered` ordering for the C11 `relaxed`
ordering. However, this is wrong and should rather use the LLVM
`monotonic` ordering.
Fixes #22640
-rw-r--r-- | compiler/GHC/CmmToLlvm/CodeGen.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/CmmToLlvm/CodeGen.hs b/compiler/GHC/CmmToLlvm/CodeGen.hs index 3e3bbf0d80..be3f1fe13d 100644 --- a/compiler/GHC/CmmToLlvm/CodeGen.hs +++ b/compiler/GHC/CmmToLlvm/CodeGen.hs @@ -2041,7 +2041,7 @@ genLit _ CmmHighStackMark -- convertMemoryOrdering :: MemoryOrdering -> LlvmSyncOrdering -convertMemoryOrdering MemOrderRelaxed = SyncUnord +convertMemoryOrdering MemOrderRelaxed = SyncMonotonic convertMemoryOrdering MemOrderAcquire = SyncAcquire convertMemoryOrdering MemOrderRelease = SyncRelease convertMemoryOrdering MemOrderSeqCst = SyncSeqCst |