gcc version: 4.1.1 fedora core 6 The _mm_cmpord_ss intrinsic is not compiled correctly. It generates CMPUNORDSS instread of CMPORDSS in assembly. The following code #include <xmmintrin.h> int main() { __m128 d1 = _mm_cmpord_ss(_mm_set_ss(2.1f), _mm_set_ss(3.2f)); } when compiled with "g++ -S" generates the assembly code in the attachment, which does not contain any cmpordss instruction. Instead, in line 30 there is a "cmpunordss %xmm0, %xmm2" instruction. In fact this code should have been "cmpordss %xmm0, %xmm2". We checked the source code of gcc 4.1.2 and guessed that changing the config/i386/i386.c line 14036 from ....IX86_BUILTIN_CMPORDSS, UNORDERED, 0} to ....IX86_BUILTIN_CMPORDSS, ORDERED, 0} could be a part of the fix to the problem.
Created attachment 152984 [details] The output of g++ -S compord.C
gcc version 3.4.4 compiles the sample code correctly. The instruction "cmpordss %xmm0, %xmm2" was generated correctly.
Should be fixed in gcc-4.1.2-10 (and upstream 4.1/4.2/trunk).