[llvm-bugs] [Bug 26019] New: [WinEH] loop optimizations still asserting with captured variables

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 4 14:30:22 PST 2016


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

            Bug ID: 26019
           Summary: [WinEH] loop optimizations still asserting with
                    captured variables
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: r.sagitario at gmx.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The attached test case (same as in #26000) now causes a different assertion
during optimizations:

> opt -O2 tt1-red.ll
Assertion failed: idx < size(), file
C:\s\d\ldc\llvm\include\llvm/ADT/SmallVector.h, line 145

bugpoint reduces this to:

//////////////////////////////
; ModuleID = 'bugpoint-reduced-simplified.bc'
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i386-pc-windows-msvc"

%nest.checkContent.0.1.2.3.4.17 = type { { i32, i8* }, { i32, i8* } }

@.str.1 = external unnamed_addr constant [2 x i8]
@.str.2 = external unnamed_addr constant [2 x i8]

; Function Attrs: readonly
declare void @_adEq2() #0

define x86_stdcallcc void @"\01__D3tt112checkContentFAyaZv"() personality i32
(i8*, i8*, i8*, i8*)* @__CxxFrameHandler3 {
  %.frame = alloca %nest.checkContent.0.1.2.3.4.17, align 4
  %1 = getelementptr %nest.checkContent.0.1.2.3.4.17,
%nest.checkContent.0.1.2.3.4.17* %.frame, i32 0, i32 1, i32 0
  %2 = getelementptr %nest.checkContent.0.1.2.3.4.17,
%nest.checkContent.0.1.2.3.4.17* %.frame, i32 0, i32 1, i32 1
  %3 = bitcast i8** %2 to i32*
  br i1 undef, label %try.success.or.caught, label %forbody

catch.object.Throwable:                           ; preds = %catch.dispatch
  %4 = catchpad within %5 [i8* null, i32 64, i8* null]
  unreachable

try.success.or.caught:                            ; preds = %forcond.backedge,
%0
  ret void

postinvoke:                                       ; preds = %forbody
  br i1 undef, label %else, label %forcond.backedge

forcond.backedge:                                 ; preds = %else, %postinvoke
  br i1 undef, label %try.success.or.caught, label %forbody

catch.dispatch:                                   ; preds = %forbody, %else
  %5 = catchswitch within none [label %catch.object.Throwable] unwind to caller

forbody:                                          ; preds = %forcond.backedge,
%0
  store i32 undef, i32* %1, align 4
  store i32 undef, i32* %3, align 4
  invoke void @_adEq2() #0
          to label %postinvoke unwind label %catch.dispatch

else:                                             ; preds = %postinvoke
  invoke void @_adEq2() #0
          to label %forcond.backedge unwind label %catch.dispatch
}

declare i32 @__CxxFrameHandler3(i8*, i8*, i8*, i8*)

attributes #0 = { readonly } 

////////////////////////////

and blames the LICM pass again.

-- 
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/20160104/45874556/attachment-0001.html>


More information about the llvm-bugs mailing list