[Bug target/97437] builtins subcarry and addcarry still not generate the right code. Not get optimized to immediate value

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 15 15:20:28 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97437

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I don't think it is really possible, because there is nothing magic about the
operands of the comparison, it can be done in both CCmode or CCCmode.  The
problem is that during simplification combiner takes that comparison apart and
recreates a new one with SELECT_CC_MODE determined one; what really matters is
the previous mode the comparison was using, or perhaps what the flags user
uses.
So, if there e.g. was a SELECT_CC_MODE alternative that would be passed also
either the earlier mode of the comparison that is being simplified, or the df
use of thee CC*mode setter, then it could decide based on that.


More information about the Gcc-bugs mailing list