This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/43892] PowerPC suboptimal "add with carry" optimization


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

--- Comment #23 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Do you know what addcc does?  PowerPC does not have any instruction
that behaves like it at all.  So it would have to expand to a big
fat sequence of instructions, that then hopefully are optimised to
something sane later.  Instead, the current code expands to something
sane immediately.

The problem for this testcase (as for all other similar "manual carry"
cases) is that we need to replace the carry in our original patterns
with (1 - carry).  There is no good way to do that in combine, we would
need to combine three insns, the first two of which are a parallel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]