Files
wasmtime/filetests/isa/riscv/expand-i32.cton
Jakob Stoklund Olesen 6f1a60366f Create value aliases when necessary.
If a secondary value in the source pattern becomes a primary value in
the destination pattern, it is not possible to overwrite the definition
of the source value.

Instead, change the original source value to an alias to the new promary
value.
2016-11-04 15:31:23 -07:00

22 lines
501 B
Plaintext

; Test the legalization of i32 instructions that don't have RISC-V versions.
test legalizer
set is_64bit=0
isa riscv supports_m=1
set is_64bit=1
isa riscv supports_m=1
; regex: V=vx?\d+
function carry_out(i32, i32) -> i32, b1 {
ebb0(v1: i32, v2: i32):
v3, v4 = iadd_cout v1, v2
return v3, v4
}
; check: $v3 = iadd $v1, $v2
; check: $(cout=$V) = icmp ult, $v3, $v1
; It's possible the legalizer will rewrite these value aliases in the future.
; check: $v4 -> $cout
; check: return $v3, $v4