------- Additional Comments From uros at kss-loka dot si 2004-12-16 13:50 ------- -finline-functions is needed to trigger the bug with -O2.
The attached testcase should be compiled with '-O2 -march=pentium4 -mfpmath=387 -ffast-math -D__NO_MATH_INLINES -finline-functions' to get: ... pxor %xmm0, %xmm0 movsd %xmm0, -16(%ebp) fldl -16(%ebp) fcomip %st(1), %st je .L23 fld %st(0) ... and: grep xmm zero.s pxor %xmm0, %xmm0 movsd %xmm0, -16(%ebp) movsd %xmm0, -16(%ebp) movsd %xmm0, -16(%ebp) movsd %xmm0, -16(%ebp) movsd %xmm0, 8(%edx) movsd %xmm0, (%edx) where movsds are followed by: fldl -16(%ebp) BTW: "#include <math.h> can be removed from testcase to avoid -D__NO_MATH_INLINES. Ther result will be the same. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19009