Heed uext and sext annotations on RISC-V arguments.

Translate the small integer arguments to i32 or i64 with the appropriate
extend and ireduce instructions.
This commit is contained in:
Jakob Stoklund Olesen
2017-03-07 15:07:00 -08:00
parent fd58b7cc29
commit 40fc5da3d8
2 changed files with 23 additions and 1 deletions

View File

@@ -41,6 +41,13 @@ ebb0(v0: i64):
return v0
}
function int_ext(i8, i8 sext, i8 uext) -> i8 {
ebb0(v1: i8, v2: i8, v3: i8):
; check: $ebb0($v1: i8, $(v2x=$VX): i32, $(v3x=$VX): i32):
; check: ireduce.i8 $v2x
; check: ireduce.i8 $v3x
}
function vector_split_args(i64x4) -> i64 {
ebb0(v0: i64x4):
; check: $ebb0($(v0al=$VX): i32, $(v0ah=$VX): i32, $(v0bl=$VX): i32, $(v0bh=$VX): i32, $(v0cl=$VX): i32, $(v0ch=$VX): i32, $(v0dl=$VX): i32, $(v0dh=$VX): i32):