From patchwork Mon Mar 2 18:55:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 445398 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3423F1400EA for ; Tue, 3 Mar 2015 05:55:42 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=YATfazdj; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=hWZ4YnqJLII+LfCm1 e/2t/etm+/NeMGOAyAiAiYS5CdF6BLi0atLc4SgPlREjjsqDDcY1axmsRMcGKPtL ozqNWeqmJ/NeBASBNX5v8oV1WQvDea9SNlukMuJu+NNsyNn0f7e1/5CeuSiGpQuq ES+HUcd8mue3Ym79E6zGWtx7bI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=HjHRxSk+/Y1ErVsCxcE2Yww ymn4=; b=YATfazdjT00ILu1FR61RoSvu5eNDorlTGbgA9x792Hmit8UlM7+LQBP B/fMniwwqEZN4QzoO1Xa6+aa5u0h13Qp/mHmwjcLrWvTSpJtdKOZ0xMu43vq0Z4e AKpq4FQbuwLJXj1xDNRPGRNkVbX8PCxXxCi2mN3ZXmW22i7NRBFM= Received: (qmail 10238 invoked by alias); 2 Mar 2015 18:55:34 -0000 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 Received: (qmail 10226 invoked by uid 89); 2 Mar 2015 18:55:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 02 Mar 2015 18:55:32 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t22ItU3M007926 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 2 Mar 2015 13:55:30 -0500 Received: from reynosa.quesejoda.com (vpn-49-132.rdu2.redhat.com [10.10.49.132]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t22ItSbJ008530; Mon, 2 Mar 2015 13:55:29 -0500 Message-ID: <54F4B220.7050003@redhat.com> Date: Mon, 02 Mar 2015 10:55:28 -0800 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Richard Henderson , gcc-patches CC: Jakub Jelinek Subject: Re: [patch] PR rtl-optimization/65220: avoid integer division in stack alignment References: <54EFCC88.6080203@redhat.com> <54F4A40B.5010807@redhat.com> <54F4AE0F.3060708@redhat.com> In-Reply-To: <54F4AE0F.3060708@redhat.com> >> Do you actually need the reload completed? Couldn't this be legitimately split >> before reload (and then parts of it DCE'd as necessary)? >> >> Otherwise, the split condition does need "&&" as mentioned by Uros. > > Oh, I forgot -- even if you can exclude reload_completed, > you'd then need to use "&& 1" to effectively copy the first > condition. And *this* is why I hate rtl. All these secret magic knobs. Arghh... The following patch still fixes the problem in the PR, but without reload_completed. I am doing a full round of tests. OK pending tests? commit ee167c8a716799af9eb0e2275156061d76719dac Author: Aldy Hernandez Date: Mon Mar 2 10:53:29 2015 -0800 * config/i386/i386.md (*udivmod4_pow2): Remove reload_completed. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 8495284..8a80415 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -7343,7 +7343,7 @@ "UINTVAL (operands[3]) - 2 < * BITS_PER_UNIT && (UINTVAL (operands[3]) & (UINTVAL (operands[3]) - 1)) == 0" "#" - "&& reload_completed" + "&& 1" [(set (match_dup 1) (match_dup 2)) (parallel [(set (match_dup 0) (lshiftrt: (match_dup 2) (match_dup 4))) (clobber (reg:CC FLAGS_REG))])