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.
24 lines
938 B
Plaintext
24 lines
938 B
Plaintext
test legalizer
|
|
target x86_64 legacy
|
|
|
|
function %icmp_imm_i128(i128) -> i8 {
|
|
block0(v0: i128):
|
|
v1 = icmp_imm.i128 eq v0, 1
|
|
v2 = bint.i8 v1
|
|
return v2
|
|
}
|
|
|
|
; check: function %icmp_imm_i128(i64 [%rdi], i64 [%rsi]) -> i8 [%rax] fast {
|
|
; nextln: block0(v3: i64, v4: i64):
|
|
; nextln: v7 -> v3
|
|
; nextln: v8 -> v4
|
|
; nextln: [-] v0 = iconcat v3, v4
|
|
; nextln: [RexOp1pu_id#b8] v5 = iconst.i64 1
|
|
; nextln: [RexOp1pu_id#b8] v6 = iconst.i64 0
|
|
; nextln: [RexOp1icscc#8039] v9 = icmp eq v7, v5
|
|
; nextln: [RexOp1icscc#8039] v10 = icmp eq v8, v6
|
|
; nextln: [RexOp1rr#21] v1 = band v9, v10
|
|
; nextln: [RexOp2urm_noflags#4b6] v2 = bint.i8 v1
|
|
; nextln: [Op1ret#c3] return v2
|
|
; nextln: }
|