<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 - Instsimplify: uadd_overflow(X, undef) is not undef"
   href="https://bugs.llvm.org/show_bug.cgi?id=42209">42209</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Instsimplify: uadd_overflow(X, undef) is not undef
          </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>Scalar Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nunoplopes@sapo.pt
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lebedev.ri@gmail.com, llvm-bugs@lists.llvm.org, regehr@cs.utah.edu, sanjoy@playingwithpointers.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>test/Transforms/InstSimplify/call.ll contains a few incorrect transformations
when undef is involved.

For example, when %v is zero, there's no overflow, so can't fold this to undef:

define {i8, i1} @test_uadd3(i8 %v) {
%0:
  %result = uadd_overflow i8 %v, undef
  ret {i8, i1} %result
}
=>
define {i8, i1} @test_uadd3(i8 %v) {
%0:
  ret {i8, i1} undef
}
Transformation doesn't verify!
ERROR: Value mismatch

Example:
i8 %v = #x00 (0)

Source:
{i8, i1} %result = { ?, #x0 }

Target:
Source value: { ?, #x0 }
Target value: { #x00, #x1 }</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>