This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR rtl-optimization/28243
- From: Richard Sandiford <richard at codesourcery dot com>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Sep 2006 17:42:10 +0100
- Subject: Re: Fix PR rtl-optimization/28243
- References: <200609122356.08225.ebotcazou@libertysurf.fr>
Eric Botcazou <ebotcazou@libertysurf.fr> writes:
> It's a regression (reported by the Gentool folks) at -O2 -ftracer -fPIC
> present on 4.1 branch for x86. The dataflow verification code in flow.c
> (verify_local_live_at_start) stops the compiler during life2 because the
> lifetime of pseudo 59 has been wrongly extended by the combiner.
>
> Before combine:
>
> (insn 17 80 79 1 (set (reg/v:DF 59 [ sa.53 ])
> (float_extend:DF (mem/u/c/i:SF (plus:SI (reg:SI 3 bx)
> (const:SI (unspec:SI [
> (symbol_ref/u:SI ("*.LC1") [flags 0x2])
> ] 1))) [7 S4 A32]))) 86 {*extendsfdf2_i387} (nil)
> (expr_list:REG_EQUAL (const_double:DF 0 [0x0] 0.0 [0x0.0p+0])
> (nil)))
>
> (insn 79 17 83 1 (set (reg:DF 74)
> (float_extend:DF (mem/u/c/i:SF (plus:SI (reg:SI 3 bx)
> (const:SI (unspec:SI [
> (symbol_ref/u:SI ("*.LC2") [flags 0x2])
> ] 1))) [7 S4 A32]))) 86 {*extendsfdf2_i387} (nil)
> (expr_list:REG_EQUAL (const_double:DF -1275068416 [0xb4000000] 3.6e+2
> [0x0.b4p+9])
> (nil)))
>
> (insn 83 79 84 1 (set (reg/v:DF 60 [ sa.52 ])
> (reg/v:DF 59 [ sa.53 ])) 64 {*movdf_integer} (insn_list:REG_DEP_TRUE
> 17 (nil))
> (expr_list:REG_DEAD (reg/v:DF 59 [ sa.53 ])
> (expr_list:REG_EQUAL (const_double:DF 0 [0x0] 0.0 [0x0.0p+0])
> (nil))))
>
> (insn 84 83 87 1 (set (reg/v:DF 59 [ sa.53 ])
> (reg/v:DF 58 [ sa.54 ])) 64 {*movdf_integer} (nil)
> (expr_list:REG_EQUAL (const_double:DF -1275068416 [0xb4000000] 9.0e+1
> [0x0.b4p+7])
> (nil)))
>
> (insn 87 84 88 1 (parallel [
> (set (reg/f:SI 7 sp)
> (plus:SI (reg/f:SI 7 sp)
> (const_int -8 [0xfffffff8])))
> (clobber (reg:CC 17 flags))
> ]) 148 {*addsi_1} (nil)
> (expr_list:REG_UNUSED (reg:CC 17 flags)
> (nil)))
>
> (insn 88 87 89 1 (set (mem/i:DF (pre_dec:SI (reg/f:SI 7 sp)) [0 S8 A64])
> (reg/v:DF 58 [ sa.54 ])) 62 {*pushdf_integer} (insn_list:REG_DEP_TRUE
> 87 (nil))
> (nil))
>
> (insn 89 88 90 1 (set (mem/i:DF (pre_dec:SI (reg/f:SI 7 sp)) [0 S8 A64])
> (reg/v:DF 60 [ sa.52 ])) 62 {*pushdf_integer} (insn_list:REG_DEP_TRUE
> 83 (nil))
> (expr_list:REG_DEAD (reg/v:DF 60 [ sa.52 ])
> (nil)))
>
> [...]
> ;; End of basic block 1, registers live:
> 3 [bx] 6 [bp] 7 [sp] 16 [argp] 20 [frame] 58 59 61 73 74
>
>
> After combine:
>
> (note 17 80 79 1 NOTE_INSN_DELETED)
>
> (insn 79 17 83 1 (set (reg:DF 74)
> (float_extend:DF (mem/u/c/i:SF (plus:SI (reg:SI 3 bx)
> (const:SI (unspec:SI [
> (symbol_ref/u:SI ("*.LC2") [flags 0x2])
> ] 1))) [7 S4 A32]))) 86 {*extendsfdf2_i387} (nil)
> (expr_list:REG_EQUAL (const_double:DF -1275068416 [0xb4000000] 3.6e+2
> [0x0.b4p+9])
> (nil)))
>
> (note 83 79 84 1 NOTE_INSN_DELETED)
>
> (note 84 83 87 1 NOTE_INSN_DELETED)
>
> (insn 87 84 88 1 (parallel [
> (set (reg/f:SI 7 sp)
> (plus:SI (reg/f:SI 7 sp)
> (const_int -8 [0xfffffff8])))
> (clobber (reg:CC 17 flags))
> ]) 148 {*addsi_1} (nil)
> (expr_list:REG_UNUSED (reg:CC 17 flags)
> (nil)))
>
> (insn 88 87 89 1 (set (mem/i:DF (pre_dec:SI (reg/f:SI 7 sp)) [0 S8 A64])
> (reg/v:DF 58 [ sa.54 ])) 62 {*pushdf_integer} (insn_list:REG_DEP_TRUE
> 87 (nil))
> (nil))
>
> (insn 89 88 90 1 (set (mem/i:DF (pre_dec:SI (reg/f:SI 7 sp)) [0 S8 A64])
> (const_double:DF 0 [0x0] 0.0 [0x0.0p+0])) 62 {*pushdf_integer} (nil)
> (nil))
So the combination used the REG_EQUAL note attached to insn 83? If so,
this looks very similar to PR rtl-optimization/25514 (itself fixed by
PR rtl-optimization/27736), which is only on mainline at the moment.
You only mention 4.1 in your message above so I just wanted to check
that whether or not this is a separate problem, or whether a backport
of 25514/27736 would have worked.
refs:
http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01169.html
http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01169.html
Richard