On Thu, Jul 09, 2015 at 10:13:49PM +0200, Uros Bizjak wrote:
> I was under impression that peephole2 pass doesn't see subregs of hard
> regs (all x86 predicates are written in this way). Even documentation
> somehow agrees with this:
> 
> '(subreg:M1 REG:M2 BYTENUM)'
> 
>     'subreg' expressions are used to refer to a register in a machine
>     mode other than its natural one, or to refer to one register of a
>     multi-part 'reg' that actually refers to several registers.
> 
>     Each pseudo register has a natural mode.  If it is necessary to
>     operate on it in a different mode, the register must be enclosed in
>     a 'subreg'.
> 
>     There are currently three supported types for the first operand of
>     a 'subreg':
> 
> [...]
> 
>        * hard registers It is seldom necessary to wrap hard registers
>          in 'subreg's; such registers would normally reduce to a single
>          'reg' rtx.  This use of 'subreg's is discouraged and may not
>          be supported in the future.
> 
> So, I'd say that generating naked SUBREG after reload should be
> avoided and gen_lowpart should be used in the code above.

There is also:
  emit_insn (gen_sse2_loadld (operands[3], CONST0_RTX (V4SImode),
                              gen_rtx_SUBREG (SImode, operands[1], 0)));
  emit_insn (gen_sse2_loadld (operands[4], CONST0_RTX (V4SImode),
                              gen_rtx_SUBREG (SImode, operands[1], 4)));
in some splitters (also post-reload).

        Jakub

Reply via email to