Skip to content

simplifier: erase 'all ones' out of bitand #1226

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
Aug 10, 2017

Conversation

kroening
Copy link
Member

@kroening kroening commented Aug 9, 2017

This simplifies x & 1111, where '1111' has the width of x, to x.

) // no it++
{
if(it->is_constant() &&
id2string(to_constant_expr(*it).get_value()).find('0')==std::string::npos &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

The linter complains about this line - you might even want to override the linter, or just break at the ==?

@tautschnig tautschnig merged commit e0a6bbd into master Aug 10, 2017
@tautschnig tautschnig deleted the simplify_bitand_all_ones branch August 10, 2017 07:49
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