-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Add codegen test for SLP vectorization #151958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add codegen test for SLP vectorization #151958
Conversation
This comment has been minimized.
This comment has been minimized.
|
This should probably be |
|
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit
| @@ -0,0 +1,25 @@ | |||
| //@ only-x86_64 | |||
There was a problem hiding this comment.
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.
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…-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>).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing min-llvm-version.
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Nikita Popov <github@npopov.com>
|
@bors r+ squash |
…-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>).
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`)
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>).
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`)
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>).