* 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.
67 lines
1.4 KiB
Plaintext
67 lines
1.4 KiB
Plaintext
test legalizer
|
|
set enable_simd
|
|
target x86_64 skylake
|
|
|
|
function %ineg_i32x4() -> b1 {
|
|
block0:
|
|
v0 = vconst.i32x4 [1 1 1 1]
|
|
v2 = ineg v0
|
|
; check: v5 = vconst.i32x4 0x00
|
|
; nextln: v2 = isub v5, v0
|
|
|
|
v3 = extractlane v2, 0
|
|
v4 = icmp_imm eq v3, -1
|
|
|
|
return v4
|
|
}
|
|
|
|
function %ineg_legalized() {
|
|
block0:
|
|
v0 = vconst.i8x16 0x00
|
|
v1 = ineg v0
|
|
; check: v6 = vconst.i8x16 0x00
|
|
; nextln: v1 = isub v6, v0
|
|
|
|
v2 = raw_bitcast.i16x8 v0
|
|
v3 = ineg v2
|
|
; check: v7 = vconst.i16x8 0x00
|
|
; nextln: v3 = isub v7, v2
|
|
|
|
v4 = raw_bitcast.i64x2 v0
|
|
v5 = ineg v4
|
|
; check: v8 = vconst.i64x2 0x00
|
|
; nextln: v5 = isub v8, v4
|
|
|
|
return
|
|
}
|
|
|
|
function %fneg_legalized() {
|
|
block0:
|
|
v0 = vconst.f32x4 [0x1.0 0x2.0 0x3.0 0x4.0]
|
|
v1 = fneg v0
|
|
; check: v4 = vconst.i32x4 0xffffffffffffffffffffffffffffffff
|
|
; nextln: v5 = ishl_imm v4, 31
|
|
; nextln: v6 = raw_bitcast.f32x4 v5
|
|
; nextln: v1 = bxor v0, v6
|
|
|
|
v2 = vconst.f64x2 [0x1.0 0x2.0]
|
|
v3 = fneg v2
|
|
; check: v7 = vconst.i64x2 0xffffffffffffffffffffffffffffffff
|
|
; nextln: v8 = ishl_imm v7, 63
|
|
; nextln: v9 = raw_bitcast.f64x2 v8
|
|
; nextln: v3 = bxor v2, v9
|
|
|
|
return
|
|
}
|
|
|
|
function %fabs_legalized() {
|
|
block0:
|
|
v0 = vconst.f64x2 [0x1.0 -0x2.0]
|
|
v1 = fabs v0
|
|
; check: v2 = vconst.i64x2 0xffffffffffffffffffffffffffffffff
|
|
; nextln: v3 = ushr_imm v2, 1
|
|
; nextln: v4 = raw_bitcast.f64x2 v3
|
|
; nextln: v1 = band v0, v4
|
|
return
|
|
}
|