brian m. carlson reports the following problem with gcc 4.3 and trunk:
Attached is a C file that is compiled with -O3. mul and mul2 perform the
same operation; mul uses a loop, and mul2 uses SSE intrinsics. mul2
results in three instructions, whereas mul results in many, many more.
Obviously, since the two functions do the exact same thing, they should
be optimized to be identical. Instead, mul is pessimized.
Note that there are no alignment issues present since the arrays
declared in main are 16-byte aligned (since they are allocated on the
stack, which is 16-byte aligned on x86_64).
I also just noted that gcc-4.1 and gcc-4.2 produce much less bad code:
they each use 8 movss and 4 mulss. Nevertheless, they still do not
convert the code into three SSE instructions.
Summary: pessimizes function without SSE intrinsics
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tbm at cyrius dot com
GCC target triplet: x86_64-unknown-linux-gnu
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact email@example.com