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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Ilya Enkovich from comment #3)
> (In reply to H.J. Lu from comment #0)
> > i386.md has
> > 
> > (define_insn_and_split "*andndi3_doubleword"
> >   [(set (match_operand:DI 0 "register_operand" "=r,r")
> >         (and:DI
> >           (not:DI (match_operand:DI 1 "register_operand" "r,r"))
> >           (match_operand:DI 2 "nonimmediate_operand" "r,m")))
> >    (clobber (reg:CC FLAGS_REG))]
> >   "TARGET_BMI && !TARGET_64BIT && TARGET_STV && TARGET_SSE"
> >   "#"
> > 
> > But it is never used:
> 
> gcc.target/i386/pr65105-5.c checks it actually works

STV converts

insn 24 23 25 4 (parallel [
            (set (reg:DI 103)
                (and:DI (reg:DI 89 [ _10 ])
                    (reg/v:DI 98 [ p2 ])))
            (clobber (reg:CC 17 flags))
        ])
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr65105-5.c:20
394 {*anddi3_doubleword}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))
(insn 25 24 26 4 (parallel [
            (set (reg:DI 104)
                (xor:DI (reg/v:DI 98 [ p2 ])
                    (reg:DI 103)))
            (clobber (reg:CC 17 flags))
        ])
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr65105-5.c:20
421 {*xordi3_doubleword}

to

(note 24 23 25 4 NOTE_INSN_DELETED)
(insn 25 24 26 4 (set (subreg:V2DI (reg:DI 104) 0)
        (and:V2DI (not:V2DI (subreg:V2DI (reg:DI 89 [ _10 ]) 0)) 
            (subreg:V2DI (reg/v:DI 98 [ p2 ]) 0)))
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr65105-5.c:20
3479 {*andnotv2di3}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))

It shouldn't require BMI and it doesn't handle "~x & y".

Reply via email to