[Bug target/16798] PowerPC - Opportunity to use recording form instruction.
--- Comment #6 from bje at gcc dot gnu dot org 2009-05-14 03:04 --- Still present in GCC (GNU) 4.5.0 20090513 (experimental) [trunk revision 147498]. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16798
[Bug target/16798] PowerPC - Opportunity to use recording form instruction.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16798 Segher Boessenkool changed: What|Removed |Added CC||segher at gcc dot gnu.org --- Comment #7 from Segher Boessenkool --- Combine starts with insn_cost 4 for11: {r122:DI=r126:DI>>0x34;clobber ca:DI;} REG_DEAD r126:DI REG_UNUSED ca:DI insn_cost 8 for12: r127:DI=[unspec[`*.LC1',%2:DI] 46] REG_EQUAL `j' insn_cost 4 for13: [r127:DI]=r122:DI REG_DEAD r127:DI insn_cost 4 for16: r128:CC=cmp(r122:DI,0) REG_DEAD r122:DI and we want 11 and 16 combined (later passes put 16 earlier btw). But combine does not try to combine anything into 16: the first use of r122 as set in insn 11 is insn 13, not insn 16, and 11+13 does not combine. But 11+13+16 is not tried. Maybe we should?
[Bug target/16798] PowerPC - Opportunity to use recording form instruction.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16798 --- Comment #9 from Segher Boessenkool --- With all three patches together (Peter's, mine, Jakub's), I get a code size increase of only 0.047%, much more acceptable. Now looking what that diff really *is* :-)
[Bug target/16798] PowerPC - Opportunity to use recording form instruction.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16798 --- Comment #8 from Segher Boessenkool --- This is the same problem as PR88233.
[Bug target/16798] PowerPC - Opportunity to use recording form instruction.
--- Comment #5 from pinskia at gcc dot gnu dot org 2006-04-08 02:20 --- I should note that there are some PPC cores where most recording are microcoded. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org GCC build triplet|powerpc64-linux | GCC host triplet|powerpc64-linux | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16798
[Bug target/16798] PowerPC - Opportunity to use recording form instruction.
--- Comment #4 from bonzini at gnu dot org 2006-02-06 14:06 --- More precisely, combine is attempting to do instruction selection, and in the case of this bug it cannot. A similar ARM test case is int f (int a, int b) { int s = a - b; int t = a < b ? a : s; x = s; y = t; } which should be something like (pseudo-assembly) rsbs s, b, a str [x], s movlt s, a str [y], t it is possible to teach the combiner about this reduced testcase, but it won't match in the full testcase from which this was extracted, because s is used between its definition and the definition of t. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16798
[Bug target/16798] PowerPC - Opportunity to use recording form instruction.
--- Comment #3 from pinskia at gcc dot gnu dot org 2005-11-02 17:16 --- All P1 enhancements not targeted towards 4.1, moving to P5. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Priority|P1 |P5 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16798
[Bug target/16798] PowerPC - Opportunity to use recording form instruction.
-- What|Removed |Added Keywords||missed-optimization Last reconfirmed|2004-08-01 00:54:58 |2004-10-31 04:58:03 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16798
[Bug target/16798] PowerPC - Opportunity to use recording form instruction.
--- Additional Comments From nathan at gcc dot gnu dot org 2004-11-09 12:25 --- The problem here is that combine only combines chains of instructions that have no other uses of the intermediate results. In this case, the intermediate result is stored into a global variable. One solution would be to add a peephole, but that would only trigger when (a) the shift and compare were adjacent, and (b) the compare used CR0. You'd also need peepholers for all the instructions that can implicitly set CR0. Really combine, which is a generic peepholer, needs some kind of templatizing on the target machine. It currently functions by generating promising patterns and then seeing if they exist. This is wasteful, in that it generates many patterns that don't exist on the particular target, and it is blind in that it doesn't spot any special cases the target might have (like this case). What's needed is something like pre-reg-alloc peepholes. That of course would be a large amount of work. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16798