]>
Commit | Line | Data |
---|---|---|
5bcae85e SL |
1 | // Copyright 2016 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
b7449926 XL |
11 | // run-pass |
12 | #![allow(stable_features)] | |
13 | #![allow(non_camel_case_types)] | |
14 | ||
5bcae85e SL |
15 | // Test that removed LLVM SIMD intrinsics continue |
16 | // to work via the "AutoUpgrade" mechanism. | |
17 | ||
18 | #![feature(cfg_target_feature, repr_simd)] | |
19 | #![feature(platform_intrinsics, stmt_expr_attributes)] | |
20 | ||
21 | #[repr(simd)] | |
22 | #[derive(PartialEq, Debug)] | |
23 | struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16); | |
24 | ||
25 | fn main() { | |
26 | #[cfg(target_feature = "sse2")] unsafe { | |
27 | extern "platform-intrinsic" { | |
28 | fn x86_mm_min_epi16(x: i16x8, y: i16x8) -> i16x8; | |
29 | } | |
30 | assert_eq!(x86_mm_min_epi16(i16x8(0, 1, 2, 3, 4, 5, 6, 7), | |
31 | i16x8(7, 6, 5, 4, 3, 2, 1, 0)), | |
32 | i16x8(0, 1, 2, 3, 3, 2, 1, 0)); | |
33 | }; | |
34 | } |