This is the mail archive of the gcc@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]

Re: GCC question.


> The combiner doesn't spot the optimisation. The reg:DI 170 contains the 0xffff,
> which the compiler should know as it just put it there! Also, the REG_EQUAL
> note shows that the discarding of the top 48 bits could also be considered.
> 
> So my question is:
> i)  What is stopping the combination in the second case?

Combine can only handle up to three instructions at a time.
And it does not consider take advantage of REG_EQUAL notes.

> ii) Is there in fact some standard way of doing this masking operation which
> would not incur this problem?

No, but there are two nonstandard ways: you could use a clobber in the
insn pattern and a post-reload splitter, or a peephole2 pattern.


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