]> git.ipfire.org Git - thirdparty/gcc.git/commit
fab: Use a macro for the atomic/sync builtins case
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Tue, 23 Sep 2025 23:43:36 +0000 (16:43 -0700)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Fri, 3 Oct 2025 14:29:08 +0000 (07:29 -0700)
commitd7a3038e2be0bc6e29d077cd7e2534ef3048fd5c
tree157820e585bffe1f0784f06f7a2b3cfb38c062c7
parent6eff00d2fc3b709d27f7c3727168e1f8336246a5
fab: Use a macro for the atomic/sync builtins case

This is a small cleanup to make it easier to move this part of fab to
somewhere else. And it makes it easier to understand which builtins are being
used here and also less repeated code.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-ssa-ccp.cc (CASE_ATOMIC): New defined.
(CASE_ATOMIC_CMP0): New define.
(CASE_ATOMIC_BIT_TEST_AND): New defined.
(pass_fold_builtins::execute): Use CASE_ATOMIC, CASE_ATOMIC_CMP0,
and CASE_ATOMIC_BIT_TEST_AND.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
gcc/tree-ssa-ccp.cc