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] for PR 17791


Hello,

> > The patch fixes also a related latent bug -- in case word_mode is
> > shorter than the mode in that # of iterations is computed, we did not
> > check that the number fits in the word_mode.
> 
> This patch breaks most of SPEC2000 on ppc64 (perhaps also bootstrap, don't
> know),
> because there this is true:

the patch passed bootstrap and regtesting on ppc and ia64.  Interesting.
Sorry for the breakage :-(

> > +       if (word_mode_size > GET_MODE_BITSIZE (mode))
> > + 	{
> > + 	  count = simplify_gen_unary (ZERO_EXTEND, word_mode,
> > + 				      iterations, mode);
> > + 	  iterations = simplify_gen_unary (ZERO_EXTEND, word_mode,
> > + 					   iterations, mode);
> > + 	  iterations_max = simplify_gen_unary (ZERO_EXTEND, word_mode,
> > + 					       iterations_max, mode);
> > + 	}
> 
> Note how you calculate count from iterations (!).  The below patch fixes 
> the below testcase plus at least all of SPECint (except twolf).


Zdenek


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