Skip to content

Commit 7b1eeda

Browse files
committed
Switch test back to run-pass.
1 parent 2942121 commit 7b1eeda

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

tests/ui/simd/issue-105439.rs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1-
// build-pass
2-
3-
#![crate_type = "lib"]
1+
// run-pass
2+
// compile-flags: -O -Zverify-llvm-ir
43

54
#![feature(repr_simd)]
65
#![feature(platform_intrinsics)]
76

87
#[allow(non_camel_case_types)]
98
#[derive(Clone, Copy)]
109
#[repr(simd)]
11-
pub struct i32x4([i32; 4]);
10+
struct i32x4([i32; 4]);
11+
12+
extern "platform-intrinsic" {
13+
pub(crate) fn simd_add<T>(x: T, y: T) -> T;
14+
}
15+
16+
#[inline(always)]
17+
fn to_array(a: i32x4) -> [i32; 4] {
18+
a.0
19+
}
1220

13-
pub fn f(a: i32x4) -> [i32; 4] {
14-
let b = a;
15-
b.0
21+
fn main() {
22+
let a = i32x4([1, 2, 3, 4]);
23+
let b = unsafe { simd_add(a, a) };
24+
assert_eq!(to_array(b), [2, 4, 6, 8]);
1625
}

0 commit comments

Comments
 (0)