diff options
Diffstat (limited to 't/perf/opcount.t')
-rw-r--r-- | t/perf/opcount.t | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/perf/opcount.t b/t/perf/opcount.t index 372c47f3d6..3351f50f07 100644 --- a/t/perf/opcount.t +++ b/t/perf/opcount.t @@ -766,4 +766,19 @@ test_opcount(0, "builtin::reftype is replaced with direct opcode", reftype => 1, }); +my $one_point_five = 1.5; # Prevent const-folding. +test_opcount(0, "builtin::ceil is replaced with direct opcode", + sub { builtin::ceil($one_point_five); }, + { + entersub => 0, + ceil => 1, + }); + +test_opcount(0, "builtin::floor is replaced with direct opcode", + sub { builtin::floor($one_point_five); }, + { + entersub => 0, + floor => 1, + }); + done_testing(); |