From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3180 invoked by alias); 26 Nov 2006 20:03:58 -0000 Received: (qmail 3158 invoked by uid 48); 26 Nov 2006 20:03:49 -0000 Date: Sun, 26 Nov 2006 20:03:00 -0000 Message-ID: <20061126200349.3157.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/29984] SPE GCC segfaults with MAX_EXPR In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg02297.txt.bz2 ------- 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