<html>
    <head>
      <base href="https://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 --- - FunctionAttrs marks inaccessiblememonly as readnone"
   href="https://llvm.org/bugs/show_bug.cgi?id=26021">26021</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>FunctionAttrs marks inaccessiblememonly as readnone
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </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>deadalnix@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Sample IR:

define i32 @_D8test01824mainFMZi() {
body:
  %0 = tail call noalias i32* @allocmemory()
  store i32 7, i32* %0, align 4
  %1 = tail call noalias i32* @allocmemory()
  %2 = bitcast i32* %1 to i32**
  store i32* %0, i32** %2, align 8
  %3 = tail call noalias i32* @allocmemory()
  %4 = bitcast i32* %3 to i32**
  store i32* %0, i32** %4, align 8
  %5 = load i32, i32* %0, align 4
  %6 = add i32 %5, 1
  store i32 %6, i32* %0, align 4
  %7 = add i32 %5, %6
  ret i32 %7
}

declare noalias i32* @allocmemory() #0

attributes #0 = { inaccessiblememonly }

For some reason, FunctionAttrs want to mark allocmemory as readnone. It turns
out that getModRefBehavior somehow ends up being 0 for it. When the pass it ran
in isolation, everything is fine, but when ran in combination with other passes
using -01, it fails.

I was unable to reduce the set of passes that needs to run.</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>