https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94516
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2020-04-07 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The problem is during postreload-gcse.c, which changed: @@ -4749,23 +4758,7 @@ Dataflow summary: (expr_list:SI (use (reg:SI 36 r8)) (expr_list:SI (use (reg:SI 37 r9)) (nil)))))))) -(insn 22 21 24 2 (parallel [ - (set (reg/f:DI 7 sp) - (plus:DI (reg/f:DI 7 sp) - (const_int 32 [0x20]))) - (clobber (reg:CC 17 flags)) - ]) "pr94516.c":6747:2 186 {*adddi_1} - (expr_list:REG_ARGS_SIZE (const_int 0 [0]) - (nil))) -(insn 24 22 25 2 (parallel [ - (set (reg/f:DI 7 sp) - (plus:DI (reg/f:DI 7 sp) - (const_int -8 [0xfffffffffffffff8]))) - (clobber (reg:CC 17 flags)) - ]) "pr94516.c":6747:2 186 {*adddi_1} - (expr_list:REG_ARGS_SIZE (const_int 8 [0x8]) - (nil))) -(insn 25 24 26 2 (set (mem:SI (pre_modify:DI (reg/f:DI 7 sp) +(insn 25 21 26 2 (set (mem:SI (pre_modify:DI (reg/f:DI 7 sp) (plus:DI (reg/f:DI 7 sp) (const_int -8 [0xfffffffffffffff8]))) [3 S4 A32]) (const_int 0 [0])) "pr94516.c":6747:2 46 {*pushsi2_rex64} ... @@ -4815,23 +4808,7 @@ Dataflow summary: (expr_list:SI (use (reg:SI 36 r8)) (expr_list:SI (use (reg:SI 37 r9)) (nil)))))))) -(insn 35 34 37 2 (parallel [ - (set (reg/f:DI 7 sp) - (plus:DI (reg/f:DI 7 sp) - (const_int 32 [0x20]))) - (clobber (reg:CC 17 flags)) - ]) "pr94516.c":6780:2 186 {*adddi_1} - (expr_list:REG_ARGS_SIZE (const_int 0 [0]) - (nil))) -(insn 37 35 38 2 (parallel [ - (set (reg/f:DI 7 sp) - (plus:DI (reg/f:DI 7 sp) - (const_int -8 [0xfffffffffffffff8]))) - (clobber (reg:CC 17 flags)) - ]) "pr94516.c":6780:2 186 {*adddi_1} - (expr_list:REG_ARGS_SIZE (const_int 8 [0x8]) - (nil))) -(insn 38 37 39 2 (set (mem:SI (pre_modify:DI (reg/f:DI 7 sp) +(insn 38 34 39 2 (set (mem:SI (pre_modify:DI (reg/f:DI 7 sp) (plus:DI (reg/f:DI 7 sp) (const_int -8 [0xfffffffffffffff8]))) [3 S4 A32]) (const_int -32 [0xffffffffffffffe0])) "pr94516.c":6780:2 46 {*pushsi2_rex64} ... @@ -4881,12 +4858,8 @@ Dataflow summary: (expr_list:SI (use (reg:SI 36 r8)) (expr_list:SI (use (reg:SI 37 r9)) (nil)))))))) -(insn 48 47 51 2 (parallel [ - (set (reg/f:DI 7 sp) - (plus:DI (reg/f:DI 7 sp) - (const_int 32 [0x20]))) - (clobber (reg:CC 17 flags)) - ]) "pr94516.c":6783:1 186 {*adddi_1} +(insn 48 47 51 2 (set (reg/f:DI 7 sp) + (reg/f:DI 40 r12 [84])) "pr94516.c":6783:1 66 {*movdi_internal} (expr_list:REG_ARGS_SIZE (const_int 0 [0]) (nil))) (insn 51 48 52 2 (parallel [ because cselib now provides the sp based equalities it didn't before. I believe the final value of sp is correct, there is r12 = rsp assignment in the prologue, but the problem is that by throwing away the intermediate sp adjustments in the calls in between the stack is misaligned. We have the csa pass for combining stack adjustments, perhaps postreload-gcse should just refrain from adjusting the stack pointer adjustments?