Skip to content

Remove select_value SIL instruction #66608

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

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

meg-gupta
Copy link
Contributor

This instruction was only created by SimplifyCFG when it could pattern match tests like :

enum E : Int {
  case E0 = 0
  case E1 = 1
  case E2 = 2
  case E3 = 3
}

func makeE(a: Int) -> E {
  return E.fromRaw(a)!
}

We don't need this anymore since LLVM is able to optimize without it.

@meg-gupta meg-gupta force-pushed the removeselectvalue branch from a1d5304 to 5d401fb Compare June 13, 2023 21:13
@meg-gupta
Copy link
Contributor Author

@swift-ci apple silicon benchmark

@meg-gupta meg-gupta requested review from atrick and eeckstein and removed request for atrick June 13, 2023 21:29
@meg-gupta
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I'm glad this is finally going away. Instructions like this only create complexity and hide optimizer deficiencies

@meg-gupta meg-gupta merged commit 6a2f3c9 into swiftlang:main Jun 14, 2023
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.

2 participants