]> git.ipfire.org Git - thirdparty/gcc.git/commit
Clean up by_pieces_ninsns
authorHaochen Gui <guihaoc@gcc.gnu.org>
Fri, 24 Nov 2023 09:14:46 +0000 (17:14 +0800)
committerHaochen Gui <guihaoc@gcc.gnu.org>
Fri, 24 Nov 2023 09:16:18 +0000 (17:16 +0800)
commite377a340b34de1b06f2825691e45a33affcb4c2d
treebd8073246371f62a4229edc51c5372a263f4c294
parent9a96a9e45b421436ca93efadba0f1901f12fb6c0
Clean up by_pieces_ninsns

The by pieces compare can be implemented by overlapped operations. So
it should be taken into consideration when doing the adjustment for
overlap operations.  The mode returned from
widest_fixed_size_mode_for_size is already checked with mov_optab in
by_pieces_mode_supported_p called by widest_fixed_size_mode_for_size.
So it is no need to check mov_optab again in by_pieces_ninsns.  The
patch fixes these issues.

gcc/
* expr.cc (by_pieces_ninsns): Include by pieces compare when
do the adjustment for overlap operations.  Replace mov_optab
checks with gcc assertion.
gcc/expr.cc