<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 --- - documentation bug: select should not have a value dependence on the not-selected operand"
   href="http://llvm.org/bugs/show_bug.cgi?id=20895">20895</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>documentation bug: select should not have a value dependence on the not-selected operand
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>regehr@cs.utah.edu
          </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>This PR is in reference to this discussion:

<a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076592.html">http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076592.html</a>

Basically, the LLVM IR doc implies that "select" has a value dependence on its
operands, which makes it legal to optimize a select into undef if its
not-selected operand is poisoned. This doesn't seem to make too much sense and
also it appears to be at odds with the current LLVM implementation.

My suggested fix to the LLVM Language Reference Manual is to put this text in
the value dependence part of the poison value explanation:

* Values other than phi nodes and select instructions depend on their operands.

* Phi nodes depend on the operand corresponding to their dynamic predecessor
basic block.

* Select instructions depend on their selected operand.</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>