Skip to content

IRGen: Avoid generating LLVM switches when brs will do. #5092

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

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented Oct 2, 2016

FastISel doesn't like switch, and it's generally more compact code gen to build conditionals for two-target branches instead of switching all the time. There are many popular two-tag enums (Optional, someday Bool, Either) and this should greatly improve the potential for FastISel to kick in at -Onone.
rdar://problem/27476935

FastISel doesn't like switch, and it's generally more compact code gen to build conditionals for two-target branches instead of switching all the time. There are many popular two-tag enums (Optional, someday Bool, Either) and this should greatly improve the potential for FastISel to kick in at -Onone.
@jckarter
Copy link
Contributor Author

jckarter commented Oct 2, 2016

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Oct 2, 2016

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - ba82f26
Test requested by - @jckarter

@jckarter
Copy link
Contributor Author

jckarter commented Oct 2, 2016

@erg, you know what's up with this Linux CMake failure? Looks like I just needed to do a clean test.

@jckarter
Copy link
Contributor Author

jckarter commented Oct 2, 2016

@swift-ci Please test Linux

@swift-ci
Copy link
Contributor

swift-ci commented Oct 2, 2016

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - ba82f26
Test requested by - @jckarter

@jckarter
Copy link
Contributor Author

jckarter commented Oct 2, 2016

@swift-ci Clean test Linux

@jckarter jckarter merged commit 0add4b9 into swiftlang:master Oct 2, 2016
@jckarter jckarter deleted the irgen-dont-switch-two-case-enums branch October 2, 2016 21:37
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