Skip to content

Commit

Permalink
Switch test back to run-pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
luqmana committed May 5, 2023
1 parent 2942121 commit 7b1eeda
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions tests/ui/simd/issue-105439.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
// build-pass

#![crate_type = "lib"]
// run-pass
// compile-flags: -O -Zverify-llvm-ir

#![feature(repr_simd)]
#![feature(platform_intrinsics)]

#[allow(non_camel_case_types)]
#[derive(Clone, Copy)]
#[repr(simd)]
pub struct i32x4([i32; 4]);
struct i32x4([i32; 4]);

extern "platform-intrinsic" {
pub(crate) fn simd_add<T>(x: T, y: T) -> T;
}

#[inline(always)]
fn to_array(a: i32x4) -> [i32; 4] {
a.0
}

pub fn f(a: i32x4) -> [i32; 4] {
let b = a;
b.0
fn main() {
let a = i32x4([1, 2, 3, 4]);
let b = unsafe { simd_add(a, a) };
assert_eq!(to_array(b), [2, 4, 6, 8]);
}

0 comments on commit 7b1eeda

Please sign in to comment.