From a27f3e3fd1e4d16160f8885b6b06665b5319f56c Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 21 Jul 2025 14:34:12 +0200 Subject: Rename `tests/codegen` into `tests/codegen-llvm` --- tests/codegen-llvm/simd/simd_arith_offset.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/codegen-llvm/simd/simd_arith_offset.rs (limited to 'tests/codegen-llvm/simd/simd_arith_offset.rs') diff --git a/tests/codegen-llvm/simd/simd_arith_offset.rs b/tests/codegen-llvm/simd/simd_arith_offset.rs new file mode 100644 index 00000000000..210b4e9bb50 --- /dev/null +++ b/tests/codegen-llvm/simd/simd_arith_offset.rs @@ -0,0 +1,22 @@ +//@ compile-flags: -C no-prepopulate-passes +//@ only-64bit (because the LLVM type of i64 for usize shows up) +// + +#![crate_type = "lib"] +#![feature(repr_simd, core_intrinsics)] + +#[path = "../../auxiliary/minisimd.rs"] +mod minisimd; +use std::intrinsics::simd::simd_arith_offset; + +use minisimd::*; + +/// A vector of *const T. +pub type SimdConstPtr = Simd<*const T, LANES>; + +// CHECK-LABEL: smoke +#[no_mangle] +pub fn smoke(ptrs: SimdConstPtr, offsets: Simd) -> SimdConstPtr { + // CHECK: getelementptr i8, <8 x ptr> %0, <8 x i64> %1 + unsafe { simd_arith_offset(ptrs, offsets) } +} -- cgit 1.4.1-3-g733a5