Skip to content

Commit af69cc0

Browse files
committed
Make test more targeted.
1 parent 75f3faf commit af69cc0

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/test/ui/simd/issue-105439.rs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
// This is used to ICE with MIR inlining enabled due to an invalid bitcast.
2-
// run-pass
3-
// compile-flags: -O -Zmir-opt-level=3
4-
#![feature(portable_simd)]
5-
6-
use std::simd::Simd;
7-
8-
fn main() {
9-
let a = Simd::from_array([0, 4, 1, 5]);
10-
let b = Simd::from_array([2, 6, 3, 7]);
11-
let (x, y) = a.deinterleave(b);
12-
assert_eq!(x.to_array(), [0, 1, 2, 3]);
13-
assert_eq!(y.to_array(), [4, 5, 6, 7]);
1+
// build-pass
2+
3+
#![crate_type = "lib"]
4+
5+
#![feature(repr_simd)]
6+
#![feature(platform_intrinsics)]
7+
8+
#[allow(non_camel_case_types)]
9+
#[derive(Clone, Copy)]
10+
#[repr(simd)]
11+
pub struct i32x4([i32; 4]);
12+
13+
pub fn f(a: i32x4) -> [i32; 4] {
14+
let b = a;
15+
b.0
1416
}

0 commit comments

Comments
 (0)