Skip to content

Commit c6387e9

Browse files
author
thk123
committed
Made simplify remove unnecessary casts
1 parent 42bd7ed commit c6387e9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/util/simplify_expr.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,12 @@ bool simplify_exprt::simplify_typecast(exprt &expr)
367367
{
368368
}
369369
}
370+
else
371+
{
372+
exprt smaller_width_value=expr.op0();
373+
expr.swap(smaller_width_value);
374+
return false;
375+
}
370376
}
371377

372378
// Push a numerical typecast into pointer arithmetic

0 commit comments

Comments
 (0)