-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Wrong code at -O2/3 on x86_64-linux_gnu (a latent regression since Clang-15) #64047
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
Closed
shao-hua-li opened this issue
Jul 23, 2023
· 7 comments
· Fixed by llvm/llvm-project-release-prs#676
Closed
Wrong code at -O2/3 on x86_64-linux_gnu (a latent regression since Clang-15) #64047
shao-hua-li opened this issue
Jul 23, 2023
· 7 comments
· Fixed by llvm/llvm-project-release-prs#676
Milestone
Comments
Bisect to 4e5e042, which was commited by @igogo-x86 . |
@shao-hua-li, thank you! I'll look into it. |
Pre-commit - https://reviews.llvm.org/D157630 |
/branch llvm/llvm-project-release-prs/issue64047 |
llvmbot
pushed a commit
to llvm/llvm-project-release-prs
that referenced
this issue
Aug 31, 2023
…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)
/branch llvm/llvm-project-release-prs/issue64047 |
llvmbot
pushed a commit
to llvm/llvm-project-release-prs
that referenced
this issue
Aug 31, 2023
…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)
/pull-request llvm/llvm-project-release-prs#676 |
tru
pushed a commit
to llvm/llvm-project-release-prs
that referenced
this issue
Sep 11, 2023
…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)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This looks like a long-standing issue since Clang-15. Clang at -O2/3 produces the wrong code.
opt-bisect-limit
suggests that the issue might be inLoopVectorizePass
.Compiler explorer: https://godbolt.org/z/dssMcdz55
The text was updated successfully, but these errors were encountered: