This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/43892] PowerPC suboptimal "add with carry" optimization
- From: "segher at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 18 Jan 2015 22:53:53 +0000
- Subject: [Bug target/43892] PowerPC suboptimal "add with carry" optimization
- Auto-submitted: auto-generated
- References: <bug-43892-4 at http dot gcc dot gnu dot org/bugzilla/>
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.