Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed: (AlreadyScheduled.insert(&GV).second && "Should not reschedule") #28224

Closed
joker-eph opened this issue May 24, 2016 · 2 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@joker-eph
Copy link
Collaborator

Bugzilla Link 27850
Resolution FIXED
Resolved on Aug 03, 2016 17:55
Version trunk
OS All
CC @dexonsmith,@zmodem,@hfinkel

Extended Description

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.

@joker-eph
Copy link
Collaborator Author

Patch up for review: http://reviews.llvm.org/D20586

@zmodem
Copy link
Collaborator

zmodem commented Aug 4, 2016

Sounds like that was committed in r270757.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants