http://llvm.org/bugs/show_bug.cgi?id=19428

            Bug ID: 19428
           Summary: intrinsic function __sync_lock_test_and_set does not
                    generate code for int128
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Test case:

__int128 tas128(volatile __int128 *ptr, __int128 new_value)
{
    return __sync_lock_test_and_set(ptr, new_value);
}

clang -mcx16 atomic.c && nm atomic.o

Shows undefined external symbol for __sync_lock_test_and_set_16

Same code with int64_t works fine; inline code for
__sync_lock_test_and_set_8 is generated.

On gcc-4.8, the 128-bit atomic operation does generate assembly
to use cmpxchg16b as hoped.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to