From b44f67b6d7fe6ef63dbf614ce61ff666604d4a1b Mon Sep 17 00:00:00 2001 From: Trevor Elliott Date: Tue, 7 Mar 2023 09:34:29 -0800 Subject: [PATCH] Stop supporting vectors with `bmask` (#5948) Co-authored-by: Jamey Sharp --- .../codegen/meta/src/shared/instructions.rs | 17 ++++------- .../filetests/runtests/simd-bmask.clif | 30 ------------------- 2 files changed, 5 insertions(+), 42 deletions(-) delete mode 100644 cranelift/filetests/filetests/runtests/simd-bmask.clif diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs index 8692207c54..2acecdbd75 100755 --- a/cranelift/codegen/meta/src/shared/instructions.rs +++ b/cranelift/codegen/meta/src/shared/instructions.rs @@ -2967,19 +2967,13 @@ pub(crate) fn define( let Truthy = &TypeVar::new( "Truthy", - "A scalar or vector whose values are truthy", - TypeSetBuilder::new() - .ints(Interval::All) - .simd_lanes(Interval::All) - .build(), + "A scalar whose values are truthy", + TypeSetBuilder::new().ints(Interval::All).build(), ); let IntTo = &TypeVar::new( "IntTo", - "An integer type with the same number of lanes", - TypeSetBuilder::new() - .ints(Interval::All) - .simd_lanes(Interval::All) - .build(), + "An integer type", + TypeSetBuilder::new().ints(Interval::All).build(), ); let x = &Operand::new("x", Truthy); let a = &Operand::new("a", IntTo); @@ -2990,8 +2984,7 @@ pub(crate) fn define( r#" Convert `x` to an integer mask. - True maps to all 1s and false maps to all 0s. The result type must have - the same number of vector lanes as the input. + Non-zero maps to all 1s and zero maps to all 0s. "#, &formats.unary, ) diff --git a/cranelift/filetests/filetests/runtests/simd-bmask.clif b/cranelift/filetests/filetests/runtests/simd-bmask.clif deleted file mode 100644 index 1ef244f0a5..0000000000 --- a/cranelift/filetests/filetests/runtests/simd-bmask.clif +++ /dev/null @@ -1,30 +0,0 @@ -test interpret - - -function %bmask_i8x16(i8x16) -> i8x16 { -block0(v0: i8x16): - v1 = bmask.i8x16 v0 - return v1 -} -; run: %bmask_i8x16([-1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0]) == [-1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0] - -function %bmask_i16x8(i16x8) -> i16x8 { -block0(v0: i16x8): - v1 = bmask.i16x8 v0 - return v1 -} -; run: %bmask_i16x8([-1 0 -1 0 -1 0 -1 0]) == [-1 0 -1 0 -1 0 -1 0] - -function %bmask_i32x4(i32x4) -> i32x4 { -block0(v0: i32x4): - v1 = bmask.i32x4 v0 - return v1 -} -; run: %bmask_i32x4([-1 0 -1 0]) == [-1 0 -1 0] - -function %bmask_i64x2(i64x2) -> i64x2 { -block0(v0: i64x2): - v1 = bmask.i64x2 v0 - return v1 -} -; run: %bmask_i64x2([-1 0]) == [-1 0]