]> git.ipfire.org Git - thirdparty/gcc.git/commit
[ifcombine] improve reverse checking and operand swapping
authorAlexandre Oliva <oliva@adacore.com>
Fri, 24 Jan 2025 02:23:13 +0000 (23:23 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Fri, 24 Jan 2025 02:23:13 +0000 (23:23 -0300)
commita56122dea468bc9fc808adee44d788903ad9ff76
treefb5e66afddee2d6d553157d52a3c36fe138eab64
parent3f05d70389f523cf53f9b8fdf56570e8a6ecdb8b
[ifcombine] improve reverse checking and operand swapping

Don't reject an ifcombine field-merging opportunity just because the
left-hand operands aren't both reversed, if the second compare needs
to be swapped for operands to match.

Also mention that reversep does NOT affect the turning of range tests
into bit tests.

for  gcc/ChangeLog

* gimple-fold.cc (fold_truth_andor_for_ifcombine): Document
reversep's absence of effects on range tests.  Don't reject
reversep mismatches before trying compare swapping.
gcc/gimple-fold.cc