This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: revise -mfpmath=sse comparisons (povray test picture failurewith -ffast-math)

Hello Richard!

Tested on i686 and x86-64 linux, and with a povray 3.6 benchmark run.
The runtime of the povray benchmark improved 2.0% on the p4, and 7.9%
on the athlon64.  The later is surely helped by the amd64 abi being
designed for use with fpmath=sse.

With todays mainline [gcc version 4.0.0 20050114 (experimental)] the pictures rendered by povray-3.50c are wrong. They look like overexposed photographs with their colors reversed. A rendered picture from scenes/advanced/abyss.pov is attached to this message.

These are CFLAGS from src/Makefile:
CFLAGS = -O3 -march=pentium4 -mfpmath=sse -mno-fancy-math-387 -ffast-math -D__NO_MATH_INLINES -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -foptimize-sibling-calls -minline-all-stringops -Wno-multichar
CXXFLAGS = $(NOMULTICHAR) -O3 -march=pentium4 -mfpmath=sse -mno-fancy-math-387 -ffast-math -D__NO_MATH_INLINES -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -foptimize-sibling-calls -minline-all-stringops -Wno-multichar

If -mfpmath=sse is substituted with -mfpmath=387, rendered pictures look OK to me.

Without -ffast-math, SSE version produces corrects results. These are CFLAGS:

CFLAGS = -O3 -march=pentium4 -mfpmath=sse -D__NO_MATH_INLINES -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -foptimize-sibling-calls -minline-all-stringops -Wno-multichar
CXXFLAGS = $(NOMULTICHAR) -O3 -march=pentium4 -mfpmath=sse -D__NO_MATH_INLINES -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -foptimize-sibling-calls -minline-all-stringops -Wno-multichar


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]