diff --git a/coregrind/m_aspacemgr/priv_aspacemgr.h b/coregrind/m_aspacemgr/priv_aspacemgr.h index 730e53694..34605a02c 100644 --- a/coregrind/m_aspacemgr/priv_aspacemgr.h +++ b/coregrind/m_aspacemgr/priv_aspacemgr.h @@ -77,7 +77,7 @@ extern void ML_(am_assert_fail) ( const HChar* expr, const HChar* fn ); #define aspacem_assert(expr) \ - ((void) ((expr) ? 0 : \ + ((void) (LIKELY(expr) ? 0 : \ (ML_(am_assert_fail)(#expr, \ __FILE__, __LINE__, \ __PRETTY_FUNCTION__)))) diff --git a/coregrind/m_libcbase.c b/coregrind/m_libcbase.c index 97af7c7c2..a84eb34aa 100644 --- a/coregrind/m_libcbase.c +++ b/coregrind/m_libcbase.c @@ -35,11 +35,11 @@ /* --------------------------------------------------------------------- - Assert machinery for use in this file. VG_(assert) cannot be called + Assert machinery for use in this file. vg_assert cannot be called here due to cyclic dependencies. ------------------------------------------------------------------ */ #define libcbase_assert(expr) \ - ((void) ((expr) ? 0 : \ + ((void) (LIKELY(expr) ? 0 : \ (ML_(libcbase_assert_fail)(#expr, \ __FILE__, __LINE__, \ __PRETTY_FUNCTION__))))