This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/21617] New: CRC64 algorithm optimisation problem on Intel 32-bit
- From: "m dot cave-ayland at webbased dot co dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 May 2005 10:26:09 -0000
- Subject: [Bug rtl-optimization/21617] New: CRC64 algorithm optimisation problem on Intel 32-bit
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Using a 64-bit CRC algorithm implementation implemented using "long long int",
it has been found that gcc fails to optimise the algorithm correctly when the
-O2 parameter is used. In fact, it is found that the processing time for CRC
calculation more than doubles compared to the processing time for the algorithm
when the -O1 parameter is used.
Tom Lane from Red Hat has done some testing and discovered that this problem
only occurs on 32-bit Intel processors (see
http://archives.postgresql.org/pgsql-hackers/2005-05/msg01051.php for more
information and the results of tests on other architectures).
I've marked this issue under version "unknown", however the URL above shows that
the problem exists in versions 3.2.3, 3.3.2 and 4.0.0.
The test case is easy: compile and run the attached crctest64.c on an Intel
32-bit processor such as a P4/Xeon with the following options:
gcc -O1 crctest64.c -o crctest64-o1
gcc -O2 crctest64.c -o crctest64-o2
Comparison of the timings will show that the second version is at least 100%
slower than the first.
Many thanks,
Mark.
--
Summary: CRC64 algorithm optimisation problem on Intel 32-bit
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: m dot cave-ayland at webbased dot co dot uk
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21617