This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix type-mismatch in value profiling (PR22525)
- From: Richard Guenther <rguenther at suse dot de>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 25 Apr 2006 17:37:50 +0200 (CEST)
- Subject: Re: [PATCH] Fix type-mismatch in value profiling (PR22525)
- References: <Pine.LNX.4.44.0604231835320.9147-100000@www.eyesopen.com>
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" } } */