http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47759

           Summary: _mm_empty() intrinsic fails to serve as a boundary
                    between MMX and x87 code due to optimizations
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: siarhei.siamas...@gmail.com
              Host: i686-pc-linux-gnu


Created attachment 23355
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23355
mm_empty_testcase.c

The attached testcase fails when compiled with -O2 or -O3 optimizations, but
works with -O1.

I'm actually not precisely sure how this code is expected to behave because
intrinsics are x86 architecture specific and C standard can't be used as a
reference. But my guess is that if the optimizer would not be allowed to
arbitrarily move code across _mm_empty() boundary, then the problem would
disappear.

Reply via email to