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

Reply via email to