Skip to content

Commit 9759c78

Browse files
author
TheIronBorn
committed
fix test attr
1 parent 31823d7 commit 9759c78

File tree

1 file changed

+35
-10
lines changed

1 file changed

+35
-10
lines changed

crates/coresimd/tests/rotate_tests.rs

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,61 @@ use stdsimd_test::assert_instr;
1414
// Verify that supported hardware compiles rotates into single instructions
1515

1616
#[inline]
17-
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), target_feature(enable = "avx512f"))]
18-
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), assert_instr(vpro))]
17+
#[cfg_attr(
18+
all(
19+
any(target_arch = "x86", target_arch = "x86_64"),
20+
target_feature(enable = "avx512f")
21+
),
22+
assert_instr(vpro)
23+
)]
1924
unsafe fn rotate_right_variable(x: u64x8) -> u64x8 {
2025
x.rotate_right(u64x8::new(0, 1, 2, 3, 4, 5, 6, 7))
2126
}
2227

2328
#[inline]
24-
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), target_feature(enable = "avx512f"))]
25-
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), assert_instr(vpro))]
29+
#[cfg_attr(
30+
all(
31+
any(target_arch = "x86", target_arch = "x86_64"),
32+
target_feature(enable = "avx512f")
33+
),
34+
assert_instr(vpro)
35+
)]
2636
unsafe fn rotate_left_variable(x: u64x8) -> u64x8 {
2737
x.rotate_left(u64x8::new(0, 1, 2, 3, 4, 5, 6, 7))
2838
}
2939

3040
#[inline]
31-
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), target_feature(enable = "avx512f"))]
32-
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), assert_instr(vpro))]
41+
#[cfg_attr(
42+
all(
43+
any(target_arch = "x86", target_arch = "x86_64"),
44+
target_feature(enable = "avx512f")
45+
),
46+
assert_instr(vpro)
47+
)]
3348
unsafe fn rotate_right(x: u64x8) -> u64x8 {
3449
x.rotate_right(u64x8::splat(12))
3550
}
3651

3752
#[inline]
38-
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), target_feature(enable = "avx512f"))]
39-
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), assert_instr(vpro))]
53+
#[cfg_attr(
54+
all(
55+
any(target_arch = "x86", target_arch = "x86_64"),
56+
target_feature(enable = "avx512f")
57+
),
58+
assert_instr(vpro)
59+
)]
4060
unsafe fn rotate_left(x: u64x8) -> u64x8 {
4161
x.rotate_left(u64x8::splat(12))
4262
}
4363

4464
#[inline]
45-
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), target_feature(enable = "avx512f"))]
46-
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), assert_instr(vpro))]
65+
#[cfg_attr(
66+
all(
67+
any(target_arch = "x86", target_arch = "x86_64"),
68+
target_feature(enable = "avx512f")
69+
),
70+
assert_instr(vpro)
71+
)]
4772
unsafe fn rotate_left_x2(x: u64x2) -> u64x2 {
4873
x.rotate_left(u64x2::splat(12))
4974
}

0 commit comments

Comments
 (0)