On Sat, Nov 08, 2014 at 01:07:28PM +0100, Richard Biener wrote: > To be constructive here - the above case is from within a > GIMPLE_ASSIGN case label > and thus I'd have expected > > case GIMPLE_ASSIGN: > { > gassign *a1 = as_a <gassign *> (s1); > gassign *a2 = as_a <gassign *> (s2); > lhs1 = gimple_assign_lhs (a1); > lhs2 = gimple_assign_lhs (a2); > if (TREE_CODE (lhs1) != SSA_NAME > && TREE_CODE (lhs2) != SSA_NAME) > return (operand_equal_p (lhs1, lhs2, 0) > && gimple_operand_equal_value_p (gimple_assign_rhs1 (a1), > gimple_assign_rhs1 (a2))); > else if (TREE_CODE (lhs1) == SSA_NAME > && TREE_CODE (lhs2) == SSA_NAME) > return vn_valueize (lhs1) == vn_valueize (lhs2); > return false; > } > > instead. That's the kind of changes I have expected and have approved of.
But even that looks like just adding extra work for all developers, with no gain. You only have to add extra code and extra temporaries, in switches typically also have to add {} because of the temporaries and thus extra indentation level, and it doesn't simplify anything in the code. Jakub