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 28F943858D32 for ; Thu, 27 Apr 2023 09:49:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 28F943858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 53BA71FDE1; Thu, 27 Apr 2023 09:49:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1682588964; 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=MzPyefEhZXitUbsxwB2dOv5vK6b6rFrRdnNRWy1iMj8=; b=Ubp65Xid4XA6iujo/RiOaQDpD+SHUgP5KUFjQWoZS8BWejq9hzyB+6dVtiHOUBoIrvkNew ftPvEm3ZAy/CalkVEKahQ6s6iweZHEyMmw+qeVl7DvWrfYIIpulny//EsPDooRh1k6bmhc WEfPRe4E06HXS4E4JiZ7qH73LXznbfo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1682588964; 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=MzPyefEhZXitUbsxwB2dOv5vK6b6rFrRdnNRWy1iMj8=; b=l9fEQUgJrE+geBe2mE2OGQdeoQSRTtfVGyZApI6fUuucL40ez+Vwdu20pSexdRrDt96Ywu IRk+jTot5rs9d1Dg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 395A713910; Thu, 27 Apr 2023 09:49:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wpTqDSRFSmTcfAAAMHmgww (envelope-from ); Thu, 27 Apr 2023 09:49:24 +0000 From: Martin Jambor To: Richard Biener Cc: GCC Patches Subject: Re: [PATCH] ipa/109607 - properly gimplify conversions introduced by IPA param manipulation In-Reply-To: References: User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.2 (x86_64-suse-linux-gnu) Date: Thu, 27 Apr 2023 11:49:23 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Hi, On Thu, Apr 27 2023, Richard Biener wrote: > The following addresses IPA param manipulation (through IPA SRA) > replacing > > BIT_FIELD_REF <*this_8(D), 8, 56> > > with > > BIT_FIELD_REF (ISRA.814), 8, 56> > > which is supposed to be invalid GIMPLE (ISRA.814 is a register). > There's currently insufficient checking in place to catch this in the > IL verifier but I am working on that as part of fixing PR109594. > > The solution for the particular testcase I am running into this is > to split the conversion to a separate stmt. Generally the modification > phase is set up for this but the extra_stmts sequence isn't passed > around everywhere. The following passes it to modify_expression > from modify_assignment when rewriting the RHS. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > OK for trunk? Yes, thank you! Martin > > Thanks, > Richard. > > PR ipa/109607 > * ipa-param-manipulation.h > (ipa_param_body_adjustments::modify_expression): Add extra_stmts > argument. > * ipa-param-manipulation.cc > (ipa_param_body_adjustments::modify_expression): Likewise. > When we need a conversion and the replacement is a register > split the conversion out. > (ipa_param_body_adjustments::modify_assignment): Pass > extra_stmts to RHS modify_expression. > > * g++.dg/torture/pr109607.C: New testcase.