Skip to content

loongarch: Avoid constant folding in tests to ensure SIMD coverage#2075

Open
heiher wants to merge 1 commit intorust-lang:mainfrom
heiher:loong64-tests-avoid-const-folding
Open

loongarch: Avoid constant folding in tests to ensure SIMD coverage#2075
heiher wants to merge 1 commit intorust-lang:mainfrom
heiher:loong64-tests-avoid-const-folding

Conversation

@heiher
Copy link
Copy Markdown
Contributor

@heiher heiher commented Apr 9, 2026

Use black_box on SIMD intrinsic inputs to prevent the compiler from constant folding SIMD operations, ensuring the corresponding SIMD instructions are actually emitted and covered by tests.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 9, 2026

r? @sayantn

rustbot has assigned @sayantn.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Amanieu, @folkertdev, @sayantn
  • @Amanieu, @folkertdev, @sayantn expanded to Amanieu, folkertdev, sayantn
  • Random selection from Amanieu, folkertdev, sayantn

@heiher heiher force-pushed the loong64-tests-avoid-const-folding branch from f1fa465 to 4bdc281 Compare April 11, 2026 05:13
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 11, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Comment on lines -13 to -14
-111, -98, 47, -106, -82, -72, -70, 0, 110, -61, -20, 36, 41, -103, 42, 95, 15, -11,
-25, -5, 40, -63, 56, -39, 43, 127, 86, 75, -48, -32, 72, 69,
Copy link
Copy Markdown
Contributor

@sayantn sayantn Apr 11, 2026

Choose a reason for hiding this comment

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

View changes since the review

that's weird, why did this formatting change?? The changes only added black_box!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Did the new rustfmt version change the default settings? All I did was regenerate and run rustfmt.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was caused by a change in rustfmt's max-width. I've reformatted the code, and the diff should be clean now.

Use `black_box` on SIMD intrinsic inputs to prevent the compiler from
constant folding SIMD operations, ensuring the corresponding SIMD
instructions are actually emitted and covered by tests.
@heiher heiher force-pushed the loong64-tests-avoid-const-folding branch from 4bdc281 to ab81338 Compare April 11, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants