fix for ZAM identification of common subexpressions

This commit is contained in:
Vern Paxson 2024-09-11 16:35:54 +02:00 committed by Christian Kreibich
parent e0e6c462ce
commit b0e21b7e64

View file

@ -43,7 +43,7 @@ TraversalCode CSE_ValidityChecker::PreStmt(const Stmt* s) {
TraversalCode CSE_ValidityChecker::PreExpr(const Expr* e) {
if ( e == start_e ) {
ASSERT(! have_start_e);
if ( ! have_start_e ) {
have_start_e = true;
// Don't analyze the expression, as it's our starting
@ -51,6 +51,7 @@ TraversalCode CSE_ValidityChecker::PreExpr(const Expr* e) {
// with those of any intervening expressions.
return TC_CONTINUE;
}
}
if ( e == end_e ) {
if ( ! have_start_e )