From patchwork Mon Mar 21 13:48:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 87784 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 46D79B6F0D for ; Tue, 22 Mar 2011 00:48:45 +1100 (EST) Received: (qmail 9231 invoked by alias); 21 Mar 2011 13:48:30 -0000 Received: (qmail 9162 invoked by uid 22791); 21 Mar 2011 13:48:28 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Mar 2011 13:48:22 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 1A07786391 for ; Mon, 21 Mar 2011 14:48:20 +0100 (CET) Date: Mon, 21 Mar 2011 14:48:18 +0100 (CET) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Weaken PR47661 Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org We force all maybe-trapping conditions into separate stmts, but this isn't necessary w/o -fno-call-exceptions. It also confuses our branch prediction. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. The bug remains for -fnon-call-exceptions. Richard. 2011-03-21 Richard Guenther PR middle-end/47661 * gimple.c (is_gimple_condexpr): Use tree_could_throw_p. Index: gcc/gimple.c =================================================================== --- gcc/gimple.c (revision 171142) +++ gcc/gimple.c (working copy) @@ -2581,7 +2581,7 @@ bool is_gimple_condexpr (tree t) { return (is_gimple_val (t) || (COMPARISON_CLASS_P (t) - && !tree_could_trap_p (t) + && !tree_could_throw_p (t) && is_gimple_val (TREE_OPERAND (t, 0)) && is_gimple_val (TREE_OPERAND (t, 1)))); }