From patchwork Tue Jan 23 20:54:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 865037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-471913-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="eDqzKRA+"; dkim-atps=neutral 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 3zR0t80XC2z9s7F for ; Wed, 24 Jan 2018 07:54:54 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=R4zcnnpY2+nRc0gQ d3H1jR7MgaXBn4I7c8d1NCfdK5CAmLKHu3ROA7uqJK4tMrOtw/io0hYEKh+XxjCy Fh3bxx+echa2Cn5mIAwMBY/d2Bz+dE1adPkHSIyNGrgYSLZaksEU3DMxlxVT1No9 OTMD5Gu+nx/L4anFrH/1yU3u2EM= 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:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=A4VzDfMqdfpKFDg2XO80qT n6Vd0=; b=eDqzKRA+1cEyVSO3h7m8FF+cV4C8EEmew416xMRWplyFfzM/dL0LMa GwA4jIdt0oXJRVmnfltRK+EENqH90zd9mh/cSitc/XIrIIIleUImPoYmmNtjBQ8Z fBSr7c8G8AnYsaXBQ4nQ6dS+MM+Zyk0p+QWy+CEg7htlx/2qTLeI4= Received: (qmail 125119 invoked by alias); 23 Jan 2018 20:54:46 -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 125085 invoked by uid 89); 23 Jan 2018 20:54:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Jan 2018 20:54:40 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 00F2181395 for ; Tue, 23 Jan 2018 21:54:38 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VD70fQE1Dc9Z for ; Tue, 23 Jan 2018 21:54:37 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id D1DCF8138F for ; Tue, 23 Jan 2018 21:54:37 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Fix PR rtl-optimization/81443 Date: Tue, 23 Jan 2018 21:54:37 +0100 Message-ID: <4036936.2FtM7nYaUC@polaris> MIME-Version: 1.0 This is a combinatorial explosion in the combiner for the num_sign_bit_copies mechanism present on the 7 branch and mainline during the bootstrap on MIPS n32, i.e. a 64-bit WORD_REGISTER_OPERATIONS SIGN_EXTEND target. While I'm still exploring various approaches to fixing it on the mainline, Richard B. agreed to have it fixed on the 7 branch by reverting the problematic bits from the PR rtl-optimization/59461 patch that introduced it. Manually tested on mips64-unknown-linux-gnu, applied on the 7 branch. 2018-01-23 Eric Botcazou PR rtl-optimization/81443 * rtlanal.c (num_sign_bit_copies1) : Do not propagate results from inner REGs to paradoxical SUBREGs. Index: rtlanal.c =================================================================== --- rtlanal.c (revision 256841) +++ rtlanal.c (working copy) @@ -4976,7 +4976,7 @@ num_sign_bit_copies1 (const_rtx x, machi if (WORD_REGISTER_OPERATIONS && load_extend_op (inner_mode) == SIGN_EXTEND && paradoxical_subreg_p (x) - && (MEM_P (SUBREG_REG (x)) || REG_P (SUBREG_REG (x)))) + && MEM_P (SUBREG_REG (x))) return cached_num_sign_bit_copies (SUBREG_REG (x), mode, known_x, known_mode, known_ret); break;