[PATCH] D69979: clang: Guess at some platform FTZ/DAZ default settings

Sanjay Patel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 14 10:06:41 PST 2019


spatel added a comment.

In D69979#1740294 <https://reviews.llvm.org/D69979#1740294>, @arsenm wrote:

> In D69979#1738099 <https://reviews.llvm.org/D69979#1738099>, @craig.topper wrote:
>
> > I checked Redhat 7.4 that's on the server I'm using for work. And I had a coworker check his Ubuntu 18.04 system with this program. And both systems printed 1f80 as the value of MXCSR which shows FTZ and DAZ are both 0. Are you seeing something different?
> >
> >   #include <x86intrin.h>
> >   #include <stdio.h>
> >  
> >   int main() {
> >     int csr = _mm_getcsr();
> >     printf("%x\n", csr);
> >     return 0;
> >   }
> >
>
>
> I see the value as 1f80. However the test program I wrote suggests the default is to flush (and what the comments in bug 34994 suggest?):


Is the test program attached somewhere? 
Bug 34994 (https://bugs.llvm.org/show_bug.cgi?id=34994) was limited to changing cases where we are running in some kind of loose-FP environment (otherwise, we would not be generating a sqrt estimate sequence at all). In the default (IEEE-compliant) environment, x86 would use a full-precision sqrt instruction or make a call to libm sqrt.


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

https://reviews.llvm.org/D69979





More information about the cfe-commits mailing list