-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[Attributor] Loads in readonly functions are replaced with wrong value #53726
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
Labels
Milestone
Comments
/cherry-pick d1387a2 |
/branch llvmbot/llvm-project/issue53726 |
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this issue
Feb 11, 2022
The oversight caused us to ignore call sites that are effectively dead when we computed reachability (or more precise the call edges of a function). The problem is that loads in the readonly callee might depend on stores prior to the callee. If we do not track the call edge we mistakenly assumed the store before the call cannot reach the load. The problem is nicely visible in: `llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll` Caused by D118673. Fixes llvm#53726 (cherry picked from commit d1387a2)
/pull-request llvmbot#41 |
jdoerfert
added a commit
to jdoerfert/llvm-project
that referenced
this issue
Feb 17, 2022
The oversight caused us to ignore call sites that are effectively dead when we computed reachability (or more precise the call edges of a function). The problem is that loads in the readonly callee might depend on stores prior to the callee. If we do not track the call edge we mistakenly assumed the store before the call cannot reach the load. The problem is nicely visible in: `llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll` Caused by D118673. Fixes llvm#53726
/branch jdoerfert/llvm-project/issue53726 |
/pull-request llvmbot#73 |
tstellar
pushed a commit
to llvmbot/llvm-project
that referenced
this issue
Feb 21, 2022
The oversight caused us to ignore call sites that are effectively dead when we computed reachability (or more precise the call edges of a function). The problem is that loads in the readonly callee might depend on stores prior to the callee. If we do not track the call edge we mistakenly assumed the store before the call cannot reach the load. The problem is nicely visible in: `llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll` Caused by D118673. Fixes llvm#53726
Merged: 13fdc7a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Readonly function calls are assumed dead if the return value is assumed dead. This is OK but we cannot ignore them when we determine reachability as part of the identification of memory content, e.g., what value is loaded from some ptr. If we ignore the call, the load is not reachable from a store prior to the call, which then leads us to believe the load will result in a different value, often undef.
The text was updated successfully, but these errors were encountered: