Skip to content

Commit 98405ca

Browse files
committed
gen-arm: disable assert_instr for pfalse
The implementation for this has the same behaviour as a `pfalse` but doesn't currently emit one until an intrinsic is added to emit a `zeroinitializer` for this.
1 parent 9940d66 commit 98405ca

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

crates/core_arch/src/aarch64/sve/generated.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30819,7 +30819,6 @@ pub fn svorv_u64(pg: svbool_t, op: svuint64_t) -> u64 {
3081930819
#[inline(always)]
3082030820
#[target_feature(enable = "sve")]
3082130821
#[unstable(feature = "stdarch_aarch64_sve", issue = "145052")]
30822-
#[cfg_attr(test, assert_instr(pfalse))]
3082330822
pub fn svpfalse_b() -> svbool_t {
3082430823
svdupq_n_b8(
3082530824
false, false, false, false, false, false, false, false, false, false, false, false, false,

crates/stdarch-gen-arm/spec/sve/aarch64.spec.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3611,7 +3611,9 @@ intrinsics:
36113611
doc: Set all predicate elements to false
36123612
arguments: []
36133613
return_type: "svbool_t"
3614-
assert_instr: [pfalse]
3614+
# TODO: With current implementation, `pfalse` isn't generated, will need to add intrinsic to
3615+
# generate `zeroinitializer`
3616+
# assert_instr: [pfalse]
36153617
compose:
36163618
- FnCall:
36173619
- "svdupq_n_b8"

crates/stdarch-verify/tests/arm.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,10 @@ fn matches(rust: &Function, arm: &Intrinsic) -> Result<(), String> {
352352
bail!("wrong number of const arguments");
353353
}
354354

355-
if rust.instrs.is_empty() && arm.instruction != "" {
355+
if rust.instrs.is_empty()
356+
&& arm.instruction != ""
357+
&& !SKIP_ASSERT_INSTR_TESTS.contains(&rust.name)
358+
{
356359
bail!(
357360
"instruction not listed for `{}`, but arm lists {:?}",
358361
rust.name,
@@ -671,6 +674,11 @@ fn parse_ty_base(s: &str) -> &'static Type {
671674
}
672675
}
673676

677+
// FIXME(arm-maintainers): Some tests require new rustc intrinsics in order to generate
678+
// the appropriate instruction, though they do have the correct behaviour - these will be fixed
679+
// but are disabled for now.
680+
static SKIP_ASSERT_INSTR_TESTS: &'static [&'static str] = &["svpfalse_b"];
681+
674682
// FIXME(arm-maintainers): With the advent of the `intrinsic-test` tool, new tests of this kind
675683
// are no longer being added and just adding to this list indefinitely isn't the best solution for
676684
// dealing with that.

0 commit comments

Comments
 (0)