This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/86455] var-tracking mishandles pre_dec
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Jul 2018 17:37:53 +0000
- Subject: [Bug debug/86455] var-tracking mishandles pre_dec
- Auto-submitted: auto-generated
- References: <bug-86455-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86455
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Hmm, even more obvious. We push bx to argp - 24:
...
ORIGINAL:
(insn/f 26 3 27 2 (set (mem:DI (pre_dec:DI (reg/f:DI 7 sp)) [0 S8 A8])
(reg:DI 3 bx)) "clztest.c":12 61 {*pushdi2_rex64}
(expr_list:REG_DEAD (reg:DI 3 bx)
(nil)))
ADJUSTED:
(insn/f 26 3 27 2 (parallel [
(set (mem:DI (plus:DI (reg/f:DI 16 argp)
(const_int -24 [0xffffffffffffffe8])) [0 S8 A8])
(reg:DI 3 bx))
(set (reg/f:DI 7 sp)
(plus:DI (reg/f:DI 16 argp)
(const_int -24 [0xffffffffffffffe8])))
]) "clztest.c":12 61 {*pushdi2_rex64}
(expr_list:REG_DEAD (reg:DI 3 bx)
(nil)))
...
but pop bx from argp - 16:
...
ORIGINAL:
(insn/f 29 28 30 2 (set (reg:DI 3 bx)
(mem:DI (post_inc:DI (reg/f:DI 7 sp)) [0 S8 A8])) "clztest.c":17 71
{*popdi1}
(expr_list:REG_CFA_ADJUST_CFA (set (reg/f:DI 7 sp)
(plus:DI (reg/f:DI 7 sp)
(const_int 8 [0x8])))
(nil)))
ADJUSTED:
(insn/f 29 28 30 2 (parallel [
(set (reg:DI 3 bx)
(mem:DI (plus:DI (reg/f:DI 16 argp)
(const_int -16 [0xfffffffffffffff0])) [0 S8 A8]))
(set (reg/f:DI 7 sp)
(plus:DI (reg/f:DI 16 argp)
(const_int -8 [0xfffffffffffffff8])))
]) "clztest.c":17 71 {*popdi1}
(expr_list:REG_CFA_ADJUST_CFA (set (reg/f:DI 7 sp)
(plus:DI (reg/f:DI 7 sp)
(const_int 8 [0x8])))
(nil)))
...