On Tue, Jul 15, 2014 at 10:25 AM, Ilya Enkovich <enkovich....@gmail.com> wrote:
>>>>> Also fully restrict xmm8-15 does not seem right. It is just costly >>>>> but not fully disallowed. >>>> >>>> As said earlier, you can try "Ya*x" as a constraint. >>> >>> I tried it. It does not seem to affect allocation much. I do not see >>> any gain on targeted tests. >> >> Strange, because the documentation claims: >> >> '*' >> Says that the following character should be ignored when choosing >> register preferences. '*' has no effect on the meaning of the >> constraint as a constraint, and no effect on reloading. For LRA >> '*' additionally disparages slightly the alternative if the >> following character matches the operand. >> >> Let me rethink this a bit. Prehaps we could reconsider Jakub's >> proposal with "Ya,!x" (with two alternatives). IIRC this approach was >> needed for some MMX alternatives, where we didn't want RA to allocate >> a MMX register when the value could be passed in integer regs, but the >> value was still allowed in MMX register. > > That's is what my patch already does, but with '?' instead of '!'. Yes, I know. The problem is, that Ya*x type conditional allocation worked OK in the past for "not preferred, but still alowed regclass" registers, There are several patterns in i386.md that live by this premise, including movsf_internal and movdf_internal. If this approach doesn't work anymore, then we have to either figure out what is the reason, or invent a new strategy that will be applicable to all cases. Can you please post a small test that illustrates the case where Ya,!x works, but Ya*x doesn't? I have added Vlad to CC for his opinion on this matter. This is clearly a RA issue that has to be resolved before your patch is committed. Thanks, Uros.