From a1c47ade7761bc745630a916b957164630721150 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 13 Oct 2017 13:12:05 -0600 Subject: [PATCH] * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly. From-SVN: r253740 --- gcc/ChangeLog | 4 ++++ gcc/tree-ssa-reassoc.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b593718fa6f..56383ef72f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-10-13 Jeff Law + + * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly. + 2017-10-13 Jakub Jelinek PR target/82274 diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index cc57ae320a3..e0e64e16eba 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -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) -- 2.30.2