Files
wasmtime/cranelift/filetests/filetests/legalizer/bitrev-i128.clif
Chris Fallin cb48ea406e Switch default to new x86_64 backend.
This PR switches the default backend on x86, for both the
`cranelift-codegen` crate and for Wasmtime, to the new
(`MachInst`-style, `VCode`-based) backend that has been under
development and testing for some time now.

The old backend is still available by default in builds with the
`old-x86-backend` feature, or by requesting `BackendVariant::Legacy`
from the appropriate APIs.

As part of that switch, it adds some more runtime-configurable plumbing
to the testing infrastructure so that tests can be run using the
appropriate backend. `clif-util test` is now capable of parsing a
backend selector option from filetests and instantiating the correct
backend.

CI has been updated so that the old x86 backend continues to run its
tests, just as we used to run the new x64 backend separately.

At some point, we will remove the old x86 backend entirely, once we are
satisfied that the new backend has not caused any unforeseen issues and
we do not need to revert.
2021-04-02 11:35:53 -07:00

90 lines
2.8 KiB
Plaintext

test legalizer
target x86_64 legacy
function %reverse_bits(i128) -> i128 {
block0(v0: i128):
v1 = bitrev.i128 v0
return v1
}
; check: block0(v2: i64, v3: i64):
; check: v0 = iconcat v2, v3
; check: v33 = iconst.i64 0xaaaa_aaaa_aaaa_aaaa
; check: v6 = band v2, v33
; check: v7 = ushr_imm v6, 1
; check: v34 = iconst.i64 0x5555_5555_5555_5555
; check: v8 = band v2, v34
; check: v9 = ishl_imm v8, 1
; check: v10 = bor v7, v9
; check: v35 = iconst.i64 0xcccc_cccc_cccc_cccc
; check: v11 = band v10, v35
; check: v12 = ushr_imm v11, 2
; check: v36 = iconst.i64 0x3333_3333_3333_3333
; check: v13 = band v10, v36
; check: v14 = ishl_imm v13, 2
; check: v15 = bor v12, v14
; check: v37 = iconst.i64 0xf0f0_f0f0_f0f0_f0f0
; check: v16 = band v15, v37
; check: v17 = ushr_imm v16, 4
; check: v38 = iconst.i64 0x0f0f_0f0f_0f0f_0f0f
; check: v18 = band v15, v38
; check: v19 = ishl_imm v18, 4
; check: v20 = bor v17, v19
; check: v39 = iconst.i64 0xff00_ff00_ff00_ff00
; check: v21 = band v20, v39
; check: v22 = ushr_imm v21, 8
; check: v40 = iconst.i64 0x00ff_00ff_00ff_00ff
; check: v23 = band v20, v40
; check: v24 = ishl_imm v23, 8
; check: v25 = bor v22, v24
; check: v41 = iconst.i64 0xffff_0000_ffff_0000
; check: v26 = band v25, v41
; check: v27 = ushr_imm v26, 16
; check: v42 = iconst.i64 0xffff_0000_ffff
; check: v28 = band v25, v42
; check: v29 = ishl_imm v28, 16
; check: v30 = bor v27, v29
; check: v31 = ushr_imm v30, 32
; check: v32 = ishl_imm v30, 32
; check: v4 = bor v31, v32
; check: v70 = iconst.i64 0xaaaa_aaaa_aaaa_aaaa
; check: v43 = band v3, v70
; check: v44 = ushr_imm v43, 1
; check: v71 = iconst.i64 0x5555_5555_5555_5555
; check: v45 = band v3, v71
; check: v46 = ishl_imm v45, 1
; check: v47 = bor v44, v46
; check: v72 = iconst.i64 0xcccc_cccc_cccc_cccc
; check: v48 = band v47, v72
; check: v49 = ushr_imm v48, 2
; check: v73 = iconst.i64 0x3333_3333_3333_3333
; check: v50 = band v47, v73
; check: v51 = ishl_imm v50, 2
; check: v52 = bor v49, v51
; check: v74 = iconst.i64 0xf0f0_f0f0_f0f0_f0f0
; check: v53 = band v52, v74
; check: v54 = ushr_imm v53, 4
; check: v75 = iconst.i64 0x0f0f_0f0f_0f0f_0f0f
; check: v55 = band v52, v75
; check: v56 = ishl_imm v55, 4
; check: v57 = bor v54, v56
; check: v76 = iconst.i64 0xff00_ff00_ff00_ff00
; check: v58 = band v57, v76
; check: v59 = ushr_imm v58, 8
; check: v77 = iconst.i64 0x00ff_00ff_00ff_00ff
; check: v60 = band v57, v77
; check: v61 = ishl_imm v60, 8
; check: v62 = bor v59, v61
; check: v78 = iconst.i64 0xffff_0000_ffff_0000
; check: v63 = band v62, v78
; check: v64 = ushr_imm v63, 16
; check: v79 = iconst.i64 0xffff_0000_ffff
; check: v65 = band v62, v79
; check: v66 = ishl_imm v65, 16
; check: v67 = bor v64, v66
; check: v68 = ushr_imm v67, 32
; check: v69 = ishl_imm v67, 32
; check: v5 = bor v68, v69
; check: v1 = iconcat v5, v4
; check: return v5, v4