-
Notifications
You must be signed in to change notification settings - Fork 12k
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
[LoopVectorize] Miscompile with iteration-local scoped alias metadata #79137
Comments
Well, I guess the actual problem here is in LAA rather than LoopVectorize proper. Debug log:
When constructing the AST we get the LocationSize to BeforeOrAfter, but we retain the AATags, which is generally not valid. |
nikic
added a commit
that referenced
this issue
Jan 23, 2024
nikic
added a commit
to nikic/llvm-project
that referenced
this issue
Jan 23, 2024
LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137.
nikic
added a commit
to nikic/llvm-project
that referenced
this issue
Jan 24, 2024
LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137.
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this issue
Jan 26, 2024
…lvm#79161) LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137. (cherry picked from commit cd7ea4e)
/pull-request #79561 |
@mjbedy: But pull request is still open. |
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this issue
Jan 28, 2024
…lvm#79161) LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137. (cherry picked from commit cd7ea4e)
nikic
added a commit
to nikic/llvm-project
that referenced
this issue
Feb 1, 2024
(cherry picked from commit 0c02b2e)
nikic
added a commit
to nikic/llvm-project
that referenced
this issue
Feb 1, 2024
…lvm#79161) LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137. (cherry picked from commit cd7ea4e)
PR has been created, we will track the status there. |
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this issue
Feb 3, 2024
…lvm#79161) LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137. (cherry picked from commit cd7ea4e)
cuviper
pushed a commit
to rust-lang/llvm-project
that referenced
this issue
Feb 13, 2024
(cherry picked from commit 0c02b2e)
cuviper
pushed a commit
to rust-lang/llvm-project
that referenced
this issue
Feb 13, 2024
…lvm#79161) LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137. (cherry picked from commit cd7ea4e)
tstellar
pushed a commit
to tstellar/llvm-project
that referenced
this issue
Feb 14, 2024
…lvm#79161) LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137. (cherry picked from commit cd7ea4e)
tstellar
pushed a commit
to tstellar/llvm-project
that referenced
this issue
Feb 14, 2024
…lvm#79161) LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137. (cherry picked from commit cd7ea4e)
tstellar
pushed a commit
to tstellar/llvm-project
that referenced
this issue
Feb 14, 2024
…lvm#79161) LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137. (cherry picked from commit cd7ea4e)
tstellar
pushed a commit
to tstellar/llvm-project
that referenced
this issue
Feb 14, 2024
…lvm#79161) LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137. (cherry picked from commit cd7ea4e)
MingcongBai
pushed a commit
to AOSC-Tracking/llvm-project
that referenced
this issue
Mar 26, 2024
(cherry picked from commit 0c02b2e)
MingcongBai
pushed a commit
to AOSC-Tracking/llvm-project
that referenced
this issue
Mar 26, 2024
…lvm#79161) LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes llvm#79137. (cherry picked from commit cd7ea4e)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
C reproducer: https://clang.godbolt.org/z/f6rE4jvhM
IR reproducer: https://llvm.godbolt.org/z/7anbPon8K
The current and previous value are only noalias within the iteration (per the location of the
@llvm.experimental.noalias.scope.decl
), but the vectorization appears to assume that the underlying objects don't alias.The text was updated successfully, but these errors were encountered: