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: "tege-gcc at swox dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2007 10:52:04 -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 #2 from tege-gcc at swox dot com 2007-12-13 10:52 -------
It does make sense to bluff somewhat about the costs of the few 3
operand instructions that we have:
lea
mul const, regx, regy
Exactly what cost to assign is not obvious. I think the nominal
cost - epsilon is probably better than the nominal cost - 1 + epsilon.
The latter is what Honza does.
But teaching synth_mult about 2.5 operandness might be the best way to
make constant multiplication code come out optimal. I'm not sure how
to do that, though. Peeking at the constraints flags? :-)
If I understand Honza right, he's trying to please reload more
than synth_mult with his tweak.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34452