SSE intrinsic may mulfunction using Clang 19 with -ffast-math (OR: Recommendation to add -fno-finite-math-only)

Thank you for addressing the issue quickly! Will take a look later today.

I suspect and presume this may happen in Linux or any other platform which support SSE intrinsics, inherit from ClangToolchain and uses Clang version 19 onward, but cannot confirm as I do not have build environment at hand at the moment. Also, as the default in ClangToolchain is FPSemanticsMode.Precise, Imprecise must be specified in the build rule via some means, unlike SonyToolchain which used that value as its default.

In case of the Windows target, the current trunk happens to be free of this problem. I managed to get Windows VC Clang (19.1.1) environment to reproduce the issue, only after commenting out the following code block in VCToolChain.cs.

if (Target.WindowsPlatform.Compiler.IsClang()) { // FMath::Sqrt calls get inlined and when reciprical is taken, turned into an rsqrtss instruction, // which is *too* imprecise for, e.g., TestVectorNormalize_Sqrt in UnrealMathTest.cpp // TODO: Observed in clang 7.0, presumably the same in Intel C++ Compiler? FPSemantics = FPSemanticsMode.Precise; }So this seems to be a fortunate side effect. I however found it a bit confusing, that FPSemanticsMode.Precise is enforced at this point anyways regardless of the configuration (after going to the hassle of disabling SharedPCH usage if the mode was modified in the module Build.cs).

Regards,