From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 7360E3858D33 for ; Fri, 17 Feb 2023 07:38:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7360E3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 763EB1F88F; Fri, 17 Feb 2023 07:38:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1676619523; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XmWmlHVltIZ7UDdc7IpDiTf/patfnNBYirv+M8LAtQY=; b=n8NMMZiNo59sIEGN6S8o5jIWgAZCaQys6Xjxv7CNpalfB51d3fVL/2MXlLfII3BbszoIot TExS2bfvWwyaSUD/1Pi9hifCQhjOjKsGPpC1BtdRGYGpubfpuQADY9nXlvWu3ziCX4o+Ag rVbGtdj5TfBIZqL62Xzp/Pv7yZp2ufI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1676619523; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XmWmlHVltIZ7UDdc7IpDiTf/patfnNBYirv+M8LAtQY=; b=nEidV60QRdyYgi0+JYCpnUQVL9YeNjOZAekqBtCYllCd4tNprtXwTnUrIyasuhfwtdmB+j VusBGQarEHqkWQAA== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 690EA2C141; Fri, 17 Feb 2023 07:38:43 +0000 (UTC) Date: Fri, 17 Feb 2023 07:38:43 +0000 (UTC) From: Richard Biener To: Uros Bizjak cc: "gcc-patches@gcc.gnu.org" , Richard Sandiford Subject: Re: [PATCH] simplify-rtx: Fix VOIDmode operand handling in simplify_subreg [PR108805] In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1609957120-660926972-1676619523=:27913" X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1609957120-660926972-1676619523=:27913 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Thu, 16 Feb 2023, Uros Bizjak wrote: > simplify_subreg can return VOIDmode const_int operand and will > cause ICE in simplify_gen_subreg when this operand is passed to it. > > The patch prevents VOIDmode temporary from entering simplify_gen_subreg. > We can't process const_int operand any further, since outermode > is not an integer mode here. But if it's a CONST_INT then we know it's of int_outermode, no? That is, doesn't simplify_subreg (mode, ...) always return something in 'mode' and thus we can always pass just 'mode' as third argument to the following simplify_gen_subreg call? Richard. > 2023-02-16 Uroš Bizjak > > gcc/ChangeLog: > > PR target/108805 > * simplify_rtx.cc (simplify_context::simplify_subreg): Prevent > VOIDmode const_int result from simplify_subreg from entering > simplify_gen_subreg. > > gcc/testsuite/ChangeLog: > > PR target/108805 > * gcc.dg/pr108805.c: New test. > > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. > > OK for master and release branches? > > Uros. > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman; HRB 36809 (AG Nuernberg) ---1609957120-660926972-1676619523=:27913--