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][aarch64] Fix target/pr77729 - missed optimization related to zero extension


On Wed, Sep 13, 2017 at 10:41:33PM +0000, Wilco Dijkstra wrote:
> Steve Ellcey wrote:
> 
> > And in aarch64 rtl expansion I see:
> >
> > (insn 10 9 11 (set (reg:QI 81)
> >         (mem:QI (reg/v/f:DI 80 [ string ]) [0 *string_9(D)+0 S1 A8])) "pr77729.c":3 -1
> >     (nil))​
> 
> Yes using QI/HI mode anywhere in the RTL seems perverse and incorrect given AArch64
> doesn't support registers narrower than 32 bits. Shift counts seem to have the same
> issue and expand into very complex sequences of ANDs with subreg - and nobody seems
> to understand what subreg really means...

Right, just use SImode for shift counts and life is so much brighter.

> My feeling is that we should only use SI/DI mode in patterns and aggressively widen all
> 8/16-bit operations to SI mode (which is what C requires anyway).

You don't need to do anything for this even, just don't define any
operations on smaller modes (other than mov and the extends, and the
few operations you perhaps actually do have).


Segher


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