[LoopAccesses] Properly print whether memchecks are needed

Fix oversight in -analyze output.  PtrRtCheck contains the pointers that
need to be checked against each other and not whether memchecks are
necessary.

For instance in the testcase PtrRtCheck has four elements but all
no-alias so no checking is necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234833 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adam Nemet
2015-04-14 01:12:55 +00:00
parent 15552c46a0
commit 1624f35f2b
2 changed files with 46 additions and 3 deletions

View File

@ -1314,10 +1314,10 @@ LoopAccessInfo::LoopAccessInfo(Loop *L, ScalarEvolution *SE,
void LoopAccessInfo::print(raw_ostream &OS, unsigned Depth) const {
if (CanVecMem) {
if (PtrRtCheck.empty())
OS.indent(Depth) << "Memory dependences are safe\n";
else
if (PtrRtCheck.Need)
OS.indent(Depth) << "Memory dependences are safe with run-time checks\n";
else
OS.indent(Depth) << "Memory dependences are safe\n";
}
OS.indent(Depth) << "Store to invariant address was "