Skip to content

PR for llvm/llvm-project#64047 #676

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

Merged
merged 2 commits into from
Sep 11, 2023
Merged

PR for llvm/llvm-project#64047 #676

merged 2 commits into from
Sep 11, 2023

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Aug 31, 2023

Differential Revision: https://reviews.llvm.org/D157630

(cherry picked from commit 2df9ed11c51ebf6d19f7cb22c3794d1bd460ddf8)
…e multiple reductions.

When a loop has multiple reductions, each with an intermediate invariant
store, the order in which those reductions are processed is not considered.
This can result in the invariant stores outside the loop not preserving the
original order.
This patch sorts VPReductionPHIRecipes by the order in which they have
stores in the original loop before running
`InnerLoopVectorizer::fixReduction` function, and it helps to maintain
the correct order of stores.

Fixes llvm/llvm-project#64047

Differential Revision: https://reviews.llvm.org/D157631

(cherry picked from commit ac65fb869977185b44757b94dc5130bd08c6f7e2)
@llvmbot
Copy link
Member Author

llvmbot commented Aug 31, 2023

@fhahn @david-arm What do you think about merging this PR to the release branch?

@tru
Copy link
Contributor

tru commented Sep 5, 2023

This issue missed RC4. The next release is 17.0.0-final. We only take on patches that fix crashes, severe miscompiles, or regressions for the next two weeks. Keep that in mind when reviewing this PR.

@david-arm
Copy link
Contributor

LGTM. This fixes a serious miscompile from the LoopVectorizer.

@fhahn
Copy link
Contributor

fhahn commented Sep 5, 2023

@tru this would be good to pick, if possible, thanks!

@tru tru merged commit 1174205 into release/17.x Sep 11, 2023
@tru tru deleted the llvm-issue64047 branch September 11, 2023 06:53
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.

Wrong code at -O2/3 on x86_64-linux_gnu (a latent regression since Clang-15)
5 participants