-
Notifications
You must be signed in to change notification settings - Fork 277
Fix support for with_exprt
with more than 3 operands
#8668
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2157,7 +2157,7 @@ simplify_exprt::simplify_byte_update(const byte_update_exprt &expr) | |
* value) | ||
*/ | ||
|
||
if(value.id()==ID_with) | ||
if(value.id() == ID_with && value.operands().size() == 3) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may be worth considering to rewrite There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we make the simplifier do this, we might as well refrain from constructing those in the first place? I'm actually inclined to create such a PR as an alternative to this one. |
||
{ | ||
const with_exprt &with=to_with_expr(value); | ||
|
||
|
@@ -2297,6 +2297,7 @@ simplify_exprt::simplify_byte_update(const byte_update_exprt &expr) | |
|
||
if( | ||
expr_at_offset_C.id() == ID_with && | ||
expr_at_offset_C.operands().size() == 3 && | ||
to_with_expr(expr_at_offset_C).where().is_zero()) | ||
{ | ||
tmp.set_op(to_with_expr(expr_at_offset_C).old()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That actually works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is code is never used so I don't know for sure, but which reason do you have to believe it does not?