This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/29984] SPE GCC segfaults with MAX_EXPR <a, a>
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2006 20:03:49 -0000
- Subject: [Bug tree-optimization/29984] SPE GCC segfaults with MAX_EXPR <a, a>
- References: <bug-29984-10179@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-11-26 20:03 -------
Here is the patch which I am testing:
Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c (revision 119229)
+++ tree-ssa-reassoc.c (working copy)
@@ -417,8 +417,8 @@ eliminate_duplicate_pair (enum tree_code
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
{
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);
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |tree-optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29984