1 // compile-flags: -C no-prepopulate-passes
2 // only-64bit (because the LLVM type of i64 for usize shows up)
6 #![feature(repr_simd, platform_intrinsics)]
8 extern "platform-intrinsic" {
9 pub(crate) fn simd_arith_offset
<T
, U
>(ptrs
: T
, offsets
: U
) -> T
;
12 /// A vector of *const T.
13 #[derive(Debug, Copy, Clone)]
15 pub struct SimdConstPtr
<T
, const LANES
: usize>([*const T
; LANES
]);
17 #[derive(Debug, Copy, Clone)]
19 pub struct Simd
<T
, const LANES
: usize>([T
; LANES
]);
23 pub fn smoke(ptrs
: SimdConstPtr
<u8, 8>, offsets
: Simd
<usize, 8>) -> SimdConstPtr
<u8, 8> {
24 // CHECK: getelementptr i8, <8 x {{i8\*|ptr}}> %_3, <8 x i64> %_4
25 unsafe { simd_arith_offset(ptrs, offsets) }