GCC question.
Joern Rennecke
amylaar@redhat.com
Fri Aug 24 17:16:00 GMT 2001
> 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.
More information about the Gcc
mailing list