Skip to content
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

[DSE] Stores not eliminated if they are overwritten in a loop. #45805

Open
fhahn opened this issue Jun 25, 2020 · 0 comments
Open

[DSE] Stores not eliminated if they are overwritten in a loop. #45805

fhahn opened this issue Jun 25, 2020 · 0 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@fhahn
Copy link
Contributor

fhahn commented Jun 25, 2020

Bugzilla Link 46460
Version trunk
OS All
CC @vdsered,@whitneywhtsang

Extended Description

In the example below, LLVM currently does not eliminate the stores in the second loop, even though the second loop exactly overwrites the stores of the first loop. Similarly the first loop could be replaced by a memcpy and we still not remove it:

https://godbolt.org/z/kGBEXS

void init(int *P, unsigned N) {
   for (unsigned i = 0; i < N; i++)
        P[i] = 1;

    for (unsigned i = 0; i < N; i++)
        P[i] = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

1 participant