<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 - Assert failed in Reassociate (NumAddedValues > 1 && "Each occurrence should contribute a value")"
   href="https://bugs.llvm.org/show_bug.cgi?id=32440">32440</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assert failed in Reassociate (NumAddedValues > 1 && "Each occurrence should contribute a value")
          </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>enhancement
          </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>sanjoy@playingwithpointers.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Reproducer: run opt -reassociate on


target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define i32 @f(i8 %a, i32 %b, i32* %c) {
entry:
  %tmp = shl i32 1, 1
  %tmp1 = add i32 %tmp, 187
  br label %bb0

bb0:
  %tmp2 = sext i8 %a to i32
  %tmp3 = sub i32 %tmp1, %tmp2
  %tmp4 = add i32 %tmp, %tmp3
  %tmp5 = sub i32 %b, %tmp4
  ret i32 %tmp5
}</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>