[Bug optimization/13875] [tree-ssa] missed jump thread optimization on the tree-level

dann at godzilla dot ics dot uci dot edu gcc-bugzilla@gcc.gnu.org
Wed Mar 3 18:14:00 GMT 2004


------- Additional Comments From dann at godzilla dot ics dot uci dot edu  2004-03-03 18:14 -------
As per Jeff's request, a brief look at generate-3.4.ii.t54.vars function:

void MODEL_GENERATOR::assumePTLiteral(bool&, bool, const GLITERAL&, GINTERPRET&)
[snip]

  T.8294 = (bool)(int)ptl->neg;
  if (T.8294 == 0) goto <L18>; else goto <L17>;

<L17>:;
  if (reallyPT) goto <L21>; else goto <L18>;

<L18>:;
  T.8297 = !T.8294;
  if (T.8297 == 0) goto <L33>; else goto <L20>;

<L20>:;
  if (reallyPT == 0) goto <L21>; else goto <L33>;

<L21>:;
  if (TraceLevel > 1) goto <L22>; else goto <L31>;

see some jump threading opportunities missed, the  T.8297 variable
could be eliminated.

Other observations: 
 --   casts like "if ((bool)(int)(bool) ....)"
 --  lots of code will be eliminated after PR13954 and PR13761 are fixed


-- 


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



More information about the Gcc-bugs mailing list