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: [PATCH] PR bootstrap/12269: Fix ia64 bootstrap on mainline


It passed the failure point now. I will report the final result later.

Thanks.


H.J.
---
On Mon, Sep 15, 2003 at 04:55:19AM -0600, Roger Sayle wrote:
> 
> I was so close with my last patch, "Numerous simplify_gen_relational
> clean-ups", http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00933.html
> In fact, the diff between this patch and the previous one is only:
> 
> 7c7
> < --- simplify-rtx.c    14 Sep 2003 19:37:30 -0000
> ---
> > --- simplify-rtx.c    15 Sep 2003 04:46:34 -0000
> 164c164
> < !         return simplify_gen_relational (reversed, mode, op_mode,
> ---
> > !         return simplify_gen_relational (reversed, mode, VOIDmode,
> 181c181
> < !         return simplify_gen_relational (reversed, mode, op_mode,
> ---
> > !         return simplify_gen_relational (reversed, mode, VOIDmode,
> 199c199
> < !         return simplify_gen_relational (GE, mode, op_mode,
> ---
> > !         return simplify_gen_relational (GE, mode, VOIDmode,
> 
> 
> My fears were right, the bootstrap failure was caused by a comparison
> mode mismatch, indeed caused by my patch to move NOT/NEG simplifications
> into simplify-rtx.c.  In simplify_unary_operation, when inverting a
> comparison, such as (NOT (EQ X Y)), mode is the mode of the NOT, and
> op_mode is the mode of the EQ.  Neither is the actual mode of the
> comparison!  For gcc.c-torture/execute/builtins/string-3-lib.c, this
> then leads to use simplifying the comparison in BImode, where not
> surprisingly "n < 2" is always true.
> 
> Thanks to the infrastructure added in the unreviewed patch above,
> we can now just pass VOIDmode as the mode of the comparison and
> simplify_gen_relational will work out what to do.  This restores
> bootstrap for me on ia64-unknown-linux-gnu, all languages except
> Ada and treelang, including all the run-time libraries.
> 
> This version of the patch has also been tested on i686-pc-linux-gnu
> with a complete "make bootstrap", all languages except treelang, and
> regression tested with a top-level "make -k check" with no new failures.
> 
> Ok for mainline?
> 
> 
> Many apologies again for the inconvenience.  Its 5:17am locally, and
> time to go to bed.  Fixing this took much longer than I thought...
> 
> 
> 
> 2003-09-15  Roger Sayle  <roger@eyesopen.com>
> 
> 	PR bootstrap/12269
> 	* simplify-rtx.c (simplify_gen_relational): Allow the cmp_mode
> 	argument to be VOIDmode, taking the mode of the comparison from
> 	the operands.  Only call simplify_relational_operation if we
> 	know the mode of the comparison.  Honor FLOAT_STORE_FLAG_VALUE
> 	if comparison has a floating point result.  Ensure that the
> 	result is always of the specified mode.
> 	(simplify_replace_rtx): Simplify call to simplify_gen_relational.
> 	(simplify_unary_operation): Ensure the correct mode and cmp_mode
> 	are always passed to simplify_gen_relational.  Simplify NOT of
> 	comparison operator in any mode, not just BImode.
> 	(simplify_ternary_operation): Correct tests on the return value
> 	of simplify_relational_operation to use const_true_rtx, not
> 	const1_rtx.  Abort if it ever returns a non-constant result.
> 
> 	* cfgloopanal.c (count_strange_loop_iterations): Use the function
> 	simplify_relational_operation, not simplify_gen_relational, if
> 	we're only interested in constant comparisons and will ignore
> 	non-constant results.
> 


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