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

Re: if-conv problem....


On 2 Oct 2002, Jim Wilson wrote:

> That isn't a complete bug report.  You didn't mention what target you
> configured gcc for.  You didn't mention what compiler options you used.
> You didn't mention which if-conv pass you are looking at.  There are two of
> them.
> 

sorry for this..this will not be repeated...
target is ia64-linux options we tried using are all -O,-O2,-O3


 
> Also, a testcase that is easy to compile is most useful.  The testcase you
> included has to be edited before it can be compiled, because it includes
> line numbers.  It is easy to fix, but it is an unnecessary annoyance.
>
 again sorry for this
 
> I can't reproduce your problem with current gcc sources configured for an
> ia64-linux target using -O0, -O1, or -O2.  I'd guess the problem is that
> the testcase is bogus.  Both a and c are uninitialized, and c is dead at
> the end of the function.  Try changing the function name to "sub", making
> a and c function parameters, and adding a statement to return c at the end
> of the function.
> 
> Jim
> 

 i did change the test case and the first if-conv pass did not if-convert
but second if-conv pass did the if-conversion

we wanted if-conv to be done before instr-combine pass so we need first
if-conv pass to work..but what is diff..???
why first pass did not work and second one did..???

testcase is as fallows...
-------------------------------------------------

       int sub(int a,int c) 
       {
        if(c == a) 
        {
         c=c+2; 
        }
        else
        {
         c+=1; 
        }
        return c; 
       }
     
     
      int main() 
      {
       int x,y; 
       sub(x,y); 
       printf("%d,%d\n",x,y); 
      }                         


regards

deepak


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