<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 --- - Incorrect attribute inference w/operand bundles"
   href="https://llvm.org/bugs/show_bug.cgi?id=26510">26510</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Incorrect attribute inference w/operand bundles
          </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>Linux
          </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>Scalar Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>listmail@philipreames.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>With the example below, running this through O3 causes @test to be marked
readnone and the loads/stores to be deleted by other optimization passes as a
result.  Tracing through print-after-all, it's clearly FunctionAttrs which is
doing the problematic transform, but I can not reproduce this standalone. 
Worryingly, it looks like a different value is being returned from AA when run
through O3 or not (but with AA passes added).  

declare void @foo() readnone

define i8* @test(i8* %p) {
  %a = alloca i8*, align 8
  store i8* %p, i8** %a, align 8
  call void @foo() ["abc" (i8** %a)]
  %reload = load i8*, i8** %a, align 8
  ret i8* %reload
}

("abc" is a unknown deopt bundle type which could potentially write to the
specified address.)</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>