This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch][rfc] Hookize SMALL_REGISTER_CLASSES, make SSE register classes not small
On Wed, Dec 10, 2008 at 7:26 AM, Richard Guenther <rguenther@suse.de> wrote:
> On Wed, 10 Dec 2008, H.J. Lu wrote:
>
>> On Wed, Dec 10, 2008 at 6:53 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
>> > On Wed, Dec 10, 2008 at 2:38 AM, Michael Meissner
>> > <meissner@linux.vnet.ibm.com> wrote:
>> >> Back when I was at AMD, I often times thought about making
>> >> SMALL_REGISTER_CLASSES false for x86_64 bit (where you have more registers),
>> >> but I never got around to doing it.
>> >
>> > We tried it at SuSE a couple of years ago. It does not work. There
>> > are too many instructions that require special registers. But the SSE
>> > instructions don't have special requirements.
>> >
>> > That's exactly why I decided to try to make SMALL_REGISTER_CLASSES
>> > depend no machine mode. It's a safe bet that the compiler doesn't
>> > have to walk on eggs for a register in an SSE mode (and
>> > AFAIU-the-x86_64-instruction-set, also not for 64-bit integer
>> > instructions?).
>> >
>>
>> FWIW, we have Yz constraint for xmm0:
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38402
>
> Indeed. So the CPU folks start adding special register requirements
> again ... :/ That just means for x86_64 a safe bet is
> !TARGET_SSE4_1 && !TARGET_SSE4_2.
>
Some XMM0 requirement is removed in AVX, but not all. I think
it may be
!((TARGET_SSE4_1 && !TARGET_AVX) || TARGET_SSE4_2)
--
H.J.