gallivm: fix a missing argument to CreateAtomicCmpXchg

Submitted by Charmaine Lee on Aug. 1, 2019, 10:56 p.m.

Details

Message ID 1564700161-18415-1-git-send-email-charmainel@vmware.com
State New
Headers show
Series "gallivm: fix a missing argument to CreateAtomicCmpXchg" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Charmaine Lee Aug. 1, 2019, 10:56 p.m.
This patch fixes a missing argument to CreateAtomicCmpXchg for older
version of LLVM.
---
 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 79d1029..8205d24 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -831,6 +831,7 @@  LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr,
    /* LLVM 3.8 doesn't have a second ordering and uses old SynchronizationScope enum */
    return llvm::wrap(llvm::unwrap(B)->CreateAtomicCmpXchg(llvm::unwrap(Ptr), llvm::unwrap(Cmp),
                                                           llvm::unwrap(New), mapFromLLVMOrdering(SuccessOrdering),
+                                                          mapFromLLVMOrdering(FailureOrdering),
                                                           SingleThread ? llvm::SynchronizationScope::SingleThread : llvm::SynchronizationScope::CrossThread));
 }
 #endif

Comments

On 08/01/2019 04:56 PM, Charmaine Lee wrote:
> This patch fixes a missing argument to CreateAtomicCmpXchg for older
> version of LLVM.
> ---
>   src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
> index 79d1029..8205d24 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
> @@ -831,6 +831,7 @@ LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr,
>      /* LLVM 3.8 doesn't have a second ordering and uses old SynchronizationScope enum */
>      return llvm::wrap(llvm::unwrap(B)->CreateAtomicCmpXchg(llvm::unwrap(Ptr), llvm::unwrap(Cmp),
>                                                             llvm::unwrap(New), mapFromLLVMOrdering(SuccessOrdering),
> +                                                          mapFromLLVMOrdering(FailureOrdering),
>                                                             SingleThread ? llvm::SynchronizationScope::SingleThread : llvm::SynchronizationScope::CrossThread));
>   }
>   #endif
> 

Reviewed-by: Brian Paul <brianp@vmware.com>
On Fri, 2 Aug 2019 at 13:08, Brian Paul <brianp@vmware.com> wrote:
>
> On 08/01/2019 04:56 PM, Charmaine Lee wrote:
> > This patch fixes a missing argument to CreateAtomicCmpXchg for older
> > version of LLVM.

Does this pass CI? please try a pull request.

We've got a bug open
https://bugs.freedesktop.org/show_bug.cgi?id=111102 but nobody has
worked out why CI builds fine against 3.4 etc.

Dave.