Skip to content

Commit

Permalink
Workaround for #93442 (#93530)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas committed Oct 16, 2023
1 parent 21783bb commit bd3c979
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/coreclr/inc/safemath.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ template<typename T> class ClrSafeInt
Which ought to inline nicely
*/
// Returns true if safe, false for overflow.
#if defined(_MSC_VER) && defined(HOST_ARM64) // Workaround for https://github.com/dotnet/runtime/issues/93442
#pragma optimize("", off)
#endif
static bool multiply(T lhs, T rhs, T &result)
{
if(Is64Bit())
Expand Down Expand Up @@ -675,6 +678,9 @@ template<typename T> class ClrSafeInt
}
}
}
#if defined(_MSC_VER) && defined(HOST_ARM64) // Workaround for https://github.com/dotnet/runtime/issues/93442
#pragma optimize("", on)
#endif

// Returns true if safe, false on overflow
static inline bool addition(T lhs, T rhs, T &result)
Expand Down

0 comments on commit bd3c979

Please sign in to comment.