You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generally the use of *(1/a) optimization here seems questionable and cland doesn't do it for scalars, only for vector/simd types. Is this another bug that needs to be reported separately?
The text was updated successfully, but these errors were encountered:
I'm seeing this problem still in clang v18.1.0 RC with the DirectXMath library. The only way to get my library to work on clang in Release mode is to NOT use /fp:fast.
This is the link to godbolt with the full reproducer: https://godbolt.org/z/qYczcba39
The problem is that the pragma doesn't switch the mode when using intrinsics directly, but works when using the operators for the
__m128
types.I've originally discovered this in clang 14.0.1.
The code to see the problem is this (compiled with
-Ofast -msse4.2 -mrecip=none
):And it leads to this assembly:
Generally the use of
*(1/a)
optimization here seems questionable and cland doesn't do it for scalars, only for vector/simd types. Is this another bug that needs to be reported separately?The text was updated successfully, but these errors were encountered: