Files
wasmtime/cranelift/filetests/regalloc/iterate.cton
Jakob Stoklund Olesen 91b1566aca Use "test regalloc" for the register allocator tests.
These tests were only using "test compile" because it doesn't require
any filecheck directives to be present, so just stop requiring filecheck
directives for "test regalloc" and other filecheck-based test drivers.
2017-10-25 18:31:14 -07:00

141 lines
3.1 KiB
Plaintext

test regalloc
set is_64bit
isa intel haswell
function #00000009(i64 [%rdi], f32 [%xmm0], f64 [%xmm1], i32 [%rsi], i32 [%rdx], i64 vmctx [%r14]) -> i64 [%rax] spiderwasm {
ebb0(v0: i64, v1: f32, v2: f64, v3: i32, v4: i32, v5: i64):
v32 = iconst.i32 0
v6 = bitcast.f32 v32
v7 = iconst.i64 0
v33 = iconst.i64 0
v8 = bitcast.f64 v33
v34 = iconst.i32 0xbe99_999a
v9 = bitcast.f32 v34
v10 = iconst.i32 40
v11 = iconst.i32 -7
v35 = iconst.i32 0x40b0_0000
v12 = bitcast.f32 v35
v13 = iconst.i64 6
v36 = iconst.i64 0x4020_0000_0000_0000
v14 = bitcast.f64 v36
v44 = iconst.i64 0
v37 = icmp slt v0, v44
brnz v37, ebb2
v38 = fcvt_from_sint.f64 v0
jump ebb3(v38)
ebb2:
v45 = iconst.i32 1
v39 = ushr.i64 v0, v45
v40 = band_imm.i64 v0, 1
v41 = bor v39, v40
v42 = fcvt_from_sint.f64 v41
v43 = fadd v42, v42
jump ebb3(v43)
ebb3(v15: f64):
v16 = fpromote.f64 v9
v46 = uextend.i64 v10
v17 = fcvt_from_sint.f64 v46
v18 = fcvt_from_sint.f64 v11
v19 = fpromote.f64 v12
v54 = iconst.i64 0
v47 = icmp.i64 slt v13, v54
brnz v47, ebb4
v48 = fcvt_from_sint.f64 v13
jump ebb5(v48)
ebb4:
v55 = iconst.i32 1
v49 = ushr.i64 v13, v55
v50 = band_imm.i64 v13, 1
v51 = bor v49, v50
v52 = fcvt_from_sint.f64 v51
v53 = fadd v52, v52
jump ebb5(v53)
ebb5(v20: f64):
v63 = iconst.i64 0
v56 = icmp.i64 slt v7, v63
brnz v56, ebb6
v57 = fcvt_from_sint.f64 v7
jump ebb7(v57)
ebb6:
v64 = iconst.i32 1
v58 = ushr.i64 v7, v64
v59 = band_imm.i64 v7, 1
v60 = bor v58, v59
v61 = fcvt_from_sint.f64 v60
v62 = fadd v61, v61
jump ebb7(v62)
ebb7(v21: f64):
v22 = fadd v21, v14
v23 = fadd.f64 v20, v22
v24 = fadd.f64 v19, v23
v25 = fadd.f64 v18, v24
v26 = fadd.f64 v17, v25
v27 = fadd.f64 v2, v26
v28 = fadd.f64 v16, v27
v29 = fadd.f64 v15, v28
v30 = x86_cvtt2si.i64 v29
v69 = iconst.i64 0x8000_0000_0000_0000
v65 = icmp ne v30, v69
brnz v65, ebb8
v66 = fcmp uno v29, v29
brz v66, ebb9
trap bad_toint
ebb9:
v70 = iconst.i64 0xc3e0_0000_0000_0000
v67 = bitcast.f64 v70
v68 = fcmp gt v67, v29
brz v68, ebb10
trap int_ovf
ebb10:
jump ebb8
ebb8:
jump ebb1(v30)
ebb1(v31: i64):
return v31
}
function #0000001a(i64 vmctx [%r14]) -> i64 [%rax] spiderwasm {
gv0 = vmctx+48
sig0 = (i32 [%rdi], i64 [%rsi], i64 vmctx [%r14], i64 sigid [%rbx]) -> i64 [%rax] spiderwasm
ebb0(v0: i64):
v1 = iconst.i32 32
v2 = iconst.i64 64
v3 = iconst.i32 9
v4 = iconst.i64 1063
v5 = iadd_imm v0, 48
v6 = load.i32 v5
v7 = icmp uge v3, v6
; If we're unlucky, there are no ABCD registers available for v7 at this branch.
brz v7, ebb2
trap oob
ebb2:
v8 = load.i64 v5+8
v9 = uextend.i64 v3
v16 = iconst.i64 16
v10 = imul v9, v16
v11 = iadd v8, v10
v12 = load.i64 v11
brnz v12, ebb3
trap icall_null
ebb3:
v13 = load.i64 v11+8
v14 = call_indirect.i64 sig0, v12(v1, v2, v13, v4)
jump ebb1(v14)
ebb1(v15: i64):
return v15
}