[llvm] [CalcSpillWeights] Avoid x87 excess precision influencing weight result (PR #100165)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 02:06:06 PDT 2024
================
@@ -770,6 +770,10 @@ std::enable_if_t<std::is_signed_v<T>, T> MulOverflow(T X, T Y, T &Result) {
#endif
}
+/// Type to force float point values onto the stack, so that x86 doesn't add
+/// hidden precision, avoiding rounding differences on various platforms.
+using stack_float_t = volatile float;
----------------
arsenm wrote:
The only reason this would go in support would be to conditionalize this on using the volatile only when x87 is in use
https://github.com/llvm/llvm-project/pull/100165
More information about the llvm-commits
mailing list