Files
wasmtime/cranelift/filetests/filetests/wasm/multi-val-reuse-ret-ptr-stack-slot.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

62 lines
1.9 KiB
Plaintext

test legalizer
target x86_64 haswell
;; Test that we don't reuse `sret` stack slots for multiple calls. We could do
;; this one day, but it would require some care to ensure that we don't have
;; subsequent calls overwrite the results of previous calls.
function %foo() -> i32, f32 {
; check: ss0 = sret_slot 20
; nextln: ss1 = sret_slot 20
fn0 = %f() -> i32, i32, i32, i32, i32
fn1 = %g() -> f32, f32, f32, f32, f32
; check: sig0 = (i64 sret [%rdi]) -> i64 sret [%rax] fast
; nextln: sig1 = (i64 sret [%rdi]) -> i64 sret [%rax] fast
; nextln: fn0 = %f sig0
; nextln: fn1 = %g sig1
block0:
v0, v1, v2, v3, v4 = call fn0()
; check: v18 = stack_addr.i64 ss0
; nextln: v25 = func_addr.i64 fn0
; nextln: v19 = call_indirect sig0, v25(v18)
; nextln: v20 = load.i32 notrap aligned v19
; nextln: v0 -> v20
; nextln: v21 = load.i32 notrap aligned v19+4
; nextln: v1 -> v21
; nextln: v22 = load.i32 notrap aligned v19+8
; nextln: v2 -> v22
; nextln: v23 = load.i32 notrap aligned v19+12
; nextln: v3 -> v23
; nextln: v24 = load.i32 notrap aligned v19+16
; nextln: v4 -> v24
v5, v6, v7, v8, v9 = call fn1()
; check: v26 = stack_addr.i64 ss1
; nextln: v33 = func_addr.i64 fn1
; nextln: v27 = call_indirect sig1, v33(v26)
; nextln: v28 = load.f32 notrap aligned v27
; nextln: v5 -> v28
; nextln: v29 = load.f32 notrap aligned v27+4
; nextln: v6 -> v29
; nextln: v30 = load.f32 notrap aligned v27+8
; nextln: v7 -> v30
; nextln: v31 = load.f32 notrap aligned v27+12
; nextln: v8 -> v31
; nextln: v32 = load.f32 notrap aligned v27+16
; nextln: v9 -> v32
v10 = iadd v0, v1
v11 = iadd v2, v3
v12 = iadd v10, v11
v13 = iadd v12, v4
v14 = fadd v5, v6
v15 = fadd v7, v8
v16 = fadd v14, v15
v17 = fadd v16, v9
return v13, v17
}