* fold-const.c (swap_tree_comparison): No longer static.
(tree_swap_operands_p): Similarly. Return true if both operands are SSA_NAMEs and the first operand has a higher version number than the second operand. * tree.h (swap_tree_comparison): Prototype. (tree_swap_operands_p): Prototype. * tree-ssa-operands.c (get_expr_operands): For commutative operators and relational comparisons, canonicalize the order of the operands. * gcc.dg/tree-ssa/20040615-1.c: New test. * gcc.dg/tree-ssa/20030824-1.c: Update expected output to be less sensitive to operand ordering. * gcc.dg/tree-ssa/20030824-2.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83224 138bc75d-0d04-0410-961f-82ee72b054a4
Showing
- gcc/ChangeLog 12 additions, 0 deletionsgcc/ChangeLog
- gcc/fold-const.c 11 additions, 5 deletionsgcc/fold-const.c
- gcc/testsuite/ChangeLog 7 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/gcc.dg/tree-ssa/20030824-1.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/tree-ssa/20030824-1.c
- gcc/testsuite/gcc.dg/tree-ssa/20030824-2.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/tree-ssa/20030824-2.c
- gcc/testsuite/gcc.dg/tree-ssa/20040615-1.c 26 additions, 0 deletionsgcc/testsuite/gcc.dg/tree-ssa/20040615-1.c
- gcc/tree-ssa-operands.c 31 additions, 0 deletionsgcc/tree-ssa-operands.c
- gcc/tree.h 3 additions, 0 deletionsgcc/tree.h
Loading
Please register or sign in to comment