* 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.
90 lines
2.8 KiB
Plaintext
90 lines
2.8 KiB
Plaintext
test legalizer
|
|
target x86_64
|
|
|
|
function %reverse_bits(i128) -> i128 {
|
|
block0(v0: i128):
|
|
v1 = bitrev.i128 v0
|
|
return v1
|
|
}
|
|
|
|
; check: block0(v2: i64, v3: i64):
|
|
; check: v0 = iconcat v2, v3
|
|
; check: v33 = iconst.i64 0xaaaa_aaaa_aaaa_aaaa
|
|
; check: v6 = band v2, v33
|
|
; check: v7 = ushr_imm v6, 1
|
|
; check: v34 = iconst.i64 0x5555_5555_5555_5555
|
|
; check: v8 = band v2, v34
|
|
; check: v9 = ishl_imm v8, 1
|
|
; check: v10 = bor v7, v9
|
|
; check: v35 = iconst.i64 0xcccc_cccc_cccc_cccc
|
|
; check: v11 = band v10, v35
|
|
; check: v12 = ushr_imm v11, 2
|
|
; check: v36 = iconst.i64 0x3333_3333_3333_3333
|
|
; check: v13 = band v10, v36
|
|
; check: v14 = ishl_imm v13, 2
|
|
; check: v15 = bor v12, v14
|
|
; check: v37 = iconst.i64 0xf0f0_f0f0_f0f0_f0f0
|
|
; check: v16 = band v15, v37
|
|
; check: v17 = ushr_imm v16, 4
|
|
; check: v38 = iconst.i64 0x0f0f_0f0f_0f0f_0f0f
|
|
; check: v18 = band v15, v38
|
|
; check: v19 = ishl_imm v18, 4
|
|
; check: v20 = bor v17, v19
|
|
; check: v39 = iconst.i64 0xff00_ff00_ff00_ff00
|
|
; check: v21 = band v20, v39
|
|
; check: v22 = ushr_imm v21, 8
|
|
; check: v40 = iconst.i64 0x00ff_00ff_00ff_00ff
|
|
; check: v23 = band v20, v40
|
|
; check: v24 = ishl_imm v23, 8
|
|
; check: v25 = bor v22, v24
|
|
; check: v41 = iconst.i64 0xffff_0000_ffff_0000
|
|
; check: v26 = band v25, v41
|
|
; check: v27 = ushr_imm v26, 16
|
|
; check: v42 = iconst.i64 0xffff_0000_ffff
|
|
; check: v28 = band v25, v42
|
|
; check: v29 = ishl_imm v28, 16
|
|
; check: v30 = bor v27, v29
|
|
; check: v31 = ushr_imm v30, 32
|
|
; check: v32 = ishl_imm v30, 32
|
|
; check: v4 = bor v31, v32
|
|
; check: v70 = iconst.i64 0xaaaa_aaaa_aaaa_aaaa
|
|
; check: v43 = band v3, v70
|
|
; check: v44 = ushr_imm v43, 1
|
|
; check: v71 = iconst.i64 0x5555_5555_5555_5555
|
|
; check: v45 = band v3, v71
|
|
; check: v46 = ishl_imm v45, 1
|
|
; check: v47 = bor v44, v46
|
|
; check: v72 = iconst.i64 0xcccc_cccc_cccc_cccc
|
|
; check: v48 = band v47, v72
|
|
; check: v49 = ushr_imm v48, 2
|
|
; check: v73 = iconst.i64 0x3333_3333_3333_3333
|
|
; check: v50 = band v47, v73
|
|
; check: v51 = ishl_imm v50, 2
|
|
; check: v52 = bor v49, v51
|
|
; check: v74 = iconst.i64 0xf0f0_f0f0_f0f0_f0f0
|
|
; check: v53 = band v52, v74
|
|
; check: v54 = ushr_imm v53, 4
|
|
; check: v75 = iconst.i64 0x0f0f_0f0f_0f0f_0f0f
|
|
; check: v55 = band v52, v75
|
|
; check: v56 = ishl_imm v55, 4
|
|
; check: v57 = bor v54, v56
|
|
; check: v76 = iconst.i64 0xff00_ff00_ff00_ff00
|
|
; check: v58 = band v57, v76
|
|
; check: v59 = ushr_imm v58, 8
|
|
; check: v77 = iconst.i64 0x00ff_00ff_00ff_00ff
|
|
; check: v60 = band v57, v77
|
|
; check: v61 = ishl_imm v60, 8
|
|
; check: v62 = bor v59, v61
|
|
; check: v78 = iconst.i64 0xffff_0000_ffff_0000
|
|
; check: v63 = band v62, v78
|
|
; check: v64 = ushr_imm v63, 16
|
|
; check: v79 = iconst.i64 0xffff_0000_ffff
|
|
; check: v65 = band v62, v79
|
|
; check: v66 = ishl_imm v65, 16
|
|
; check: v67 = bor v64, v66
|
|
; check: v68 = ushr_imm v67, 32
|
|
; check: v69 = ishl_imm v67, 32
|
|
; check: v5 = bor v68, v69
|
|
; check: v1 = iconcat v5, v4
|
|
; check: return v5, v4
|