Files
wasmtime/cranelift/filetests/filetests/isa/x64/ifcmp-sp.clif
Chris Fallin a0318f36f0 Switch Cranelift over to regalloc2. (#3989)
This PR switches Cranelift over to the new register allocator, regalloc2.

See [this document](https://gist.github.com/cfallin/08553421a91f150254fe878f67301801)
for a summary of the design changes. This switchover has implications for
core VCode/MachInst types and the lowering pass.

Overall, this change brings improvements to both compile time and speed of
generated code (runtime), as reported in #3942:

```
Benchmark       Compilation (wallclock)     Execution (wallclock)
blake3-scalar   25% faster                  28% faster
blake3-simd     no diff                     no diff
meshoptimizer   19% faster                  17% faster
pulldown-cmark  17% faster                  no diff
bz2             15% faster                  no diff
SpiderMonkey,   21% faster                  2% faster
  fib(30)
clang.wasm      42% faster                  N/A
```
2022-04-14 10:28:21 -07:00

35 lines
509 B
Plaintext

test compile precise-output
target x86_64
function %f(i64) -> i32 {
block0(v0: i64):
v1 = ifcmp_sp v0
brif ugt v1, block1
jump block2
block1:
v2 = iconst.i32 0
return v2
block2:
v3 = iconst.i32 1
return v3
}
; pushq %rbp
; movq %rsp, %rbp
; block0:
; cmpq %rsp, %rdi
; jnbe label1; j label2
; block1:
; xorl %eax, %eax, %eax
; movq %rbp, %rsp
; popq %rbp
; ret
; block2:
; movl $1, %eax
; movq %rbp, %rsp
; popq %rbp
; ret