<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 --- - i8 checked mul is wrong on x86"
   href="http://llvm.org/bugs/show_bug.cgi?id=19858">19858</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>i8 checked mul is wrong on x86
          </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>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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>kfischer@college.harvard.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>Consider the following code sample:

declare {i8, i1} @llvm.umul.with.overflow.i8(i8 %a, i8 %b)
define i8 @main(i32 %argc) {
top:
  %RHS = trunc i32 %argc to i8
  %umul = call { i8, i1 } @llvm.umul.with.overflow.i8(i8 25, i8 %RHS)
  %ex = extractvalue { i8, i1 } %umul, 1
  br i1 %ex, label %L, label %L1

L:                                                ; preds = %top
  ret i8 %RHS

L1:                                               ; preds = %top
  %umul.value = extractvalue { i8, i1 } %umul, 0
  ret i8 %umul.value
}

Running this with `lli test.ll` gives a return value of 1 rather than 25 (i.e.
the overflow flag was set when it shouldn't have been.</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>