<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 --- - LVI gives up too early on zext / lshr"
   href="https://llvm.org/bugs/show_bug.cgi?id=27434">27434</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LVI gives up too early on zext / lshr
          </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>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>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>listmail@philipreames.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When a value is lshred or zexted, we can learn something about its value even
if we previously knew nothing.  For example, LVI learns nothing from the zext
below, whereas it obviously should conclude that the value is in [0,2).  The
problem is not in ConstantRange, which is perfectly willing to learn something
new from a zext, the problem is in LVI. It looks like probably we're bailing
too early in solveBlockValueConstantRange().

There are probably other instructions affected by this, but the problem is
extremely noticeable for lshr and zext.


define i32 @foo8(i1 %x) {
entry:
  %ret = zext i1 %x to i32
  ret i32 %ret
}

; Function Attrs: noreturn nounwind
declare void @llvm.trap() #0

attributes #0 = { noreturn nounwind }</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>