This is the mail archive of the gcc-bugs@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]

[Bug optimization/13869] [tree-ssa] wrong code with a simple loop


------- Additional Comments From law at redhat dot com  2004-02-09 20:50 -------
Subject: Re:  [tree-ssa] wrong code with a simple loop 

In message <20040128212153.4623.qmail@sources.redhat.com>, "steven at gcc dot g
nu dot org" writes:
 >After DCE2, not a whole lot remains of the original function: 
 > 
 >main () 
 >{ 
 >  int i; 
 >  int my_bool; 
 > 
 >  # BLOCK 0 
 >  # PRED: ENTRY (fallthru) 
 >  # SUCC: 1 (fallthru) 
 > 
 >  # BLOCK 1 
 >  # PRED: 0 (fallthru) 1 (true) 
 >  # i_2 = PHI <0(0), i_24(1)>; 
 ><L2>:; 
 >  i_24 = i_2 + 1; 
 >  if (i_24 <= 9) goto <L2>; else goto <L4>; 
 >  # SUCC: 2 (false) 1 (true) 
 > 
 >  # BLOCK 2 
 >  # PRED: 1 (false) 
 ><L4>:; 
 >  return 0; 
 >  # SUCC: EXIT 
 >} 
 > 
 >So returns 0 with optimization enabled. 
 > 
 >Perhaps Jeff can look into all those dead assignments??? 
I'm not sure what you want me to do.  The dead assignments in the dom
dumps are normal as dom does not try to eliminate dead code.  That is
the job of DCE.  In fact, DOM can create dead code when jumps are
threaded (as an artifact of the out-of-ssa translation we must do).


Jeff



-- 


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


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