Files
wasmtime/cranelift/filetests/wasm/select.cton
Dan Gohman 1c760ab179 Rename intel to x86.
x86 is the more accurate name, as there are non-Intel x86 implementations.

Fixes #263.
2018-04-12 10:02:16 -07:00

33 lines
634 B
Plaintext

; Test basic code generation for the select WebAssembly instruction.
test compile
set is_64bit=0
isa x86 haswell
set is_64bit=1
isa x86 haswell
function %select_i32(i32, i32, i32) -> i32 {
ebb0(v0: i32, v1: i32, v2: i32):
v3 = select v2, v0, v1
return v3
}
function %select_i64(i64, i64, i32) -> i64 {
ebb0(v0: i64, v1: i64, v2: i32):
v3 = select v2, v0, v1
return v3
}
function %select_f32(f32, f32, i32) -> f32 {
ebb0(v0: f32, v1: f32, v2: i32):
v3 = select v2, v0, v1
return v3
}
function %select_f64(f64, f64, i32) -> f64 {
ebb0(v0: f64, v1: f64, v2: i32):
v3 = select v2, v0, v1
return v3
}