On Thu, Sep 19, 2019 at 5:43 PM Uros Bizjak <ubiz...@gmail.com> wrote:
>
> On Thu, Sep 19, 2019 at 5:30 PM Richard Biener <rguent...@suse.de> wrote:
> >
> >
> > Boostrapped and tested on x86_64-unknown-linux-gnu.
> >
> > OK?
>
> OK.

Hm, something is not working correctly here. For the testcase, I get:

main:
        vmovq   %xmm0, %xmm0
        vpxor   %xmm1, %xmm1, %xmm1
        vpsubq  %xmm0, %xmm1, %xmm1
        vpmaxsq %xmm1, %xmm0, %xmm0
        vmovq   %xmm0, %rax
        movabsq %rax, .LC0+11532131096
        xorl    %eax, %eax
        ret

The first insn uses uninitialized reg.

The _.stv pass misses initialization of r94 reg:

(note 2 3 7 2 NOTE_INSN_FUNCTION_BEG)
(note 7 2 24 2 NOTE_INSN_DELETED)
(insn 24 7 8 2 (set (subreg:V2DI (reg:DI 93) 0)
        (vec_concat:V2DI (reg:DI 94)
            (const_int 0 [0]))) "pr67271.c":11:17 -1
     (nil))

Uros.

> Thanks,
> Uros.
>
> > Thanks,
> > Richard.
> >
> > 2019-09-19  Richard Biener  <rguent...@suse.de>
> >
> >         PR target/91814
> >         * config/i386/i386-features.c (gen_gpr_to_xmm_move_src):
> >         Force operand to a register if it isn't nonimmediate_operand.
> >
> > Index: gcc/config/i386/i386-features.c
> > ===================================================================
> > --- gcc/config/i386/i386-features.c     (revision 275959)
> > +++ gcc/config/i386/i386-features.c     (working copy)
> > @@ -668,10 +668,13 @@ scalar_chain::emit_conversion_insns (rtx
> >  static rtx
> >  gen_gpr_to_xmm_move_src (enum machine_mode vmode, rtx gpr)
> >  {
> > +  if (!nonimmediate_operand (gpr, GET_MODE_INNER (vmode)))
> > +    gpr = force_reg (GET_MODE_INNER (vmode), gpr);
> >    switch (GET_MODE_NUNITS (vmode))
> >      {
> >      case 1:
> > -      return gen_rtx_SUBREG (vmode, gpr, 0);
> > +      /* We are not using this case currently.  */
> > +      gcc_unreachable ();
> >      case 2:
> >        return gen_rtx_VEC_CONCAT (vmode, gpr,
> >                                  CONST0_RTX (GET_MODE_INNER (vmode)));

Reply via email to