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] Improve andq $0xffffffff, %reg handling (PR target/53110)


On Mon, Apr 30, 2012 at 3:34 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Mon, Apr 30, 2012 at 3:10 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>> On Mon, Apr 30, 2012 at 02:54:05PM +0200, Uros Bizjak wrote:
>>> > My recent changes to zero_extend expanders should handle this
>>> > automatically, and will undo generation of zero_extend pattern. Please
>>> > see zero_extend<mode>si2_and expander, and how it handles
>>> > TARGET_ZERO_EXTEND_WITH_AND targets.
>>>
>>> Attached patch implements this idea. In addition, it fixes the
>>> splitter to not change output mode of zero_extension from HImode and
>>> QImode from DImode to SImode. Although they generate the same
>>> instruction, I think we should better keep original mode here.
>>
>> Thanks. ?I was trying this morning slightly different patch for the same,
>> but strangely it failed bootstrap, and didn't get around to analysing
>> why a mem store had (zero_extend (subreg (reg))) on a RHS.
>
> Maybe it was due to slightly wrong splitter? I was changing both, the
> expander and the splitter in parallel, and didn't see any failure you
> mentioned...

In fact, the problem was already in your original patch. There was a
check for REG_P (operands[1]), but it should check for REG_P
(operands[0]). There is no zero_extended store, only load.

Uros.


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