This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Combine exhibiting O(X^2) behaviour
- To: egcs at cygnus dot com
- Subject: Combine exhibiting O(X^2) behaviour
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Fri, 13 Nov 1998 15:18:19 +0000
- Cc: richard dot earnshaw at arm dot com
- Organization: ARM Ltd.
- Reply-To: richard dot earnshaw at arm dot com
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;
}