diff options
author | Ben Gamari <ben@well-typed.com> | 2022-12-21 17:23:25 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-12-24 00:42:16 -0500 |
commit | 63b97430e5bd476923cd0cd8a6c71b17a20e3c4b (patch) | |
tree | 8e90bff0c9beabac5b231227bad2b6862d68b96e /compiler/GHC | |
parent | c264b06b4e77976939386a6d373d00118562c376 (diff) | |
download | haskell-63b97430e5bd476923cd0cd8a6c71b17a20e3c4b.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
Diffstat (limited to 'compiler/GHC')
-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 0ae89317f3..dbe623f85e 100644 --- a/compiler/GHC/CmmToLlvm/CodeGen.hs +++ b/compiler/GHC/CmmToLlvm/CodeGen.hs @@ -2030,7 +2030,7 @@ genLit _ CmmHighStackMark -- convertMemoryOrdering :: MemoryOrdering -> LlvmSyncOrdering -convertMemoryOrdering MemOrderRelaxed = SyncUnord +convertMemoryOrdering MemOrderRelaxed = SyncMonotonic convertMemoryOrdering MemOrderAcquire = SyncAcquire convertMemoryOrdering MemOrderRelease = SyncRelease convertMemoryOrdering MemOrderSeqCst = SyncSeqCst |