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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
CSEing inline-asm with multiple output is not going to be optimized. 

Just write this in C:
A myDivMod1(U const& a, U const& b)
{
        A result;
        result.quo = a/b;
        result.rem = a%b;
        return result;
}

Provides:
myDivMod1(unsigned long const&, unsigned long const&):
.LFB5:
        .cfi_startproc
        mov     rax, QWORD PTR [rdi]
        xor     edx, edx
        div     QWORD PTR [rsi]
        ret

Which is exactly what you want.

Reply via email to