Skip to content

Commit

Permalink
cranelift: Add shifts and extends to fuzzer (#4700)
Browse files Browse the repository at this point in the history
* cranelift: Remove shifts-small-types runtests

These were moved to the main shifts file in #4519 but this file was accidentaly left in tree.

It also fixes the missing sshr_i8_i8 testcase

* cranelift: Add shifts to fuzzer

* cranelift: Add extends to fuzzer
  • Loading branch information
afonso360 authored Aug 12, 2022
1 parent 532fb22 commit ac97258
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 327 deletions.
322 changes: 0 additions & 322 deletions cranelift/filetests/filetests/runtests/shifts-small-types.clif

This file was deleted.

10 changes: 5 additions & 5 deletions cranelift/filetests/filetests/runtests/shifts.clif
Original file line number Diff line number Diff line change
Expand Up @@ -627,15 +627,15 @@ block0(v0: i8, v1: i16):
; run: %sshr_i8_i16(0x40, 33) == 0x20
; run: %sshr_i8_i16(0x40, 34) == 0x10

function %sshr_i8_i8(i16, i8) -> i16 {
block0(v0: i16, v1: i8):
v2 = sshr.i16 v0, v1
function %sshr_i8_i8(i8, i8) -> i8 {
block0(v0: i8, v1: i8):
v2 = sshr.i8 v0, v1
return v2
}
; run: %sshr_i8_i8(0x80, 0) == 0x80
; run: %sshr_i8_i8(0x80, 1) == 0x40
; run: %sshr_i8_i8(0x80, 1) == 0xC0
; run: %sshr_i8_i8(0xf0, 0) == 0xf0
; run: %sshr_i8_i8(0xf0, 4) == 0x0f
; run: %sshr_i8_i8(0xf0, 4) == 0xff
; run: %sshr_i8_i8(0x40, 32) == 0x40
; run: %sshr_i8_i8(0x40, 33) == 0x20
; run: %sshr_i8_i8(0x40, 34) == 0x10
Loading

0 comments on commit ac97258

Please sign in to comment.