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]

Combine exhibiting O(X^2) behaviour



The test case below is exhibiting O(X^2) behaviour on the ARM in combine 
in both get_last_value_validate and in num_sign_bit_copies.  Does anyone 
have any idea how we can curtail this behaviour (it doesn't even lead to 
anything useful)?

Richard

unsigned int f(unsigned int x)
{
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  x^=x+x;
  return x;
}

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