This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19653] x87 reg allocated for constants for -mfpmath=sse
- From: "paolo dot bonzini at lu dot unisi dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Sep 2005 06:52:06 -0000
- Subject: [Bug target/19653] x87 reg allocated for constants for -mfpmath=sse
- References: <20050127083359.19653.uros@kss-loka.si>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From paolo dot bonzini at lu dot unisi dot ch 2005-09-21 06:51 -------
Subject: Re: x87 reg allocated for constants for -mfpmath=sse
>Note that in this pattern cost computation of MMX_REGS are all ignored ('*' in front of y). So, the cost
>which is computed is for 'r' which is GENERAL_REGS. This cost is too high and eventually results in
>memory cost to be lower than register cost. I tried the following simple patch as experiment and got all
>the performance back (it is now comparable with 4.0). Note that in this patch, I removed the '*' in the
>2nd alternative so cost of keeping the operand in mmx_regs class is factored in. This resulted in a
>lower cost than that of memory. Is this the way to go? This is just an experiment which seems to work.
>
>
I think it makes sense. The x86 back-end is playing too many tricks
(such as the # classes) with the register allocator and regclass
especially, and they are biting back.
Still, I'd rather hear from an expert as to why the classes were written
like this.
Paolo
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19653