[llvm-bugs] [Bug 30213] New: Assertion during scev expansion

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 30 17:01:00 PDT 2016


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

            Bug ID: 30213
           Summary: Assertion during scev expansion
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Global Analyses
          Assignee: unassignedbugs at nondot.org
          Reporter: wmi at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Original report:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160829/385846.html

The assertion is caused by rL278161. Copy the bug report here so I have a bug
entry for reference.

$ cat bugpoint-reduced-simplified.ll
target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
target triple = "i386-apple-macosx10.12.0"

; Function Attrs: nounwind optsize ssp
define void @Foo() {
entry:
  switch i2 undef, label %sw.epilog102 [
    i2 -2, label %sw.bb28
  ]

sw.bb28:                                          ; preds = %entry
  %0 = load i8*, i8** undef, align 2
  %add.ptr1.i = getelementptr inbounds i8, i8* undef, i32 -1
  %add.ptr4.i = getelementptr inbounds i8, i8* %0, i32 -1
  %cmp.i = icmp ult i8* undef, %0
  %add.ptr4.add.ptr1.i = select i1 %cmp.i, i8* %add.ptr4.i, i8* %add.ptr1.i
  br label %while.cond.i

while.cond.i:                                     ; preds = %while.cond.i,
%sw.bb28
  %currPtr.1.i = phi i8* [ %incdec.ptr.i, %while.cond.i ], [
%add.ptr4.add.ptr1.i, %sw.bb28 ]
  %incdec.ptr.i = getelementptr inbounds i8, i8* %currPtr.1.i, i32 1
  %1 = load i8, i8* %incdec.ptr.i, align 1
  br label %while.cond.i

sw.epilog102:                                     ; preds = %entry
  unreachable
}

$ bugpoint-reduced-simplified.ll -loop-reduce -disable-output
Assertion failed: (S1->getType() == S2->getType() && "Cannot create binary
operator with two operands of differing type!"), function Create, file
/Users/steven/dev/trunk/llvm/lib/IR/Instructions.cpp, line 2137.

-- 
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/20160831/ab372a8f/attachment.html>


More information about the llvm-bugs mailing list