[clang] [llvm] [clang-tools-extra] Add out-of-line-atomics support to GlobalISel (PR #74588)
Thomas Preud'homme via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 18 03:53:16 PST 2023
RoboTux wrote:
> > Not an expert on atomics, but why would we have a libcall for -O0 but not for O1 in the tests?
>
> I looked at it for the u?(min|max) and it seemed to boil down to the atomic expand pass being run at -O1 and above.
No sorry, it's not that it's only run at O1 and above, it's that the output is different. At O0 it keeps the cmpxchg whereas at O1 it changes the cmpxchg into a ldxr + stlxr intrinsics.
https://github.com/llvm/llvm-project/pull/74588
More information about the cfe-commits
mailing list