<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 - [InstCombine] Assertion due to mismatch of integer and pointer types"
   href="https://bugs.llvm.org/show_bug.cgi?id=35794">35794</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[InstCombine] Assertion due to mismatch of integer and pointer types
          </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>Windows NT
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>llvm-dev@redking.me.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>david.majnemer@gmail.com, llvm-bugs@lists.llvm.org, spatel+llvm@rotateright.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Partially reduced from
<a href="https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4713">https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4713</a>

; ModuleID = 'clusterfuzz-testcase-minimized-5840597966389248'

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

define void @foo2(i32* %a) {
  %ptrint = ptrtoint i32* %a to i64
  %maskedptr = and i64 %ptrint, 31
  %B2 = add i64 %maskedptr, %ptrint
  %C1 = icmp sge i64 %ptrint, 0
  %maskcond = icmp eq i64 %maskedptr, %B2
  %B1 = srem i64 %maskedptr, %ptrint
  tail call void @llvm.assume(i1 %maskcond)
  store i1 %C1, i1* undef
  store i64 %B1, i64* undef
  ret void
}
declare void @llvm.assume(i1)

opt -instcombine 
Assertion failed: C->getType() == Ty->getScalarType() && "ConstantInt type
doesn't match the type implied by its value!", file
D:\LLVM\llvm\lib\IR\Constants.cpp, line 584</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>