[LLVMbugs] [Bug 12740] New: BasicAliasAnalysis incorrectly concludes "NoAlias"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat May 5 00:08:39 PDT 2012


             Bug #: 12740
           Summary: BasicAliasAnalysis incorrectly concludes "NoAlias"
           Product: libraries
           Version: 3.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Global Analyses
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: tcreech at umd.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 8494
  --> http://llvm.org/bugs/attachment.cgi?id=8494
Simple loop IR which basicaa incorrectly analyzes

After moving from 2.9 to 3.0 we noticed that -basicaa was giving us some false
"NoAlias" responses, even in very simple cases.

For example, in IR resulting from a C loop such as this:

for(i=0; i<100; i++){ A[i] = A[i] + A[i+1] }

-basicaa in 3.0 will say that A[i] and A[i+1] do not alias. While this is true
in the context of a single iteration, it is not true in general.

I have attached the IR for this loop. You can see the bad AA response with:
$ opt -disable-output -basicaa -count-aa -aa-eval t.ll

Relevant output:
No alias:       [8B] double* %4, [8B] double* %2

After stepping through BasicAliasAnalysis, it looks like there is a test (+942)
for a partial alias which fails to "NoAlias" when this is not necessarily nor
usually correct.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list