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

law at redhat dot com gcc-bugzilla@gcc.gnu.org
Thu Apr 8 22:58:00 GMT 2004


------- Additional Comments From law at redhat dot com  2004-04-08 22:58 -------
Subject: Re:  [tree-ssa] missed jump thread 
 optimization on the tree-level

In message <20040406012711.14808.qmail@sources.redhat.com>, "dann at godzilla d
ot ics dot uci dot edu" writes:
 >
 >------- Additional Comments From dann at godzilla dot ics dot uci dot edu  20
 >04-04-06 01:27 -------
 >I am not sure that this belongs here, or if I should open another PR. 
 >
 >Also from generate-3.4.ii from PR8361
 >the .vars dump for function 
 >bool PT<GPROGRAM>::isReallyPossible() const
 >looks like:
 >
 >  int T.3219;
 >  int iftmp.14163;
 >
 ><bb 0>:
 >  if (this->allowsPositive) goto <L0>; else goto <L11>;
 >
 ><L0>:;
 >  T.3219 = (int)*(((struct GINTERPRET *)this->I)->array + (TruthValue
 >*)(((struct GATOM *)(struct GATOM &)((struct
 >__normal_iterator<constGATOM*,std::vector<GATOM, std::allocator<GATOM> > >
 >*)this + 12B)->_M_current)->index * 4));
 >  if ((bool)(T.3219 == 0) != 0) goto <L17>; else goto <L4>;
 >
 ><L17>:;
 >  iftmp.14163 = 1;
 >  goto <bb 4> (<L10>);
 >
 ><L4>:;
 >  if ((bool)(T.3219 == 2) != 0) goto <L8>; else goto <L18>;
 >
 ><L18>:;
 >  iftmp.14163 = 0;
 >  goto <bb 4> (<L10>);
 >
 ><L8>:;
 >  iftmp.14163 = 1;
 >
 ><L10>:;
 >  return iftmp.14163;
 >
 ><L11>:;
 >  return (int)(bool)((int)*(((struct GINTERPRET *)this->I)->array + (TruthVal
 >ue
 >*)(((struct GATOM *)(struct GATOM &)(struct GLITERAL *)(struct GLITERAL
 >&)((struct __normal_iterator<constTLITERAL<GATOM>*,std::vector<TLITERAL<GATOM
 >>,
 >std::allocator<TLITERAL<GATOM> > > > *)this + 16B)->_M_current)->index * 4)) 
 >== 0);
 >
 >The 2 ifs that test T.3219 look strange. 
What's strange about them?  The first is testing if T.3219 != 0 and the second
is testing of T.3219 != 2.  They're rendered kind-of funny in the pretty
printer, but they appear to be correct to me.

Maybe if you provided more details about what you mean by "look strange",
we could look further into the potential problem.

jeff



-- 


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



More information about the Gcc-bugs mailing list