This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Handle andn and ~ in 32-bit stv pass (PR target/70322)


On Fri, Dec 2, 2016 at 5:11 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Fri, Dec 2, 2016 at 3:21 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>> Hi!
>>
>> While the https://gcc.gnu.org/ml/gcc-patches/2016-01/msg01087.html
>> added *andndi3_doubleword, I don't understand how it can actually work.
>> The problem is that this pattern is for combine, and needs combining
>> of DImode NOT setter with DImode AND user.  But there is no DImode
>> pattern for one_cmpldi2, so it is lowered early into two one_cmplsi2
>> patterns and I can't see how combine would be able to figure stuff out from
>> that.
>>
>> This patch:
>> 1) adds one_cmpldi2 pattern for stv purposes (which splits into two
>>    one_cmplsi2 after reload)
>> 2) teaches the 32-bit stv pass to handle NOT (as xor all-ones)
>> 3) renames the old *andndi3_doubleword to *andndi3_doubleword_bmi, as it
>>    is for -mbmi only, and adds another *andndi3_doubleword pattern that is
>>    meant to live just from combine till the stv pass, or worse case till
>>    following split1 pass when it is split back into not followed by and;
>>    this change makes it possible to use pandn in stv pass, even without
>>    -mbmi
>
> Please use attached (lightly tested) patch to implement point 3)
> above. The patch splits insn after reload, as is the case with all STV
> patterns.

Now attached for real.

Uros.

Attachment: p.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]