[Bug target/88271] Omit test instruction after add
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 6 17:08:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88271
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC can handle these in the combiner, but for that needs the two instructions
(add, etc. or in this case left shift by 1) be in the same basic block as the
comparison. That is not the case here, during combine the shift by 1 is in one
bb, which jumps to another bb in which is the comparison, but that other bb is
preceded also by the bb with just val = data[level]; We only duplicate the
comparison late and we really can't use the combiner late after RA.
So, I'm afraid it is too hard to do anything here and the benefit would be
small.
More information about the Gcc-bugs
mailing list