This testcase should generate min{s,d}s, max{s,d}s SSE insn. It looks that min?f, max?f pattern is converted to equivalent i387 insn sequence, because the output is expected in FP reg. However, the result of min/max should be _moved_ from SSE to FP reg.
Testcase: float minf(float a, float b) { return a <= b ? a : b; } when compiled with 'gcc -O2 -ffast-math -march=pentium4 -mfpmath=sse -fomit-frame-pointer': minf: subl $4, %esp flds 8(%esp) movss 12(%esp), %xmm0 movss %xmm0, (%esp) flds (%esp) fcomi %st(1), %st fcmovnb %st(1), %st fstp %st(1) addl $4, %esp ret Equivalent code could be something like: minf: subl $4, %esp movss 8(%esp), %xmm0 minss %xmm0, 12(%esp) movss %xmm0, (%esp) flds (%esp) addl $4, %esp ret Uros. -- Summary: minss/maxss SSE insn not generated for -mfpmath=sse Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: uros at kss-loka dot si CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19250