https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70079
Segher Boessenkool <segher at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |segher at gcc dot gnu.org --- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> --- (In reply to Paolo Bonzini from comment #0) > movq %rdi, %rcx > leaq 8(%rdi), %rdi > andq $-8, %rdi ;; 1 > subq %rdi, %rcx ;; 2 > subq %rcx, %rsi ;; 3 > addl $512, %ecx ;; 4 > shrl $3, %ecx ;; 5 > > At 1, rdi = (a + 8) & ~7 = a & ~7 + 8 = a + 8 - (a & 7) > At 2, rcx = a - rdi = a - a - 8 + (a & 7) = (a & 7) - 8 > At 3, rsi = b - (a & 7) + 8 > At 4, rcx = (a & 7) + 504, which is between 504 and 511 > At 5, rcx is always 31. It would seem %rsi is still alive after this, so the %rcx input to "3" has to be computed, which takes more than one insn so there is no way combine will be able to handle this.