[Bug tree-optimization/14627] [tree-ssa] extra assignment inserted on the tree level

steven at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Mar 19 18:58:00 GMT 2005


------- Additional Comments From steven at gcc dot gnu dot org  2005-03-19 18:58 -------
Actually you can get this from any trivial "implicit set"-like 
code, for example: 
 
int b; 
void foo (int a) { 
        if (a) 
                a = 3; 
        b = a; 
} 
 
The out-of-ssa pass turns that into  
foo (aD.1461) 
{ 
  intD.0 a.0D.1468; 
 
  # BLOCK 0 
  # PRED: ENTRY [100.0%]  (fallthru,exec) 
  if (aD.1461 != 0) goto <L3>; else goto <L2>; 
  # SUCC: 3 [67.0%]  (true,exec) 1 [33.0%]  (false,exec) 
 
  # BLOCK 3 
  # PRED: 0 [67.0%]  (true,exec) 
<L3>:; 
  a.0D.1468 = 3; 
  goto <bb 2> (<L1>); 
  # SUCC: 2 [100.0%]  (fallthru) 
 
  # BLOCK 1 
  # PRED: 0 [33.0%]  (false,exec) 
<L2>:; 
  a.0D.1468 = 0; 
  # SUCC: 2 [100.0%]  (fallthru) 
 
  # BLOCK 2 
  # PRED: 1 [100.0%]  (fallthru) 3 [100.0%]  (fallthru) 
<L1>:; 
  #   bD.1460_4 = V_MUST_DEF <bD.1460_3>; 
  bD.1460 = a.0D.1468; 
  return; 
  # SUCC: EXIT [100.0%] 
 
} 
 
We do not get rid of the "a.0 = 0" set until the first RTL if conversion 
pass. 
(Also note the useless live range splitting of a!) 
 
This is IMHO a little more important than the normal enhancement request,  
so I'm making this a "normal" bug.  Andrew, any comments on this bug??? 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com
           Severity|enhancement                 |normal
      Known to fail|                            |4.0.0 4.1.0


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



More information about the Gcc-bugs mailing list