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] simplify-rtx: Handle truncate of extract


On Mon, Nov 28, 2016 at 03:00:16PM -0700, Jeff Law wrote:
> On 11/28/2016 02:55 PM, Segher Boessenkool wrote:
> >On Mon, Nov 28, 2016 at 01:56:10PM -0700, Jeff Law wrote:
> >>On 11/26/2016 04:19 PM, Segher Boessenkool wrote:
> >>>simplify_truncation changes the truncation of many operations into
> >>>the operation on the truncation.  This patch makes this code also
> >>>handle extracts.
> >>>
> >>>Tested on powerpc64-linux.  With this patch the rlwimi testcases work.
> >>>
> >>>Is this okay for trunk?
> >>The rlwimi tests?  Are you referring to ppu-intrinsics or something else?
> >
> >https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02672.html
> Ah, I don't see those in my tree yet. :-)

Because I haven't committed it yet, it fails without this patch ;-)

> >>Any chance this would help 15596?
> >
> >It doesn't help.  To fix PR15596 we need to have bitfields handled
> >better before (and/or during) expand.
> Noted.  Thanks.  Not that I think 15596 is all that important, but it 
> does taunt me every release -- it seems like we've got all stuff we need 
> in combine, but the APIs get in the way of optimizing it.

There are many related cases, we do a pretty bad job with bitfields.
There are some other PRs about this, bitfields as function args, for
example.

combine cannot handle most cases here: it will not often reorder things,
it can only handle very short sequences, and it does not know that padding
bits have unspecified contents, so it has to keep whatever is in there,
while it often is cheaper to just zero out padding fields, (but not always),
etc. etc. etc.


Segher


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