# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #131306]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131306 >


Before ef29bb9f41aa5d[^1], the +> op special cased large shifts and large 
numbers. Now that special-casing was removed,
it works fine in the first few runs, but then starts giving incorrect results 
(setting MVM_SPESH_DISABLE fixes the issue).

I couldn't repro it with *just* the `+>` op, but only in this combination:

<Zoffix_> c: ef29bb9f41aa5d sub rotr(uint32 $n, uint32 $b) { $n +> $b +| $n +< 
(32 - $b) }; say rotr 1652322944, 18; my $x; for ^1000 { $x = rotr 1652322944, 
18 }; say $x
<committable6> Zoffix_, ¦ef29bb9: «27071659120799␤27071659114496»
<Zoffix_> c: ef29bb9f41aa5d~1 sub rotr(uint32 $n, uint32 $b) { $n +> $b +| $n 
+< (32 - $b) }; say rotr 1652322944, 18; my $x; for ^1000 { $x = rotr 
1652322944, 18 }; say $x
<committable6> Zoffix_, ¦ef29bb9f41aa5d~1: «27071659120799␤27071659120799»

[1] https://github.com/rakudo/rakudo/commit/ef29bb9f41aa5d

Reply via email to