Skip to content

Fix serialize bug on detached / continuation mismatch#74

Open
wsmoses wants to merge 1 commit intomasterfrom
serbug
Open

Fix serialize bug on detached / continuation mismatch#74
wsmoses wants to merge 1 commit intomasterfrom
serbug

Conversation

@wsmoses
Copy link
Copy Markdown
Owner

@wsmoses wsmoses commented Jul 23, 2018

@wsmoses wsmoses requested a review from neboat July 23, 2018 17:31
return false;
if (auto DI = dyn_cast<DetachInst>(PredBB->getTerminator())) {
// check that we are the detached (and not continuation)
return DI->getDetached() == BB;
Copy link
Copy Markdown
Contributor

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!

@wsmoses
Copy link
Copy Markdown
Owner Author

wsmoses commented Jul 23, 2018

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;
Copy link
Copy Markdown
Collaborator

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 (.

@neboat
Copy link
Copy Markdown
Collaborator

neboat commented Jul 23, 2018

Can we get a regression test for this bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants