summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2024-01-17 10:35:48 -0500
committerGitHub <noreply@github.com>2024-01-17 10:35:48 -0500
commitafba09d30f4c2ce6d0d77e06d5250967411cd74a (patch)
tree7bb7bf34780537f20eaf16a7d8e1cb9db2bf38d7 /bootstraptest
parent63ff29cdb4ba27eb366d706d81a74b89a1d6b18a (diff)
YJIT: specialized codegen for integer right shift (#9564)
* YJIT: specialized codegen for integer right shift Used in optcarrot. May also be used to write pure-Ruby gems. No overflow check or fixnum untagging required. * Update yjit/src/codegen.rs Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> --------- Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_yjit.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
index 70a5501be2..5b53e8089b 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -4352,3 +4352,8 @@ assert_equal '0', %q{
assert_equal '[2, 4611686018427387904]', %q{
[1.succ, 4611686018427387903.succ]
}
+
+# Integer right shift
+assert_equal '[0, 1, -4]', %q{
+ [0 >> 1, 2 >> 1, -7 >> 1]
+}