]> git.ipfire.org Git - thirdparty/gcc.git/commit
Move fold_single_bit_test to expr.cc from fold-const.cc
authorAndrew Pinski <apinski@marvell.com>
Fri, 19 May 2023 16:20:23 +0000 (16:20 +0000)
committerAndrew Pinski <apinski@marvell.com>
Sat, 20 May 2023 05:04:47 +0000 (05:04 +0000)
commit7bde4c3dcdecac82e080731fc8bb362e6c024628
treecbf302f6da748f79dcbe059acee91c3dbb4fe858
parent55914b016de8c8514c58eb59822677a69e44135c
Move fold_single_bit_test to expr.cc from fold-const.cc

This is part 1 of N patch set that will change the expansion
of `(A & C) != 0` from using trees to directly expanding so later
on we can do some cost analysis.

Since the only user of fold_single_bit_test is now
expand, move it to there.

gcc/ChangeLog:

* fold-const.cc (fold_single_bit_test_into_sign_test): Move to
expr.cc.
(fold_single_bit_test): Likewise.
* expr.cc (fold_single_bit_test_into_sign_test): Move from fold-const.cc
(fold_single_bit_test): Likewise and make static.
* fold-const.h (fold_single_bit_test): Remove declaration.
gcc/expr.cc
gcc/fold-const.cc
gcc/fold-const.h