[libcxx-commits] [PATCH] D119246: [libcxx][AIX][PowerPC] Disable workaround for PR31864 on powerpc

Kai Luo via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 10 01:17:43 PST 2022


lkail added a comment.

In D119246#3308055 <https://reviews.llvm.org/D119246#3308055>, @ldionne wrote:

> Sorry, I don't quite understand. Did we fix the underlying issue in Clang (https://github.com/llvm/llvm-project/issues/31212) or did we not?

It looks not fixed or regressed, clang's output for i686(and also i586) is still **inconsistent** with gcc's.

  gcc -march=i686 -m32 -dM -E -x c /dev/null|grep LLONG_LOCK
  #define __GCC_ATOMIC_LLONG_LOCK_FREE 2
  gcc -v
  gcc version 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)
  
  clang -march=i686 -m32 -dM -E -x c /dev/null|grep LLONG_LOCK
  #define __CLANG_ATOMIC_LLONG_LOCK_FREE 1
  #define __GCC_ATOMIC_LLONG_LOCK_FREE 1
  clang -v
  clang version 15.0.0 (git://github.com/llvm/llvm-project.git 1831cbd9d4174a93d4017e510ecf0f840af5f7d6)

The problem here is we expect clang defined `__CLANG_ATOMIC_LLONG_LOCK_FREE` and `__GCC_ATOMIC_LLONG_LOCK_FREE` to be 2 for x86 CPU >= i586. This workaround is still required for x86 CPU >= i586.

Hi @craig.topper , you mentioned

> This is needed to get the LLONG_LOCK_FREE macro to be 2 on i586 and greater.

in https://reviews.llvm.org/D59566#1437512. Do you have plan currently to get it fixed?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119246/new/

https://reviews.llvm.org/D119246



More information about the libcxx-commits mailing list