This is the mail archive of the
mailing list for the GCC project.
Re: PR/29798, def forward propagated even though it does not dominate use
- From: Roger Sayle <roger at eyesopen dot com>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 Nov 2006 20:41:44 -0700 (MST)
- Subject: Re: PR/29798, def forward propagated even though it does not dominate use
On Mon, 13 Nov 2006, Paolo Bonzini wrote:
> 2006-11-13 Paolo Bonzini <firstname.lastname@example.org>
> PR rtl-optimization/29798
> * fwprop.c (use_killed_between): Check that DEF_INSN dominates
> TARGET_INSN before any other check.
> (fwprop_init): Always calculate dominators.
> (fwprop_done): Always free them.
This is OK for mainline.
> * gcc.c-torture/execute/pr29798.c: New.
Re: Andrew Pinski's comments, although it would be nice to have a
non-floating point testcase, I don't think its an issue in this
case; the floating values aren't used to control the number of
iterations of the loop, which is controlled by the integer variable
i. So although the loop "looks" like its determining a rate of
convergence value "beta" and should stop when this reaches 1.0,
in actuality that computed value isn't important for this test.
Even for floating point formats with radix 16 or radix 10.
The one change I would recommend, however, is to replace the
#include <stdlib.h> with "extern void abort(void);" which makes
the test self contained, and easier to debug in gdb.
Ok for mainline, with that change.