<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - LICM incorrect load/store promotion in presence of poison"
   href="https://bugs.llvm.org/show_bug.cgi?id=51471">51471</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LICM incorrect load/store promotion in presence of poison
          </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>Loop Optimizer
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>d.maljutin@yandex.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25131" name="attach_25131" title="reproducer, run with opt -licm">attachment 25131</a> <a href="attachment.cgi?id=25131&action=edit" title="reproducer, run with opt -licm">[details]</a></span>
reproducer, run with opt -licm

If there are two groups of memory accesses in the loop all to the same memory
but one is done via "poisoned" pointer, basic-aa can just place them into two
non-aliasing sets. LICM would then promote both of these groups leading to a
miscompile: <a href="https://llvm.godbolt.org/z/KKxdb5e9v">https://llvm.godbolt.org/z/KKxdb5e9v</a>
The load/store with a poison pointer is a dead code and would never execute at
runtime.
Similar IR was produced on an actual example after value propagation through a
switch case.</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>