https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81763
--- Comment #23 from Uroš Bizjak <ubizjak at gmail dot com> ---
The above patch builds on the promise, that with (=r,r,r) alternative, the
register allocator won't allocate (=r1,=r2) = ~(r0,r1) & (r2,r3). This would
again clobber the r1 too early:
r1 = ~r0 & r2
r2 = ~r1 & r3
The safest choice of the pattern would be:
(define_insn "*andndi3_doubleword"
[(set (match_operand:DI 0 "register_operand" "=r,&r")
(and:DI
(not:DI (match_operand:DI 1 "register_operand" "0,0"))
(match_operand:DI 2 "nonimmediate_operand" "rm,rm")))
(clobber (reg:CC FLAGS_REG))]
"!TARGET_64BIT && TARGET_STV && TARGET_SSE2"
"#"
[(set_attr "isa" "bmi,*")])
(The earlyclobber of non-BMI case is needed due to separate not insn).