https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120022
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[Optimization opportunity] |[Optimization opportunity] |Related with Bug 119917 and |Related with Bug 119917 and |Bug 120020 |120020 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note your inline-asm is still broken. asm ( "xor %[remainder], %[remainder] \n\t" "div %[divisor] \n\t" : [quotient] "=a"(result), [remainder] "=&d" (dummyRemainder) : [dividendLow] "a"(a), [divisor] "rm"(b) ); Is the corrected version. The reason you need an early clobber on remainder output is because you clobber it before use the input of divisor and divisor still can be assigned to rdx.