[llvm-bugs] [Bug 26926] New: unsupported call to function _Z14atomic_cmpxchgPU3AS1Vjjj

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 12 09:14:03 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26926

            Bug ID: 26926
           Summary: unsupported call to function
                    _Z14atomic_cmpxchgPU3AS1Vjjj
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: OpenCL
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rivanvx at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

When trying to compile an OpenCL kernel using atomic_cmpxchg() (e.g. one used
in GROMACS [1]), one gets the following error:

<unknown>:0:0: in function nbnxn_kernel_ElecEw_VdwLJ_F_opencl void (i32,
%struct.cl_nbparam_params*, <4 x float> addrspace(1)*, float addrspace(1)*,
float addrspace(1)*, float addrspace(1)*, float addrspace(1)*, i32
addrspace(1)*, float addrspace(1)*, float addrspace(2)*, float addrspace(2)*,
float addrspace(2)*, %struct.nbnxn_sci_t addrspace(1)*, %struct.nbnxn_cj4_t
addrspace(1)*, %struct.nbnxn_excl_t addrspace(1)*, i32, <4 x float>
addrspace(3)*, float addrspace(1)*): unsupported call to function
_Z14atomic_cmpxchgPU3AS1Vjjj

This is a regression. I bisected it down to the following commit:

commit a1ba3c7ed29f02fe3806b662cb8d8201d8e918a2
Author: John McCall <rjmccall at apple.com>
Date:   Tue Mar 1 22:18:03 2016 +0000

    Mangle extended qualifiers in the proper order and mangle the
    ARC ownership-convention function type modifications.

    According to the Itanium ABI, vendor extended qualifiers are
    supposed to be mangled in reverse-alphabetical order before
    any CVR qualifiers.  The ARC function type conventions are
    plausibly order-significant (they are associated with the
    function type), which permits us to ignore the need to correctly
    inter-order them with any other vendor qualifiers on the parameter
    and return types.

    Implementing these rules correctly is technically an ABI break.
    Apple is comfortable with the risk of incompatibility here for
    the ARC features, and I believe that address-space qualification
    is still uncommon enough to allow us to adopt the conforming
    rule without serious risk.  Still, targets which make heavy
    use of address space qualification may want to revert to the
    non-conforming order.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262414
91177308-0d34-0410-b5e6-96231b3b80d8

[1] http://www.gromacs.org/

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160312/934a040a/attachment-0001.html>


More information about the llvm-bugs mailing list