* tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
authorJeff Law <law@redhat.com>
Fri, 13 Oct 2017 19:12:05 +0000 (13:12 -0600)
committerJeff Law <law@gcc.gnu.org>
Fri, 13 Oct 2017 19:12:05 +0000 (13:12 -0600)
From-SVN: r253740

gcc/ChangeLog
gcc/tree-ssa-reassoc.c

index b593718..56383ef 100644 (file)
@@ -1,3 +1,7 @@
+2017-10-13  Jeff Law  <law@redhat.com>
+
+       * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
+
 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/82274
index cc57ae3..e0e64e1 100644 (file)
@@ -5910,7 +5910,7 @@ reassociate_bb (basic_block bb)
                     move it to the front.  This helps ensure that we generate
                     (X & Y) & C rather than (X & C) & Y.  The former will
                     often match a canonical bit test when we get to RTL.  */
-                 if (ops.length () != 2
+                 if (ops.length () > 2
                      && (rhs_code == BIT_AND_EXPR
                          || rhs_code == BIT_IOR_EXPR
                          || rhs_code == BIT_XOR_EXPR)