This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Clarify branch prediction in SvTRUE
authorKarl Williamson <khw@cpan.org>
Tue, 16 Jun 2020 22:42:47 +0000 (16:42 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 5 Sep 2020 23:41:37 +0000 (17:41 -0600)
inline.h

index d0e119a..d41c43d 100644 (file)
--- a/inline.h
+++ b/inline.h
@@ -206,7 +206,7 @@ Perl_ReANY(const REGEXP * const re)
 
 PERL_STATIC_INLINE bool
 Perl_SvTRUE(pTHX_ SV *sv) {
-    if (!LIKELY(sv))
+    if (UNLIKELY(sv == NULL))
         return FALSE;
     SvGETMAGIC(sv);
     return SvTRUE_nomg_NN(sv);