<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - DependenceAnalysis is not access size aware."
   href="http://llvm.org/bugs/show_bug.cgi?id=15811">15811</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>DependenceAnalysis is not access size aware.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Global Analyses
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>etherzhhb@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=10398" name="attach_10398" title="The patch to add the fail case.">attachment 10398</a> <a href="attachment.cgi?id=10398&action=edit" title="The patch to add the fail case.">[details]</a></span>
The patch to add the fail case.

Consider the following function:

define i64 @alias(i32* nocapture %A) nounwind uwtable {
entry:
  %arrayidx = getelementptr inbounds i32* %A, i64 1
  store i32 2, i32* %arrayidx, align 4
  %0 = bitcast i32* %A to i64*
  %1 = load i64* %0, align 8
  ret i64 %1
}

Ignoring size of the memory location accessed in
store i32 2, i32* %arrayidx, align 4
and
%1 = load i64* %0, align 8,

The addresses pointed by %arrayidx and %0 doesn't alias each other, and hence
DependenceAnalysis claims there is not dependencies from the store to the load,
and gives the following output:
da analyze - none!
da analyze - none!
da analyze - none!

However, the above result is incorrect (at least for x86), there should be a
dependency from from the store to the load, because the memory location written
by the store overlap with the memory location read by the load.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>