Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c0c2185
Stabilize LoongArch CRC intrinsics
heiher May 25, 2026
09d22ac
Correct some wrong uses of LLVM intrinsics
sayantn May 30, 2026
2dd54ff
Use `unadjusted` ABI everywhere
sayantn May 31, 2026
a444517
Prepare for merging from rust-lang/rust
invalid-email-address Jun 8, 2026
e6bcef3
Merge ref '029c9e18dd1f' from rust-lang/rust
invalid-email-address Jun 8, 2026
1709e20
intrinsic-test: remove now-unnecessary feat attr
davidtwco Jun 9, 2026
ffdf5d0
Merge pull request #2156 from rust-lang/rustc-pull
davidtwco Jun 9, 2026
bc34a3f
Merge pull request #2144 from sayantn/llvm-intrinsics
adamgemmell Jun 10, 2026
9b80946
loongarch: Remove explicit zero-extension from CRC[C].W.{B,H}.W
heiher Jun 11, 2026
1d67d0d
Update rand to 0.9.3 to fix GHSA-cq8v-f236-94qc
ruyrocha Jun 4, 2026
72abf46
Merge pull request #2149 from ruyrocha/hotfix/bump-rand-version
davidtwco Jun 12, 2026
50897da
Merge pull request #2137 from heiher/stabilize-loong64-crc
folkertdev Jun 13, 2026
22fdc30
Merge pull request #2159 from heiher/crc
sayantn Jun 13, 2026
3f5f981
arm-intrinsics: `svget{2,3,4}`
davidtwco Jun 1, 2026
992cb1d
arm-intrinsics: `svset{2,3,4}`
davidtwco Jun 1, 2026
35e9bf6
core_arch: redefine `svrev_b{16,32,64}`
davidtwco Jun 15, 2026
6346107
core_arch: redefine `sv{zip,uzp}_b{16,32,64}`
davidtwco Jun 15, 2026
ae20f10
intrinsic-test: fwd args in `intrinsic-test.sh`
davidtwco Jun 15, 2026
da637ab
Merge pull request #2162 from davidtwco/intrinsic-data-update-sve
adamgemmell Jun 16, 2026
cf43ffa
Merge pull request #2164 from davidtwco/intrinsic-test-fwd-args
adamgemmell Jun 16, 2026
89b4de5
Merge pull request #2163 from davidtwco/intrinsic-redefinition-svrev-…
adamgemmell Jun 16, 2026
37df0fc
Prepare for merging from rust-lang/rust
invalid-email-address Jun 19, 2026
9020baf
Merge ref '8e150217bafc' from rust-lang/rust
invalid-email-address Jun 19, 2026
ca7c1ad
Merge pull request #2168 from rust-lang/rustc-pull
davidtwco Jun 19, 2026
169a8e9
intrinsic-test: skip unimplemented SVE intrinsics
davidtwco Jun 1, 2026
937c582
intrinsic-test: skip SVE intrinsics on big endian
davidtwco Jun 11, 2026
922330e
intrinsic-test: do not test `svundef*`
davidtwco Jun 15, 2026
dabb59e
intrinsic-test: skip `sveorv*` (llvm-project#203921)
davidtwco Jun 15, 2026
6638cf5
intrinsic-test: skip `svld*_gather_*`
davidtwco Jun 15, 2026
dc2f964
intrinsic-test: no SVE testing under GCC
davidtwco Jun 15, 2026
e8ff32d
intrinsic-test: remove `concatln!`
davidtwco May 20, 2026
92ca3a5
intrinsic-test: remove unnecessary newlines
davidtwco Jun 9, 2026
77a83f2
Add stdarch-gen-common
xonx4l Jun 9, 2026
db43c44
Merge pull request #2157 from xonx4l/stdarch-gen-common
folkertdev Jun 20, 2026
2d471ac
Merge pull request #2169 from davidtwco/intrinsic-test-sve-skips
sayantn Jun 20, 2026
397f748
Merge pull request #2171 from davidtwco/intrinsic-test-formatting-pri…
sayantn Jun 20, 2026
9558c38
intrinsic-test: shorten various type names
davidtwco Jun 2, 2026
a7e203a
intrinsic-test: intrinsic generic over arch not type
davidtwco Jun 2, 2026
2a346c5
intrinsic-test: arg generic over arch not type
davidtwco Jun 9, 2026
764a571
Merge pull request #2170 from davidtwco/intrinsic-test-generic-over-arch
davidtwco Jun 21, 2026
f4b49bc
intrinsic-test: simplify architecture constants
davidtwco Jun 11, 2026
0c9c049
Merge pull request #2172 from davidtwco/intrinsic-test-simplify-consts
davidtwco Jun 21, 2026
62ddde1
intrinsic-test: simplify type printing
davidtwco Jun 1, 2026
bae77b1
intrinsic-test: introduce `get_comparison_function`
davidtwco Jun 1, 2026
9686ccc
intrinsic-test: rename `get_*_function` fns
davidtwco Jun 4, 2026
a8fabf0
Merge pull request #2173 from davidtwco/intrinsic-test-type-printing-…
davidtwco Jun 21, 2026
3515461
use `"llvm.prefetch.p0"` instead of `"llvm.prefetch"`
folkertdev Jun 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/src/intrinsics/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub(crate) fn codegen_llvm_intrinsic_call<'tcx>(
}

match intrinsic {
"llvm.prefetch" => {
"llvm.prefetch.p0" => {
// Nothing to do. This is merely a perf hint.
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/intrinsic/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function
#[cfg(feature = "master")]
pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function<'gcc> {
let gcc_name = match name {
"llvm.prefetch" => {
"llvm.prefetch.p0" => {
let gcc_name = "__builtin_prefetch";
let func = cx.context.get_builtin_function(gcc_name);
cx.functions.borrow_mut().insert(gcc_name.to_string(), func);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
let ptr = args[0].immediate();
let locality = fn_args.const_at(1).to_leaf().to_i32();
self.call_intrinsic(
"llvm.prefetch",
"llvm.prefetch.p0",
&[self.val_ty(ptr)],
&[
ptr,
Expand Down
2 changes: 2 additions & 0 deletions library/stdarch/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ jobs:
cargo run --bin=stdarch-gen-loongarch --release -- crates/stdarch-gen-loongarch/lasx.spec
git diff --exit-code
- name: Check hexagon
env:
STDARCH_GEN_MODE: check
run: |
cargo run -p stdarch-gen-hexagon --release
git diff --exit-code
Expand Down
112 changes: 87 additions & 25 deletions library/stdarch/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,22 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"

[[package]]
name = "errno"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys",
]

[[package]]
name = "fastrand"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"

[[package]]
name = "find-msvc-tools"
version = "0.1.9"
Expand All @@ -282,13 +298,14 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"

[[package]]
name = "getrandom"
version = "0.2.17"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
dependencies = [
"cfg-if",
"libc",
"wasi",
"r-efi 5.3.0",
"wasip2",
]

[[package]]
Expand All @@ -299,7 +316,7 @@ checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
dependencies = [
"cfg-if",
"libc",
"r-efi",
"r-efi 6.0.0",
"rand_core 0.10.0",
"wasip2",
"wasip3",
Expand Down Expand Up @@ -445,6 +462,12 @@ version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"

[[package]]
name = "linux-raw-sys"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"

[[package]]
name = "log"
version = "0.4.29"
Expand All @@ -457,6 +480,12 @@ version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"

[[package]]
name = "once_cell"
version = "1.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"

[[package]]
name = "once_cell_polyfill"
version = "1.70.2"
Expand Down Expand Up @@ -529,7 +558,7 @@ checksum = "95c589f335db0f6aaa168a7cd27b1fc6920f5e1470c804f814d9cd6e62a0f70b"
dependencies = [
"env_logger 0.11.10",
"log",
"rand 0.10.0",
"rand 0.10.1",
]

[[package]]
Expand All @@ -541,6 +570,12 @@ dependencies = [
"proc-macro2",
]

[[package]]
name = "r-efi"
version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"

[[package]]
name = "r-efi"
version = "6.0.0"
Expand All @@ -549,42 +584,41 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"

[[package]]
name = "rand"
version = "0.8.5"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea"
dependencies = [
"libc",
"rand_chacha",
"rand_core 0.6.4",
"rand_core 0.9.5",
]

[[package]]
name = "rand"
version = "0.10.0"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8"
checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207"
dependencies = [
"getrandom 0.4.2",
"rand_core 0.10.0",
]

[[package]]
name = "rand_chacha"
version = "0.3.1"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
dependencies = [
"ppv-lite86",
"rand_core 0.6.4",
"rand_core 0.9.5",
]

[[package]]
name = "rand_core"
version = "0.6.4"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
dependencies = [
"getrandom 0.2.17",
"getrandom 0.3.4",
]

[[package]]
Expand Down Expand Up @@ -648,6 +682,19 @@ version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d"

[[package]]
name = "rustix"
version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
dependencies = [
"bitflags",
"errno",
"libc",
"linux-raw-sys",
"windows-sys",
]

[[package]]
name = "ryu"
version = "1.0.23"
Expand Down Expand Up @@ -787,11 +834,19 @@ dependencies = [
"walkdir",
]

[[package]]
name = "stdarch-gen-common"
version = "0.1.0"
dependencies = [
"tempfile",
]

[[package]]
name = "stdarch-gen-hexagon"
version = "0.1.0"
dependencies = [
"regex",
"stdarch-gen-common",
]

[[package]]
Expand All @@ -805,7 +860,7 @@ dependencies = [
name = "stdarch-gen-loongarch"
version = "0.1.0"
dependencies = [
"rand 0.8.5",
"rand 0.9.4",
]

[[package]]
Expand Down Expand Up @@ -838,7 +893,7 @@ version = "0.0.0"
dependencies = [
"core_arch",
"quickcheck",
"rand 0.8.5",
"rand 0.9.4",
]

[[package]]
Expand All @@ -864,6 +919,19 @@ version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43d0e35dc7d73976a53c7e6d7d177ef804a0c0ee774ec77bcc520c2216fd7cbe"

[[package]]
name = "tempfile"
version = "3.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
dependencies = [
"fastrand",
"getrandom 0.4.2",
"once_cell",
"rustix",
"windows-sys",
]

[[package]]
name = "termcolor"
version = "1.4.1"
Expand Down Expand Up @@ -921,12 +989,6 @@ dependencies = [
"winapi-util",
]

[[package]]
name = "wasi"
version = "0.11.1+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"

[[package]]
name = "wasip2"
version = "1.0.2+wasi-0.2.9"
Expand Down
31 changes: 19 additions & 12 deletions library/stdarch/ci/intrinsic-test.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#!/usr/bin/env sh

set -ex

if [ $# -lt 2 ]; then
>&2 echo "Usage: $0 <TARGET> <CC>"
>&2 echo "Usage: $0 <TARGET> <CC> <..args for \`cargo test\`..>"
exit 1
fi

case ${2} in
set -ex

# Pop both arguments and leave "$@" as containing args to be forwarded to `cargo test`
TARGET="$1"
shift
CC_KIND="$1"
shift

case ${CC_KIND} in
clang)
export CC="${CLANG_PATH}"
CC_ARG_STYLE=clang
Expand All @@ -22,7 +28,7 @@ case ${2} in
CC_ARG_STYLE=clang
;;
*)
>&2 echo "Unknown compiler: ${2}"
>&2 echo "Unknown compiler: ${CC_KIND}"
exit 1
;;
esac
Expand All @@ -35,7 +41,7 @@ echo "PROFILE=${PROFILE}"

INTRINSIC_TEST="--manifest-path=crates/intrinsic-test/Cargo.toml"

case ${1} in
case ${TARGET} in
aarch64_be*)
export CFLAGS="-I${AARCH64_BE_TOOLCHAIN}/aarch64_be-none-linux-gnu/libc/usr/include --sysroot={AARCH64_BE_TOOLCHAIN}/aarch64_be-none-linux-gnu/libc -Wno-nonportable-vector-initialization"
ARCH=aarch64_be
Expand All @@ -60,24 +66,25 @@ case ${1} in

esac

case "${1}" in
case "${TARGET}" in
x86_64-unknown-linux-gnu*)
env -u CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER \
cargo run "${INTRINSIC_TEST}" --release \
--bin intrinsic-test -- intrinsics_data/x86-intel.xml \
--skip "crates/intrinsic-test/missing_${ARCH}_common.txt" \
--skip "crates/intrinsic-test/missing_${ARCH}_${2}.txt" \
--target "${1}" \
--skip "crates/intrinsic-test/missing_${ARCH}_${CC_KIND}.txt" \
--target "${TARGET}" \
--cc-arg-style "${CC_ARG_STYLE}"
;;
*)
cargo run "${INTRINSIC_TEST}" --release \
--bin intrinsic-test -- intrinsics_data/arm_intrinsics.json \
--skip "crates/intrinsic-test/missing_${ARCH}_common.txt" \
--skip "crates/intrinsic-test/missing_${ARCH}_${2}.txt" \
--target "${1}" \
--skip "crates/intrinsic-test/missing_${ARCH}_${CC_KIND}.txt" \
--target "${TARGET}" \
--cc-arg-style "${CC_ARG_STYLE}"
;;
esac

cargo test --manifest-path=rust_programs/Cargo.toml --target "${1}" --profile "${PROFILE}" --tests
cargo test --manifest-path=rust_programs/Cargo.toml --target "${TARGET}" --profile "${PROFILE}" \
--tests "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -11903,7 +11903,7 @@ pub unsafe fn vluti4q_lane_s8<const LANE: i32>(a: int8x16_t, b: uint8x8_t) -> in
unsafe extern "unadjusted" {
#[cfg_attr(
any(target_arch = "aarch64", target_arch = "arm64ec"),
link_name = "llvm.aarch64.neon.vluti4q.lane.v8i8"
link_name = "llvm.aarch64.neon.vluti4q.lane.v16i8"
)]
fn _vluti4q_lane_s8(a: int8x16_t, b: uint8x8_t, n: i32) -> int8x16_t;
}
Expand Down
2 changes: 1 addition & 1 deletion library/stdarch/crates/core_arch/src/aarch64/prefetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use stdarch_test::assert_instr;

unsafe extern "unadjusted" {
#[link_name = "llvm.prefetch"]
#[link_name = "llvm.prefetch.p0"]
fn prefetch(p: *const i8, rw: i32, loc: i32, ty: i32);
}

Expand Down
Loading
Loading