diff options
author | Nadav Rotem <nadav256@gmail.com> | 2022-01-10 12:51:37 -0800 |
---|---|---|
committer | Nadav Rotem <nadav256@gmail.com> | 2022-01-10 13:49:02 -0800 |
commit | e2cc091a7d01fc3a3d226e206f00f029c9e3e079 (patch) | |
tree | c4325ed46bf10239db9a3b78ed9d2af6de1c3017 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | 8bed953782af43b1b53136718880ac352d45989c (diff) | |
download | llvm-e2cc091a7d01fc3a3d226e206f00f029c9e3e079.zip llvm-e2cc091a7d01fc3a3d226e206f00f029c9e3e079.tar.gz llvm-e2cc091a7d01fc3a3d226e206f00f029c9e3e079.tar.bz2 |
Fix a missed opportunity to merge stores.
This commit fixes a missed opportunity in merging consecutive stores.
The code that searches for stores skipped the case of stores that
directly connect to the root. The comment above the implementation lists
this case but the code did not handle it. I found this pattern when
looking into the shared_ptr destructor. GCC generates the right
sequence. Here is a small repo:
int foo(int* buff) {
buff[0] = 0;
int x = buff[1];
buff[1] = 0;
return x;
}
Differential Revision: https://reviews.llvm.org/D116895
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions