From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id ECCBE385782B for ; Mon, 13 Sep 2021 11:44:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ECCBE385782B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: J6OhL7XE3FnTX7AG3s+WERHfOcM5SrBspk4lAv2LrTUFS75OhhwXrXSFjyGdZZdhWGOlwLTkwU sROsctLSHATMXy3R3nlGBLH5+UJ2mWPk4m96NGE44Bjq1NJ/21UmPUh+0dpPpoSJVwcz/cBsq5 YEWDe7DfBA1wTNtnih1bS/UK/zoo6Fda9BpE9nsM2K3HzL+rQhgKIQ90LISmmkOYEeKJ/eGmxu TF5aZOIjyT9X7a5HFAOcUzHIw2LkliP2YZS/gPNx3bSgXF+hd/tKqCU9H0pV1GcmtJkM+DsbG6 S0hvEZIHOb9xqpR0LXH9fcYx X-IronPort-AV: E=Sophos;i="5.85,288,1624348800"; d="scan'208";a="65979749" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 13 Sep 2021 03:44:38 -0800 IronPort-SDR: xG8zf9zEbu4ytdfXEOFLARokvYFWUTgOZ9KiGSUNPRM00tvhJbauXeuH4E84E0GWzTcj0Kr6Ei HMWs/A2hOCwFrZ6aJp4kLV0JHl/1gGHxxgSopylynoYFf3VQhde1UZ0RoCzolMnsXuYBJou7P9 BdXFY9D5pSYmwGDfjI7GAlIMjNvrmReimKiSS4tyBCbChTPop1/GFj4whFOnE8SkYPXxJjVAEF DUJ49pCNaRCHJZaphXozPmZJYWVCBgEr8+g5XnFXgzRVVdMcVoiMZjSivO8S+5pDspro5VZb6x B9o= Subject: Re: [PATCH 2/2] validate_subreg before call gen_lowpart to avoid ICE. To: Hongtao Liu , Richard Biener CC: Michael Meissner , Andrew Waterman , Segher Boessenkool , , Andreas Schwab , GCC Patches , liuhongt References: <20210910125818.334531-1-hongtao.liu@intel.com> <20210910125818.334531-3-hongtao.liu@intel.com> From: Tobias Burnus Message-ID: <2377470f-f956-d65a-f9cd-82b15e7a5f73@codesourcery.com> Date: Mon, 13 Sep 2021 13:44:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Mon, 13 Sep 2021 11:44:41 -0000 On 13.09.21 13:14, Hongtao Liu via Gcc-patches wrote: > Yes, update patch > bootstrapped and regtested on x86_64-linux-gnu{-m32,}. > Ok for trunk? If that patch gets approved, can you add PR bootstrap/102302 to the commit changelog ? cf. https://gcc.gnu.org/PR102302 Thanks, Tobias > gcc/ChangeLog: > > * expmed.c (extract_bit_field_using_extv): Use > gen_lowpart_if_possible instead of gen_lowpart to avoid ICE. > --- > gcc/expmed.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/gcc/expmed.c b/gcc/expmed.c > index 3143f38e057..59734d4841c 100644 > --- a/gcc/expmed.c > +++ b/gcc/expmed.c > @@ -1571,14 +1571,16 @@ extract_bit_field_using_extv (const > extraction_insn *extv, rtx op0, > > if (GET_MODE (target) !=3D ext_mode) > { > + rtx temp; > /* Don't use LHS paradoxical subreg if explicit truncation is nee= ded > between the mode of the extraction (word_mode) and the target > mode. Instead, create a temporary and use convert_move to set > the target. */ > if (REG_P (target) > - && TRULY_NOOP_TRUNCATION_MODES_P (GET_MODE (target), ext_mode)) > + && TRULY_NOOP_TRUNCATION_MODES_P (GET_MODE (target), ext_mode) > + && (temp =3D gen_lowpart_if_possible (ext_mode, target))) > { > - target =3D gen_lowpart (ext_mode, target); > + target =3D temp; > if (partial_subreg_p (GET_MODE (spec_target), ext_mode)) > spec_target_subreg =3D target; > } > -- > 2.27.0 > >> target =3D tem; >> ... >> >> Richard. >> >>>>> if (partial_subreg_p (GET_MODE (spec_target), ext_mode)) >>>>> -- >>>>> 2.27.0 >>>>> >>> >>> >>> -- >>> BR, >>> Hongtao > > ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955