[PATCH] D77815: [flang] Fix setting mxcsr on MSVC

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 08:12:01 PDT 2020


ro added a comment.

I wonder if something like this patch should be applied more broadly or even in general.  I'm seeing the same issue (lack of `__mxcsr` in `fenv_t`)
on Solaris/x86.  When looking around, I found that that non-standard member does exist in glibc, macOS, and FreeBSD, so they could continue
to use the existing code.

However, AFAICS `<xmmintrin.h>` is available with all compilers that can be used to build llvm: clang, gcc, and msvc, so one could just remove
the references to `__mxcsr` and use the `_mm_getcsr`/`_mm_setcsr` code instead.

Thoughts?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77815/new/

https://reviews.llvm.org/D77815





More information about the llvm-commits mailing list