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] Fix type-mismatch in value profiling (PR22525)


On Sun, 23 Apr 2006, Roger Sayle wrote:

> 
> On Wed, 19 Apr 2006, Richard Guenther wrote:
> > 2006-04-19  Richard Guenther  <rguenther@suse.de>
> >
> > 	PR tree-optimization/22525
> > 	* value-prof.c (tree_mod_pow2): Remove unnecessary temporary
> > 	variable, adjust types of generated expressions.
> 
> This is OK for mainline.  Thanks.

I noticed that val-prof-2.c is now failing due to the different 
signedness in the final transformation.  Fixed with the following
patch as obvious.

Richard.

2006-04-25  Richard Guenther  <rguenther@suse.de>

	* gcc.dg/tree-prof/val-prof-2.c: Check for n + ffff rather
	than n + -1.

Index: testsuite/gcc.dg/tree-prof/val-prof-2.c
===================================================================
*** testsuite/gcc.dg/tree-prof/val-prof-2.c	(revision 113251)
--- testsuite/gcc.dg/tree-prof/val-prof-2.c	(working copy)
*************** main ()
*** 26,32 ****
  /* { dg-final-use { scan-tree-dump "Mod power of 2 transformation on insn" "tree_profile"} } */
  /* This is part of code checking that n is power of 2, so we are sure that the transformation
     didn't get optimized out.  */
! /* { dg-final-use { scan-tree-dump "n \\+ \\-1" "optimized"} } */
  /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
  /* { dg-final-use { cleanup-tree-dump "optimized" } } */
  /* { dg-final-use { cleanup-tree-dump "tree_profile" } } */
--- 26,32 ----
  /* { dg-final-use { scan-tree-dump "Mod power of 2 transformation on insn" "tree_profile"} } */
  /* This is part of code checking that n is power of 2, so we are sure that the transformation
     didn't get optimized out.  */
! /* { dg-final-use { scan-tree-dump "n \\+ ffff" "optimized"} } */
  /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
  /* { dg-final-use { cleanup-tree-dump "optimized" } } */
  /* { dg-final-use { cleanup-tree-dump "tree_profile" } } */


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