Merge pull request #3008 from afonso360/aarch64-i128-ireduce

aarch64: Implement ireduce for i128 values
This commit is contained in:
Chris Fallin
2021-06-21 09:54:43 -07:00
committed by GitHub
3 changed files with 87 additions and 1 deletions

View File

@@ -0,0 +1,43 @@
test compile
set unwind_info=false
target aarch64
function %ireduce_128_64(i128) -> i64 {
block0(v0: i128):
v1 = ireduce.i64 v0
return v1
}
; check: stp fp, lr, [sp, #-16]!
; nextln: mov fp, sp
; nextln: ldp fp, lr, [sp], #16
; nextln: ret
function %ireduce_128_32(i128) -> i32 {
block0(v0: i128):
v1 = ireduce.i32 v0
return v1
}
; check: stp fp, lr, [sp, #-16]!
; nextln: mov fp, sp
; nextln: ldp fp, lr, [sp], #16
; nextln: ret
function %ireduce_128_16(i128) -> i16 {
block0(v0: i128):
v1 = ireduce.i16 v0
return v1
}
; check: stp fp, lr, [sp, #-16]!
; nextln: mov fp, sp
; nextln: ldp fp, lr, [sp], #16
; nextln: ret
function %ireduce_128_8(i128) -> i8 {
block0(v0: i128):
v1 = ireduce.i8 v0
return v1
}
; check: stp fp, lr, [sp, #-16]!
; nextln: mov fp, sp
; nextln: ldp fp, lr, [sp], #16
; nextln: ret