https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80799

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
There is something going on in the middle end, the problematic alternatives of
the relevant patterns:

        movq    (%ebx), %mm0    # 6     *movv2si_internal/8     [length = 3]
        movq2dq %mm0, %xmm1     # 13    vec_concatv2di/7        [length = 4]
        pcmpeqd %xmm1, %xmm0    # 17    *sse2_eqv4si3/1 [length = 4]
        pmovmskb        %xmm0, %eax     # 18    sse2_pmovmskb   [length = 4]
        cmpl    $65535, %eax    # 20    *cmpsi_1/1      [length = 5]
        je      .L2     # 21    *jcc_1  [length = 2]
        call    _Z10dummy_callv # 23    *call   [length = 5]
        movq    (%ebx), %mm0    # 24    *movv2si_internal/8     [length = 3]
.L2:
        movq    %mm0, TRXPOS    # 29    *movv2si_internal/9     [length = 8]

are all decorated with "!".

(define_insn "*mov<mode>_internal"
  [(set (match_operand:MMXMODE 0 "nonimmediate_operand"
    "=r ,o ,r,r ,m ,?!y,!y,?!y,m  ,r   ,?!Ym,v,v,v,m,*x,*x,*x,m ,r
,Yi,!Ym,*Yi")
        (match_operand:MMXMODE 1 "vector_move_operand"
    "rCo,rC,C,rm,rC,C  ,!y,m  ,?!y,?!Yn,r   ,C,v,m,v,C ,*x,m ,*x,Yj,r
,*Yj,!Yn"))]

(define_insn "vec_concatv2di"
  [(set (match_operand:V2DI 0 "register_operand"
          "=Yr,*x,x ,v ,Yi,v ,!x,x,v ,x,x,v")
        (vec_concat:V2DI
          (match_operand:DI 1 "nonimmediate_operand"
          "  0, 0,x ,Yv,r ,vm,*y,0,Yv,0,0,v")
          (match_operand:DI 2 "vector_move_operand"
          "*rm,rm,rm,rm,C ,C ,C ,x,Yv,x,m,m")))]

I'm afraid this is all target can do to avoid (but still allow) certain
alternative.  The testcase works for gcc-6, and those patterns were not touched
for a long time.

Can someone please do a reghunt here?

Reply via email to