From patchwork Thu Oct 1 13:33:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 1375064 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=yEKcTeDh; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C2Dbx43K2z9sPB for ; Thu, 1 Oct 2020 23:33:48 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A65B398547C; Thu, 1 Oct 2020 13:33:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A65B398547C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1601559226; bh=igbYgO3OgmSpTucjT8sgBG+VN8sGJL4HjDhlhHtLIjs=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=yEKcTeDha89JZgXCSm24xtkl79dJr97HrRqjAwJEILa3V1/KSQBsZYFuy3TNnxnLj J5BAV8M4AsuXCy1+dNYiHTrBHhI/2nQwJ3E/pBpuQAhQJuFJPJW2MCNpzBkXBEEN42 0tVfREsar/SSp6q0htaBNCmxt7uzjybddADkWQBY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by sourceware.org (Postfix) with ESMTPS id 5E6F4384B0C0 for ; Thu, 1 Oct 2020 13:33:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5E6F4384B0C0 Received: by mail-pj1-x1044.google.com with SMTP id jw11so1887459pjb.0 for ; Thu, 01 Oct 2020 06:33:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=igbYgO3OgmSpTucjT8sgBG+VN8sGJL4HjDhlhHtLIjs=; b=O3JUfo1/BpGGpFEd5kh32cHtD+3agOBFQx2uDND/hWPLaWNIFMaWccBFZ6ScFyDMNi fPs8eSCWc1ajpafbS8/2GepQNKwPByNQ80QwhzRKIFHBCABeRdhmUitNU8XUJAm7fOgl kili41SxshAmcWiWVwyH3P7TIA6NT1ETbZCpypnnSv7yBrOO8R7vGvDA48euE1vD16fe 7Jq0IW8WFJGlqOrcj2XVfJ9Od4BWALPaDuRtrw2qhMstbi7G04K1nHrdZ80Tw6/qRrQE nNKYwWlBujeVvuv+OIE1R0KErZX418eK/3HeNQEx04/gymUMjf2kdO6p/OoDfIMB2Obu a0vw== X-Gm-Message-State: AOAM533LyXcjyNAw4fNxu7HoXpeCaADTGQ9JTO3SuEJ8dx5r9yDUuaq9 c2DFwf7JCGNR70cP9nqpMbblMWJwoRB6RA== X-Google-Smtp-Source: ABdhPJydpIEnhEtiIaRUSjX74Jvo72XnYtpEaKzaMscereLRYkR7IzlFinVqwruAvYEJBdCtjd3Www== X-Received: by 2002:a17:90a:6a0d:: with SMTP id t13mr31617pjj.208.1601559221927; Thu, 01 Oct 2020 06:33:41 -0700 (PDT) Received: from bubble.grove.modra.org ([2406:3400:51d:8cc0:900:a216:a1d7:553c]) by smtp.gmail.com with ESMTPSA id m20sm6335440pfa.115.2020.10.01.06.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2020 06:33:41 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 5B08986966; Thu, 1 Oct 2020 23:03:37 +0930 (ACST) Date: Thu, 1 Oct 2020 23:03:37 +0930 To: gcc-patches@gcc.gnu.org Subject: [RS6000] ICE in decompose, at rtl.h:2282 Message-ID: <20201001133337.GM15011@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alan Modra via Gcc-patches From: Alan Modra Reply-To: Alan Modra Cc: David Edelsohn , Segher Boessenkool Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" during RTL pass: fwprop1 gcc.dg/pr82596.c: In function 'test_cststring': gcc.dg/pr82596.c:27:1: internal compiler error: in decompose, at rtl.h:2282 -m32 gcc/testsuite/gcc.dg/pr82596.c fails along with other tests after applying rtx_cost patches, which exposed a backend bug. legitimize_address when presented with the following address (plus (reg) (const_int 0x7ffffffff)) attempts to rewrite it as a high/low sum. The low part is 0xffff, or -1, making the high part 0x80000000. But this is no longer canonical for SImode. Bootstrapped and regression tested powerpc64-linux biarch and powerpc64le-linux. OK? * config/rs6000/rs6000.c (rs6000_legitimize_address): Properly sign extend high part of address constant. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 375fff59928..d0924d59a65 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -8364,7 +8364,7 @@ rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, low_int = 0; high_int = INTVAL (XEXP (x, 1)) - low_int; sum = force_operand (gen_rtx_PLUS (Pmode, XEXP (x, 0), - GEN_INT (high_int)), 0); + gen_int_mode (high_int, Pmode)), 0); return plus_constant (Pmode, sum, low_int); } else if (GET_CODE (x) == PLUS