[llvm-bugs] [Bug 27850] New: Assertion failed: (AlreadyScheduled.insert(&GV).second && "Should not reschedule")

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 23 22:45:47 PDT 2016


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

            Bug ID: 27850
           Summary: Assertion failed: (AlreadyScheduled.insert(&GV).second
                    && "Should not reschedule")
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mehdi.amini at apple.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Linking the following module into an empty module (llvm-link empty.ll bug.ll)
leads to an assertion:

Assertion failed: (AlreadyScheduled.insert(&GV).second && "Should not
reschedule"), function scheduleMapGlobalInitializer, file
lib/Transforms/Utils/ValueMapper.cpp, line 1009.


target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9"
@A = internal constant i8 1
@B = alias i8, i8* @A
@C = global [2 x i8*] [i8* @A, i8* @B]



It seems that the two maps (ValueMap and AliasValueMap) are not playing well
with each other. We first visit @C, then materialize its initializer, which
lead us to @A, which we schedule to be materialized later, and then move to B
which also scheduled. 
At this point we moved with the worklist and process B first. Since it is an
alias it will be materialized using the AliasValueMap, and we pull the aliasee
@A and schedules it: this is where we hit the assertions because A was already
scheduled.

-- 
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/20160524/0ada42ae/attachment.html>


More information about the llvm-bugs mailing list