[Bug tree-optimization/17671] PHI-OPT is not smart enough

2005-03-07 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-08 
00:41 ---
Fixed.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17671


[Bug tree-optimization/17671] PHI-OPT is not smart enough

2005-03-07 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-08 
00:40 ---
Subject: Bug 17671

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-03-08 00:40:33

Modified files:
gcc: ChangeLog tree-ssa-phiopt.c 
gcc/testsuite  : ChangeLog 
Added files:
gcc/testsuite/gcc.dg/tree-ssa: phi-opt-1.c phi-opt-2.c 
   phi-opt-3.c phi-opt-4.c 

Log message:
2005-03-06  Andrew Pinski  <[EMAIL PROTECTED]>

PR tree-opt/17671
* tree-ssa-phiopt.c (tree_ssa_phiopt): Rewrite so we base the
bbs on the COND_EXPR instead of the PHI_NODEs.
(candidate_bb_for_phi_optimization): Remove.
(replace_phi_with_stmt): Rename to ...
(replace_phi_edge_with_variable): this and change so that we
replace the phi argument instead of removing the PHI.
(conditional_replacement): Change so we deal with PHI with more
than two arguments.
(value_replacement): Likewise.
(abs_replacement): Likewise.

2005-03-06  Andrew Pinski  <[EMAIL PROTECTED]>

PR tree-opt/17671
* gcc.dg/tree-ssa/phi-opt-[1-4].c: New tests.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7716&r2=2.7717
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-phiopt.c.diff?cvsroot=gcc&r1=2.20&r2=2.21
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5120&r2=1.5121
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-1.c.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-2.c.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-3.c.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-4.c.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17671


[Bug tree-optimization/17671] PHI-OPT is not smart enough

2005-03-06 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-06 
19:52 ---
Patch for 4.1.0 was posted here: 
.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17671


[Bug tree-optimization/17671] PHI-OPT is not smart enough

2004-10-04 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-04 12:45 
---
Posted a new patch here: .

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17671


[Bug tree-optimization/17671] PHI-OPT is not smart enough

2004-09-28 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-29 03:44 
---
Here is another example which I already with my patch.
int f(int a, int b, int c)
{
  if (c == 0) goto temp;
  if (a == 0)
   return 0;
temp:
  if (a == b)
   return a;
 return a;
}

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17671