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]

egcs, Peephole Problem


Translating



int a, b, c, d;
int main(){
  int i;

  for(i=0; i < 10000000; i++){

    a = a+b+c;

    if(a == 3000)
      b++;

    if(a % 2)

      d=a*c;
    else
    d=a*a*c;

    b=b+c+a;
    c=b+d;
  }
}

with haifa enabled on sparc-sun-solaris2.5.1 has produced:

....

.LL10:
         st %g2,[%o7+%lo(d)]
         ld [%o7+%lo(d)],%g2
....

Andreas

 --

andreas.unger@uni-jena.de



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