From e936ac61ea223ca27c1b6eaf195cac66dd255602 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Mon, 4 May 2020 12:18:20 -0700 Subject: [PATCH] ast: swap range regardless of range_left >= 0 --- frontends/ast/simplify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 837c14ad7..cdb7e91e0 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -1079,7 +1079,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, } if (old_range_valid != range_valid) did_something = true; - if (range_valid && range_left >= 0 && range_right > range_left) { + if (range_valid && range_right > range_left) { int tmp = range_right; range_right = range_left; range_left = tmp; -- 2.30.2