This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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  <bonzini@gnu.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.

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]