-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix serialize bug on detached / continuation mismatch #74
base: master
Are you sure you want to change the base?
Conversation
lib/Transforms/Utils/SimplifyCFG.cpp
Outdated
return false; | ||
if (auto DI = dyn_cast<DetachInst>(PredBB->getTerminator())) { | ||
// check that we are the detached (and not continuation) | ||
return DI->getDetached() == BB; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't want to return true here. You've made the actual simplification dead!
Indeed, resolved. |
return false; | ||
if (auto DI = dyn_cast<DetachInst>(PredBB->getTerminator())) { | ||
// check that we are the detached (and not continuation) | ||
if(DI->getDetached() != BB) return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistent code style, I'd prefer a space between the if
and first (
.
Can we get a regression test for this bug? |
Fixes #72
@VictorYing