[LLVMbugs] [Bug 14719] LoopVectorizer does not detect that calloc and one of the parameters don't alias

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 13 11:37:36 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=14719

Arnold Schwaighofer <aschwaighofer at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |aschwaighofer at apple.com
         Resolution|FIXED                       |---
           Assignee|unassignedbugs at nondot.org   |aschwaighofer at apple.com

--- Comment #2 from Arnold Schwaighofer <aschwaighofer at apple.com> ---
I just stumbled over this while working on dependence checks.

This is not entirely correct:

  /// Check that the reads don't conflict with the read-writes.
  for (MI = Reads.begin(), ME = Reads.end(); MI != ME; ++MI) {
    Value *Val = (*MI).first;
    GetUnderlyingObjects(Val, TempObjects, DL);
    for (ValueVector::iterator UI=TempObjects.begin(), UE=TempObjects.end();
         UI != UE; ++UI) {
      // If all of the writes are identified then we don't care if the read
      // pointer is identified or not.
      if (!AllWritesIdentified && !isIdentifiedObject(*UI)) {
        DEBUG(dbgs() << "LV: Found an unidentified read ptr:"<< **UI <<"\n");
        NeedRTCheck = true;
      }


We could have GetUnderlying return an unidentified object because it stopped
after MaxSteps and have "A[i] = B[i]" where B == A - 1 (just hidden behind
enough phis).

We would however know that if all our writes are identified objects and the
read is a argument (isa<Argument>, like it is the case here) that they can't
alias.

if ((!AreAllWritesIdentified || !isa<Argument>(UnderlyingObj)) &&
!isIdentifiedObject(UnderlyingObj)) {
  NeedRTCheck = true;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130613/c3ea2d4a/attachment.html>


More information about the llvm-bugs mailing list