Files
wasmtime/cranelift/filetests/filetests/regalloc/coalescing-216.clif
Ryan Hunt 832666c45e Mass rename Ebb and relatives to Block (#1365)
* Manually rename BasicBlock to BlockPredecessor

BasicBlock is a pair of (Ebb, Inst) that is used to represent the
basic block subcomponent of an Ebb that is a predecessor to an Ebb.

Eventually we will be able to remove this struct, but for now it
makes sense to give it a non-conflicting name so that we can start
to transition Ebb to represent a basic block.

I have not updated any comments that refer to BasicBlock, as
eventually we will remove BlockPredecessor and replace with Block,
which is a basic block, so the comments will become correct.

* Manually rename SSABuilder block types to avoid conflict

SSABuilder has its own Block and BlockData types. These along with
associated identifier will cause conflicts in a later commit, so
they are renamed to be more verbose here.

* Automatically rename 'Ebb' to 'Block' in *.rs

* Automatically rename 'EBB' to 'block' in *.rs

* Automatically rename 'ebb' to 'block' in *.rs

* Automatically rename 'extended basic block' to 'basic block' in *.rs

* Automatically rename 'an basic block' to 'a basic block' in *.rs

* Manually update comment for `Block`

`Block`'s wikipedia article required an update.

* Automatically rename 'an `Block`' to 'a `Block`' in *.rs

* Automatically rename 'extended_basic_block' to 'basic_block' in *.rs

* Automatically rename 'ebb' to 'block' in *.clif

* Manually rename clif constant that contains 'ebb' as substring to avoid conflict

* Automatically rename filecheck uses of 'EBB' to 'BB'

'regex: EBB' -> 'regex: BB'
'$EBB' -> '$BB'

* Automatically rename 'EBB' 'Ebb' to 'block' in *.clif

* Automatically rename 'an block' to 'a block' in *.clif

* Fix broken testcase when function name length increases

Test function names are limited to 16 characters. This causes
the new longer name to be truncated and fail a filecheck test. An
outdated comment was also fixed.
2020-02-07 10:46:47 -06:00

88 lines
1.6 KiB
Plaintext

test regalloc
target x86_64 haswell
; Reported as https://github.com/bytecodealliance/cranelift/issues/216 from the Binaryen fuzzer.
;
; The (old) coalescer creates a virtual register with two identical values.
function %pr216(i32 [%rdi], i64 vmctx [%rsi]) -> i64 [%rax] system_v {
block0(v0: i32, v1: i64):
v3 = iconst.i64 0
v5 = iconst.i32 0
brz v5, block3(v3)
jump block4(v3, v3)
block4(v11: i64, v29: i64):
v6 = iconst.i32 0
brz v6, block14
jump block15
block15:
v9 = iconst.i32 -17
v12 = iconst.i32 0xffff_ffff_ffff_8000
jump block9(v12)
block9(v10: i32):
brnz v10, block8(v9, v11, v11)
jump block16
block16:
brz.i32 v9, block13
jump block17
block17:
v13 = iconst.i32 0
brnz v13, block6(v11, v11)
jump block18
block18:
v14 = iconst.i32 0
brz v14, block12
jump block11
block12:
jump block4(v11, v11)
block11:
jump block10(v11)
block13:
v15 = iconst.i64 1
jump block10(v15)
block10(v21: i64):
v16 = iconst.i32 0
brnz v16, block6(v21, v11)
jump block19
block19:
v17 = iconst.i32 0xffff_ffff_ffff_9f35
jump block8(v17, v21, v11)
block8(v8: i32, v23: i64, v28: i64):
jump block7(v8, v23, v28)
block14:
v18 = iconst.i32 0
jump block7(v18, v11, v29)
block7(v7: i32, v22: i64, v27: i64):
jump block6(v22, v27)
block6(v20: i64, v25: i64):
v19 = iconst.i32 0xffc7
brnz v19, block4(v20, v25)
jump block5
block5:
jump block3(v25)
block3(v24: i64):
jump block2(v24)
block2(v4: i64):
jump block1(v4)
block1(v2: i64):
return v2
}