From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id 637793858D38 for ; Fri, 8 Mar 2024 10:36:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 637793858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 637793858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709894199; cv=none; b=ZJipTZ4OXs8l0KCEvkWS5d0oJeY4bUYsg3j1yuhw58ieLATeYf4UE6XXQwMgHUPCBB9y/69/LqxjsMbxrX+mwpVhAJNQ8/MiQlz/2FRWVAi+gEi6or6ZjZbd33gH89CyBWmSvdWzjDzHeHOs1m6LnatYBGFowC87HtpWKIUuPtQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709894199; c=relaxed/simple; bh=W4V6QgnAdxfrzxWRCTCQQ0I5gP4ZmRYVOvN8yI0/lZ8=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date: From:To:Subject:Message-ID:MIME-Version; b=uEjtHQoueWj4NoESeLQ1d0z9957rSKQdNHBNGWL4Pe2Z7lNi4plL38QzocjuzSKXH9ja2g4H8R4Amv4Wes9U3PMmsQQnRWHCdodbktq8E/KvRrDSMMmguRP54i4OM8JNrOm/fQYyn4q0RNzvUh+PBeJR1lMPVLjabn7dMxVDOIc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [10.168.4.150] (unknown [10.168.4.150]) (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 smtp-out1.suse.de (Postfix) with ESMTPS id C094B16E52; Fri, 8 Mar 2024 08:41:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709887272; 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=NjZ9vGZMBXPeIgBOxMGP2H8LwqfqMvbS56XUSvMkShM=; b=a6O/Wh/KCPW68YTKukjzph0ryVo0Zqwl4u1lUnLK/gBSZ0PIoP0tehRnUe6oL6w4rLLiuw oE/Hguv4pNPlsOBTVrNX8ngZawJSd58XCZZLfSkR5f/35qtftnYuZ4k75TpwLpvuTltrzG PzQmAb9wPDrgUWfhngrljQXJaz4/lmw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709887272; 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=NjZ9vGZMBXPeIgBOxMGP2H8LwqfqMvbS56XUSvMkShM=; b=DWg3TvH5Z7aOYFWh6XMG+G1bVTUrjd/NmPHQhvl7gfNd9zlCmoXGUiuh8TlIBdAoIIBEnt hO9WwbJXoW+3nSBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709887272; 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=NjZ9vGZMBXPeIgBOxMGP2H8LwqfqMvbS56XUSvMkShM=; b=a6O/Wh/KCPW68YTKukjzph0ryVo0Zqwl4u1lUnLK/gBSZ0PIoP0tehRnUe6oL6w4rLLiuw oE/Hguv4pNPlsOBTVrNX8ngZawJSd58XCZZLfSkR5f/35qtftnYuZ4k75TpwLpvuTltrzG PzQmAb9wPDrgUWfhngrljQXJaz4/lmw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709887272; 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=NjZ9vGZMBXPeIgBOxMGP2H8LwqfqMvbS56XUSvMkShM=; b=DWg3TvH5Z7aOYFWh6XMG+G1bVTUrjd/NmPHQhvl7gfNd9zlCmoXGUiuh8TlIBdAoIIBEnt hO9WwbJXoW+3nSBQ== Date: Fri, 8 Mar 2024 09:41:12 +0100 (CET) From: Richard Biener To: Jakub Jelinek cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] bb-reorder: Fix assertion In-Reply-To: Message-ID: <54r3r5pp-0p57-5081-674q-6o006pr6p723@fhfr.qr> References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -1.55 X-Spamd-Result: default: False [-1.55 / 50.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.19)[-0.966]; RCPT_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-0.25)[73.47%] X-Spam-Status: No, score=-5.0 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: On Fri, 8 Mar 2024, Jakub Jelinek wrote: > Hi! > > When touching bb-reorder yesterday, I've noticed the checking assert > doesn't actually check what it meant to. > Because asm_noperands returns >= 0 for inline asm patterns (in that case > number of input+output+label operands, so asm goto has at least one) > and -1 if it isn't inline asm. > > The following patch fixes the assertion to actually check that it is > asm goto. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK. > 2024-03-08 Jakub Jelinek > > * bb-reorder.cc (fix_up_fall_thru_edges): Fix up checking assert, > asm_noperands < 0 means it is not asm goto too. > > --- gcc/bb-reorder.cc.jj 2024-03-07 10:06:56.086285875 +0100 > +++ gcc/bb-reorder.cc 2024-03-07 10:11:44.745261926 +0100 > @@ -2024,7 +2024,8 @@ fix_up_fall_thru_edges (void) > See PR108596. */ > rtx_insn *j = BB_END (cur_bb); > gcc_checking_assert (JUMP_P (j) > - && asm_noperands (PATTERN (j))); > + && (asm_noperands (PATTERN (j)) > + > 0)); > edge e2 = find_edge (cur_bb, e->dest); > if (e2) > e2->flags |= EDGE_CROSSING; > > Jakub > > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)