https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81763
--- Comment #32 from Manuel Lauss <manuel.lauss at googlemail dot com> --- (In reply to Uroš Bizjak from comment #31) > (In reply to Uroš Bizjak from comment #30) > > So, I'll bootstrap: > > Maybe we can also allow &r <- (r,r) for BMI, to be safe (c.f. comment #23): > > (define_insn "*andndi3_doubleword" > [(set (match_operand:DI 0 "register_operand" "=r,&r") > (and:DI > (not:DI (match_operand:DI 1 "register_operand" "0,r")) > (match_operand:DI 2 "nonimmediate_operand" "rm,rm"))) > (clobber (reg:CC FLAGS_REG))] > "!TARGET_64BIT && TARGET_STV && TARGET_SSE2" > "#" > [(set_attr "isa" "*,bmi")]) > > Manuel, can you please test this pattern? Seems to work as well: [...] b1: c4 e2 73 f7 d2 shrx %ecx,%edx,%edx b6: 0f 45 c2 cmovne %edx,%eax b9: 0f 45 d5 cmovne %ebp,%edx bc: c4 e2 68 f2 54 df 04 andn 0x4(%edi,%ebx,8),%edx,%edx c3: 89 d1 mov %edx,%ecx c5: c4 e2 78 f2 04 df andn (%edi,%ebx,8),%eax,%eax cb: 09 c1 or %eax,%ecx [...]