Skip to content

Commit

Permalink
Update codegen tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jhorstmann committed Mar 1, 2024
1 parent 8345b0c commit 2abd0f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions tests/assembly/simd-intrinsic-mask-reduce.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// verify that simd mask reductions do not introduce additional bit shift operations
// revisions: x86 aarch64
// [x86] compile-flags: --target=x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
// [x86] needs-llvm-components: x86
// [aarch64] compile-flags: --target=aarch64-unknown-linux-gnu
// [aarch64] needs-llvm-components: aarch64
// [aarch64] min-llvm-version: 15.0
// assembly-output: emit-asm
// compile-flags: --crate-type=lib -O
//@ revisions: x86 aarch64
//@ [x86] compile-flags: --target=x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
//@ [x86] needs-llvm-components: x86
//@ [aarch64] compile-flags: --target=aarch64-unknown-linux-gnu
//@ [aarch64] needs-llvm-components: aarch64
//@ [aarch64] min-llvm-version: 15.0
//@ assembly-output: emit-asm
//@ compile-flags: --crate-type=lib -O

#![feature(no_core, lang_items, repr_simd, platform_intrinsics)]
#![feature(no_core, lang_items, repr_simd, intrinsics)]
#![no_core]
#![allow(non_camel_case_types)]

Expand All @@ -22,7 +22,7 @@ trait Copy {}
#[repr(simd)]
pub struct mask8x16([i8; 16]);

extern "platform-intrinsic" {
extern "rust-intrinsic" {
fn simd_reduce_all<T>(x: T) -> bool;
fn simd_reduce_any<T>(x: T) -> bool;
}
Expand All @@ -32,7 +32,7 @@ extern "platform-intrinsic" {
pub unsafe fn mask_reduce_all(m: mask8x16) -> bool {
// x86: movdqa
// x86-NEXT: pmovmskb
// aarch64: cmgt
// aarch64: cmge
// aarch64-NEXT: umaxv
simd_reduce_all(m)
}
Expand Down
6 changes: 3 additions & 3 deletions tests/codegen/simd-intrinsic/simd-intrinsic-mask-reduce.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// compile-flags: -C no-prepopulate-passes
//@ compile-flags: -C no-prepopulate-passes
//

#![crate_type = "lib"]
#![feature(repr_simd, platform_intrinsics)]
#![feature(repr_simd, intrinsics)]
#![allow(non_camel_case_types)]

#[repr(simd)]
Expand All @@ -13,7 +13,7 @@ pub struct mask32x2(i32, i32);
#[derive(Copy, Clone)]
pub struct mask8x16(i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8);

extern "platform-intrinsic" {
extern "rust-intrinsic" {
fn simd_reduce_all<T>(x: T) -> bool;
fn simd_reduce_any<T>(x: T) -> bool;
}
Expand Down

0 comments on commit 2abd0f0

Please sign in to comment.