diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-29 07:23:11 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-29 07:23:11 +0000 |
commit | 91543a506f4bb2483fa6ee0983b228c530f7f1da (patch) | |
tree | 869f90739651886a919f4571e43bead73dcdfefa /gcc/tree-ssa-reassoc.c | |
parent | c2977bcd557818bd9e416821412f6de9bfd8a55f (diff) | |
download | gcc-91543a506f4bb2483fa6ee0983b228c530f7f1da.tar.gz |
2006-11-28 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/29984
* gcc.dg/tree-ssa/reassoc-12.c: New test.
2006-11-28 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/29984
* tree-ssa-reassoc.c (eliminate_duplicate_pair): Handle MAX_EXPR
and MIN_EXRP.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119303 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-reassoc.c')
-rw-r--r-- | gcc/tree-ssa-reassoc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 6835a179125..8b5d34a0f30 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -417,8 +417,8 @@ eliminate_duplicate_pair (enum tree_code opcode, operand_entry_t last) { - /* If we have two of the same op, and the opcode is & or |, we can - eliminate one of them. + /* If we have two of the same op, and the opcode is & |, min, or max, + we can eliminate one of them. If we have two of the same op, and the opcode is ^, we can eliminate both of them. */ @@ -426,13 +426,15 @@ eliminate_duplicate_pair (enum tree_code opcode, { switch (opcode) { + case MAX_EXPR: + case MIN_EXPR: case BIT_IOR_EXPR: case BIT_AND_EXPR: if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, "Equivalence: "); print_generic_expr (dump_file, curr->op, 0); - fprintf (dump_file, " [&|] "); + fprintf (dump_file, " [&|minmax] "); print_generic_expr (dump_file, last->op, 0); fprintf (dump_file, " -> "); print_generic_stmt (dump_file, last->op, 0); |