Skip to content

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

folkertdev and others added 9 commits January 19, 2026 16:48
Hexagon assembler uses `.string` directive instead of `.asciz` for
null-terminated strings. Both are equivalent but the test was only
checking for `.asciz`.

Update the CHECK patterns to accept both directives using
`.{{asciz|string}}` regex pattern.
…modifiers

To make it clearer what happens. In other words, do not silently keep
modifiers as part of `AuxCrate::name`.
…bilee

add `simd_splat` intrinsic

Add `simd_splat` which lowers to the LLVM canonical splat sequence.

```llvm
insertelement <N x elem> poison, elem %x, i32 0
shufflevector <N x elem> v0, <N x elem> poison, <N x i32> zeroinitializer
```

Right now we try to fake it using one of

```rust
fn splat(x: u32) -> u32x8 {
    u32x8::from_array([x; 8])
}
```

or (in `stdarch`)

```rust
fn splat(value: $elem_type) -> $name {
    #[derive(Copy, Clone)]
    #[repr(simd)]
    struct JustOne([$elem_type; 1]);
    let one = JustOne([value]);
    // SAFETY: 0 is always in-bounds because we're shuffling
    // a simd type with exactly one element.
    unsafe { simd_shuffle!(one, one, [0; $len]) }
}
```

Both of these can confuse the LLVM optimizer, producing sub-par code. Some examples:

- rust-lang#60637
- rust-lang#137407
- rust-lang#122623
- rust-lang#97804

---

As far as I can tell there is no way to provide a fallback implementation for this intrinsic, because there is no `const` way of evaluating the number of elements (there might be issues beyond that, too). So, I added implementations for all 4 backends.

Both GCC and const-eval appear to have some issues with simd vectors containing pointers. I have a workaround for GCC, but haven't yet been able to make const-eval work. See the comments below.

Currently this just adds the intrinsic, it does not actually use it anywhere yet.
compiletest: Make `aux-crate` directive explicitly handle `--extern` modifiers

With `-Zunstable-options` it is possible to pass options to `--extern`. See here for an exhaustive list of possible options:
https://github.com/rust-lang/rust/blob/b5dd72d2921500c9d9e15f074e1d831adcaa3dee/compiler/rustc_session/src/config.rs#L2356-L2367

Using these options works with the `aux-crate` directive, but only because the options pretend to be part of the name. Make it clearer what `aux-crate` supports by explicitly handling `--extern` options.

This PR is step one of splitting up rust-lang#151258 into smaller pieces.

r? @Zalathar
…ss35

Fix cstring-merging test for Hexagon target

Hexagon assembler uses `.string` directive instead of `.asciz` for null-terminated strings. Both are equivalent but the test was only checking for `.asciz`.

Update the CHECK patterns to accept both directives using `.{{asciz|string}}` regex pattern.
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Jan 24, 2026
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 24, 2026
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 24, 2026

📌 Commit 64cb0f4 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 24, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 24, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #151346 (add `simd_splat` intrinsic)
 - #151353 (compiletest: Make `aux-crate` directive explicitly handle `--extern` modifiers)
 - #151571 (Fix cstring-merging test for Hexagon target)

r? @ghost
@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux-alt failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   |               +                                              +

warning: `compiletest` (lib doc) generated 1 warning (run `cargo fix --lib -p compiletest` to apply 1 suggestion)
    Finished `release` profile [optimized + debuginfo] target(s) in 12.10s
error: warnings are denied by `build.warnings` configuration
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo doc -Zwarnings --target x86_64-unknown-linux-gnu -Zbinary-dep-depinfo -j 8 -Zroot-dir=/checkout --locked --color=always --profile=release --manifest-path /checkout/src/tools/compiletest/Cargo.toml -Zskip-rustdoc-fingerprint --no-deps --lib -p compiletest [workdir=/checkout]` failed with exit code 101
Created at: src/bootstrap/src/core/build_steps/tool.rs:191:21
Executed at: src/bootstrap/src/core/build_steps/doc.rs:1217:1

Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `dist --host x86_64-unknown-linux-gnu --target x86_64-unknown-linux-gnu --include-default-paths build-manifest bootstrap`
Build completed unsuccessfully in 1:11:16
  local time: Sat Jan 24 14:52:06 UTC 2026
  network time: Sat, 24 Jan 2026 14:52:06 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@rust-bors rust-bors bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 24, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 24, 2026

💔 Test for 62900e7 failed: CI. Failed job:

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants