Skip to content

Conversation

@chahar-ritik
Copy link
Contributor

@chahar-ritik chahar-ritik commented Feb 1, 2026

close: #142519

This PR adds a codegen regression test for #142519. A regression in LLVM to fail to auto-vectorize, leading to significant performance loss.

The SLP vectorizer correctly groups the 4-byte operations into <4 x i8> vectors.

The loop state is maintained in SIMD registers (phi <4 x i8>).

The test remains robust across architectures (AArch64 vs x86_64) by allowing flexible store types (i32 or <4 x i8>).

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 1, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 1, 2026

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@nikic
Copy link
Contributor

nikic commented Feb 1, 2026

This should probably be only-x86_64 (it's presumably not going to produce vectors ops on targets without vector support).

@chahar-ritik
Copy link
Contributor Author

Thanks for the guidance, @nikic I'm a new contributor, so I appreciate the help with the test directives. I've updated the test to only-x86_64

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,25 @@
//@ only-x86_64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: please leave a backlink to #142519, e.g.

//! Regression test for #142519.

@jieyouxu
Copy link
Member

jieyouxu commented Feb 2, 2026

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 2, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 2, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@bors r+ rollup squash

View changes since this review

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 2, 2026

📌 Commit c64f9a0 has been approved by jieyouxu

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 2, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 2, 2026
…-test, r=jieyouxu

Add codegen test for SLP vectorization

close: rust-lang#142519

This PR adds a codegen regression test for rust-lang#142519. A regression in LLVM to fail to auto-vectorize, leading to significant performance loss.

The SLP vectorizer correctly groups the 4-byte operations into <4 x i8> vectors.

The loop state is maintained in SIMD registers (phi <4 x i8>).

The test remains robust across architectures (AArch64 vs x86_64) by allowing flexible store types (i32 or <4 x i8>).
rust-bors bot pushed a commit that referenced this pull request Feb 2, 2026
Rollup of 5 pull requests

Successful merges:

 - #151825 (more float constants)
 - #151958 (Add codegen test for SLP vectorization)
 - #151974 (Update documentation for `Result::ok()`)
 - #151978 (Query cleanups)
 - #151979 (Fix uninitialized UEFI globals in tests)
@jhpratt
Copy link
Member

jhpratt commented Feb 2, 2026

@bors r-

#151984 (comment)

@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 2, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 2, 2026

Commit c64f9a0 has been unapproved.

This PR was contained in a rollup (#151984), which was also unapproved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing min-llvm-version.

@chahar-ritik
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 2, 2026
@rust-log-analyzer

This comment has been minimized.

Co-authored-by: Nikita Popov <github@npopov.com>
@chahar-ritik chahar-ritik requested a review from jieyouxu February 2, 2026 13:43
@jieyouxu
Copy link
Member

jieyouxu commented Feb 2, 2026

@bors r+ squash

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 2, 2026

📌 Commit 8476e89 has been approved by jieyouxu

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 Feb 2, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 2, 2026
…-test, r=jieyouxu

Add codegen test for SLP vectorization

close: rust-lang#142519

This PR adds a codegen regression test for rust-lang#142519. A regression in LLVM to fail to auto-vectorize, leading to significant performance loss.

The SLP vectorizer correctly groups the 4-byte operations into <4 x i8> vectors.

The loop state is maintained in SIMD registers (phi <4 x i8>).

The test remains robust across architectures (AArch64 vs x86_64) by allowing flexible store types (i32 or <4 x i8>).
rust-bors bot pushed a commit that referenced this pull request Feb 2, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #151958 (Add codegen test for SLP vectorization)
 - #151974 (Update documentation for `Result::ok()`)
 - #151975 (Work around rustfmt giving up on a large expression)
 - #151999 (attribute parsing: pass recovery mode to Parser.)
rust-bors bot pushed a commit that referenced this pull request Feb 2, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #151958 (Add codegen test for SLP vectorization)
 - #151974 (Update documentation for `Result::ok()`)
 - #151975 (Work around rustfmt giving up on a large expression)
 - #151999 (attribute parsing: pass recovery mode to Parser.)
rust-bors bot pushed a commit that referenced this pull request Feb 2, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #151958 (Add codegen test for SLP vectorization)
 - #151974 (Update documentation for `Result::ok()`)
 - #151975 (Work around rustfmt giving up on a large expression)
 - #151999 (attribute parsing: pass recovery mode to Parser.)
rust-bors bot pushed a commit that referenced this pull request Feb 3, 2026
Rollup of 11 pull requests

Successful merges:

 - #151378 (Codegen tests for Arm Cortex-R82)
 - #151936 (Move the `fingerprint_style` special case into `DepKindVTable` creation)
 - #152018 (Move bigint helper tracking issues)
 - #151958 (Add codegen test for SLP vectorization)
 - #151974 (Update documentation for `Result::ok()`)
 - #151975 (Work around rustfmt giving up on a large expression)
 - #151990 (Fix missing unused_variables lint when using a match guard)
 - #151995 (stabilize ptr_as_ref_unchecked)
 - #151999 (attribute parsing: pass recovery mode to Parser.)
 - #152009 (Port rustc_preserve_ub_checks to attr parser)
 - #152022 (rustc-dev-guide subtree update)

Failed merges:

 - #151968 (Remove `HasDepContext` by merging it into `QueryContext`)
@rust-bors rust-bors bot merged commit e2c5b89 into rust-lang:main Feb 3, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 3, 2026
rust-timer added a commit that referenced this pull request Feb 3, 2026
Rollup merge of #151958 - chahar-ritik:add-slp-vectorization-test, r=jieyouxu

Add codegen test for SLP vectorization

close: #142519

This PR adds a codegen regression test for #142519. A regression in LLVM to fail to auto-vectorize, leading to significant performance loss.

The SLP vectorizer correctly groups the 4-byte operations into <4 x i8> vectors.

The loop state is maintained in SIMD registers (phi <4 x i8>).

The test remains robust across architectures (AArch64 vs x86_64) by allowing flexible store types (i32 or <4 x i8>).
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Feb 4, 2026
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#151378 (Codegen tests for Arm Cortex-R82)
 - rust-lang/rust#151936 (Move the `fingerprint_style` special case into `DepKindVTable` creation)
 - rust-lang/rust#152018 (Move bigint helper tracking issues)
 - rust-lang/rust#151958 (Add codegen test for SLP vectorization)
 - rust-lang/rust#151974 (Update documentation for `Result::ok()`)
 - rust-lang/rust#151975 (Work around rustfmt giving up on a large expression)
 - rust-lang/rust#151990 (Fix missing unused_variables lint when using a match guard)
 - rust-lang/rust#151995 (stabilize ptr_as_ref_unchecked)
 - rust-lang/rust#151999 (attribute parsing: pass recovery mode to Parser.)
 - rust-lang/rust#152009 (Port rustc_preserve_ub_checks to attr parser)
 - rust-lang/rust#152022 (rustc-dev-guide subtree update)

Failed merges:

 - rust-lang/rust#151968 (Remove `HasDepContext` by merging it into `QueryContext`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Function no longer auto-vectorizes in 1.87.0

6 participants