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

Fix simplifySwitchEnumUnreachableBlocks for default cases in ossa #77571

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

meg-gupta
Copy link
Contributor

Unlike non-ossa, ossa's switch_enum accepts an argument for the default case When all other cases are unreachable, replace the default block's phi with the switch_enum's operand and transform the switch_enum to a branch.

Fixes rdar://139441002

@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta force-pushed the fixsimplifycfgunreachable branch from 585d63f to b75dfcd Compare November 13, 2024 03:36
Unlike non-ossa, ossa's switch_enum accepts an argument for the default case
When all other cases are unreachable, replace the default block's phi with
the switch_enum's operand and transform the switch_enum to a branch.

Fixes rdar://139441002
@meg-gupta meg-gupta force-pushed the fixsimplifycfgunreachable branch from b75dfcd to 106dc8a Compare November 13, 2024 05:12
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta merged commit 5486b7a into swiftlang:main Nov 14, 2024
5 checks passed
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.

1 participant