From 106bb81543d92e105eb371d1c7a09c73a1e9a501 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Thu, 26 Oct 2017 01:07:48 +0200 Subject: [PATCH] Refine a comment. Powers of two can't be zero anyway. --- lslopt/lslfoldconst.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lslopt/lslfoldconst.py b/lslopt/lslfoldconst.py index 9d4e23e..05595e8 100644 --- a/lslopt/lslfoldconst.py +++ b/lslopt/lslfoldconst.py @@ -322,8 +322,8 @@ class foldconst(object): return del a, b - # Specific optimization to catch a bitwise test appearing frequently. - # If b and c are nonzero constant powers of two: + # Specific optimization to catch a frequent bitwise test. + # If b and c are constant powers of two: # !(a & b) | !(a & c) -> ~(a|~(b|c)) # e.g. if (a & 4 && a & 8) -> if (!~(a|-13)) if (child[0]['nt'] == '!' and child[0]['ch'][0]['nt'] == '&'