summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-05-01 10:41:38 -0600
committerKarl Williamson <khw@cpan.org>2019-05-24 17:09:30 -0600
commitbae047b68c92622bb4bb04499e36cdaa48138909 (patch)
tree162a121df8059783e84cdf3948b62c2fc041f8a2 /pp.c
parent3a019afd6f6291c3249c254b5c01e244e4ec83ab (diff)
downloadperl-bae047b68c92622bb4bb04499e36cdaa48138909.tar.gz
pp.c: Add two UNLIKELY()s
It should be uncommon to shift beyond a full word
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 0956121b27..6e9ab38f7f 100644
--- a/pp.c
+++ b/pp.c
@@ -1979,7 +1979,7 @@ static UV S_uv_shift(UV uv, int shift, bool left)
shift = -shift;
left = !left;
}
- if (shift >= IV_BITS) {
+ if (UNLIKELY(shift >= IV_BITS)) {
return 0;
}
return left ? uv << shift : uv >> shift;
@@ -1991,7 +1991,7 @@ static IV S_iv_shift(IV iv, int shift, bool left)
shift = -shift;
left = !left;
}
- if (shift >= IV_BITS) {
+ if (UNLIKELY(shift >= IV_BITS)) {
return iv < 0 && !left ? -1 : 0;
}