https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78791
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-12-14 CC| |jakub at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Testcase transformed into something I can grok: __attribute__((used, noinline, noclone)) unsigned long long foo (unsigned long long x, unsigned long long y, unsigned long long z) { unsigned long long a = x / y; unsigned long long b = x % y; a |= z; b ^= z; return a + b; } int main () { if (foo (64, 7, 0) != 10 || foo (28, 3, 2) != 14) __builtin_abort (); return 0; } Indeed, the (mem/c:DI (plus:SI (reg/f:SI 20 frame) (const_int -8 [0xfffffffffffffff8])) [0 S8 A64]) stack slot holds one of the two return values during the call (returned by reference), and the stv2 pass reuses the same slot for storing the other DImode return value (from %eax:%edx) into the stack, so that it can be loaded into a SSE register, before the value from the call in the [frame-8] memory slot is loaded.