From 556e355bad49de92e8c07e8ad96cc61448186e4b Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 27 Feb 2014 20:48:59 +0100 Subject: [PATCH] Bug 977538 - Disable PGO for CanonicalizeNaN. r=luke --HG-- extra : rebase_source : 7be8e2eb69297cafa8e705c738e9ed814ad50308 --- js/public/Value.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/public/Value.h b/js/public/Value.h index d2cdb30f538a..69315153e695 100644 --- a/js/public/Value.h +++ b/js/public/Value.h @@ -862,6 +862,10 @@ GenericNaN() return mozilla::SpecificNaN(0, 0x8000000000000ULL); } +/* MSVC with PGO miscompiles this function. */ +#if defined(_MSC_VER) +# pragma optimize("g", off) +#endif static inline double CanonicalizeNaN(double d) { @@ -869,6 +873,9 @@ CanonicalizeNaN(double d) return GenericNaN(); return d; } +#if defined(_MSC_VER) +# pragma optimize("", on) +#endif /* * JS::Value is the interface for a single JavaScript Engine value. A few