Scheduling and MXCSR


Before I filed a bug I wanted to ask if the following actually
considered a bug or merely an aspect of #pragma STDC FENV_ACCESS and
-frounding-math not being supported in clang (and if it is a bug,
whether the bug is in clang or llvm). I'm writing some SSE2 code using
_mm_* intrinsics. At one point I need to change the rounding mode in
order to compute a floor function, which I do with _mm_setcsr (which
just wraps __builtin_ia32_ldmxcsr), and set it back again immediately
afterwards. Since clang provides this intrinsic I was hoping it would
be treated as a barrier for code reordering, but I'm nevertheless
finding that other intrinsics are being reordered with respect to the
MXCSR changes and causing rounding to be all wrong.

I'm using version 3.2, downloaded from