Fix a hashing bug in APInt. A certain pathological testcase (too
authorStuart Hastings <stuart@apple.com>
Fri, 13 Mar 2009 21:51:13 +0000 (21:51 +0000)
committerStuart Hastings <stuart@apple.com>
Fri, 13 Mar 2009 21:51:13 +0000 (21:51 +0000)
commitd52ec65b6ded621578642f9275adbd49de7519e1
treedb7c479b58eeb33dfb325a12f85c1d39f84e6c20
parent7f3b28a7867a35ec56a4ed80546e64995d69483e
Fix a hashing bug in APInt.  A certain pathological testcase (too
large for the testsuite) took over six minutes to compile on my Mac.
The patched LLVM-GCC compiles that testcase in three seconds (GCC
takes less than one second).  This hash function is more complex
(about 35 instructions on x86) than what Chris wanted, but I expect it
will be well-behaved with arbitrary inputs.

Thank you to everyone who responded to my previous request for advice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66962 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/APInt.cpp