[PATCH] D92045: [DSE] Consider out-of-bound writes in isOverwrite.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 24 12:57:32 PST 2020
nikic added inline comments.
================
Comment at: llvm/test/Transforms/DeadStoreElimination/MSSA/out-of-bounds-stores.ll:73
ret i32 0
}
----------------
nikic wrote:
> I'm having a hard time understanding why anything gets eliminated in this example, regardless of whether this is considered an overwrite or not. There is a codepath (for.body -> for.inc -> for.end) that goes from the first store to the load without passing through the store in for.body.1, so how can it even be relevant for DSE purposes?
Okay, I think I get it now. The problem is that we're using the MemoryLocation from the store in `for.body.1` when looking for read clobbers of the store in `for.body`. And AA (correctly) reports it is NoAlias with the read in `for.end`. So we have a contract here that the isOverwrite logic in DSE and AA do not produce contradictory results.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92045/new/
https://reviews.llvm.org/D92045
More information about the llvm-commits
mailing list