Skip to content

[SILOptimizer] Add ctlz support to constant propagation #5519

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
Oct 29, 2016

Conversation

shajrawi
Copy link

@shajrawi shajrawi commented Oct 29, 2016

radar rdar://problem/29004328

The Ctlz builtin is used by the new integer prototype. Since it is not constant folded, the value is computed dynamically. This in turn results in a more complex CFG.

This PR adds a peephole optimization for computing int_ctlz with constant arguments + adds test-cases to make sure it works

@shajrawi
Copy link
Author

@swift-ci Please smoke test

@shajrawi shajrawi changed the title [SILOptimizer] Add ctlz support in constant propagation [SILOptimizer] Add ctlz support to constant propagation Oct 29, 2016
@shajrawi shajrawi merged commit 3616567 into swiftlang:master Oct 29, 2016
@shajrawi shajrawi deleted the constant_propagation_int_ctlz branch October 29, 2016 01:26
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