Files
wasmtime/cranelift/filetests/filetests/wasm/multi-val-b1.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

69 lines
2.3 KiB
Plaintext

test compile
target x86_64 haswell
;; `b1` return values need to be legalized into bytes so that they can be stored
;; in memory.
function %return_4_b1s(b1, b1, b1, b1) -> b1, b1, b1, b1 {
;; check: function %return_4_b1s(b1 [%rsi], b1 [%rdx], b1 [%rcx], b1 [%r8], i64 sret [%rdi], i64 fp [%rbp]) -> i64 sret [%rax], i64 fp [%rbp] fast {
block0(v0: b1, v1: b1, v2: b1, v3: b1):
; check: block0(v0: b1 [%rsi], v1: b1 [%rdx], v2: b1 [%rcx], v3: b1 [%r8], v4: i64 [%rdi], v13: i64 [%rbp]):
return v0, v1, v2, v3
; check: v5 = bint.i8 v0
; nextln: v9 = uextend.i32 v5
; nextln: istore8 notrap aligned v9, v4
; nextln: v6 = bint.i8 v1
; nextln: v10 = uextend.i32 v6
; nextln: istore8 notrap aligned v10, v4+1
; nextln: v7 = bint.i8 v2
; nextln: v11 = uextend.i32 v7
; nextln: istore8 notrap aligned v11, v4+2
; nextln: v8 = bint.i8 v3
; nextln: v12 = uextend.i32 v8
; nextln: istore8 notrap aligned v12, v4+3
}
function %call_4_b1s() {
; check: function %call_4_b1s(i64 fp [%rbp], i64 csr [%rbx]) -> i64 fp [%rbp], i64 csr [%rbx] fast {
; nextln: ss0 = sret_slot 4, offset -28
fn0 = colocated %return_4_b1s(b1, b1, b1, b1) -> b1, b1, b1, b1
; check: sig0 = (b1 [%rsi], b1 [%rdx], b1 [%rcx], b1 [%r8], i64 sret [%rdi]) -> i64 sret [%rax] fast
block0:
; check: block0(v26: i64 [%rbp], v27: i64 [%rbx]):
v0 = bconst.b1 true
v1 = bconst.b1 false
v2 = bconst.b1 true
v3 = bconst.b1 false
; check: v8 = stack_addr.i64 ss0
v4, v5, v6, v7 = call fn0(v0, v1, v2, v3)
; check: v9 = call fn0(v0, v1, v2, v3, v8)
; nextln: v22 = uload8.i32 notrap aligned v9
; nextln: v10 = ireduce.i8 v22
; nextln: v11 = raw_bitcast.b8 v10
; nextln: v12 = breduce.b1 v11
; nextln: v4 -> v12
; nextln: v23 = uload8.i32 notrap aligned v9+1
; nextln: v13 = ireduce.i8 v23
; nextln: v14 = raw_bitcast.b8 v13
; nextln: v15 = breduce.b1 v14
; nextln: v5 -> v15
; nextln: v24 = uload8.i32 notrap aligned v9+2
; nextln: v16 = ireduce.i8 v24
; nextln: v17 = raw_bitcast.b8 v16
; nextln: v18 = breduce.b1 v17
; nextln: v6 -> v18
; nextln: v25 = uload8.i32 notrap aligned v9+3
; nextln: v19 = ireduce.i8 v25
; nextln: v20 = raw_bitcast.b8 v19
; nextln: v21 = breduce.b1 v20
; nextln: v7 -> v21
return
}