This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/34452] Multiply-by-constant pessimation
- From: "rask at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2007 22:01:46 -0000
- Subject: [Bug target/34452] Multiply-by-constant pessimation
- References: <bug-34452-9218@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rask at gcc dot gnu dot org 2007-12-13 22:01 -------
In reply to comment #2 from Torbjorn Granlund:
> Another fix would perhaps be to teach synth_mult to understand that
> it's generating code for a 2.5 operand machine (one that can only
> do "a x= b", not "a = b x c", for some operation x). We should
> teach it that there will be moves inserted for sequences that rely
> on a source register twice (more or less).
The root cause of the problem is that ix86_rtx_cost() doesn't get an insn (or
at least a SET expression) to look at and therefore can't check the operands
and adjust the cost estimate accordingly.
--
rask at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34452