[llvm-bugs] [Bug 35794] New: [InstCombine] Assertion due to mismatch of integer and pointer types

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 2 05:25:44 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=35794

            Bug ID: 35794
           Summary: [InstCombine] Assertion due to mismatch of integer and
                    pointer types
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: llvm-dev at redking.me.uk
                CC: david.majnemer at gmail.com, llvm-bugs at lists.llvm.org,
                    spatel+llvm at rotateright.com

Partially reduced from
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4713

; 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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180102/2cdbfabc/attachment.html>


More information about the llvm-bugs mailing list