From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id F376A3858C39 for ; Thu, 11 Apr 2024 14:01:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F376A3858C39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F376A3858C39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=63.228.1.57 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712844068; cv=none; b=S71k4c4Fkbv6nja+UdIsG7lKLBgL5W7OK9ORPiJEEufQnjlyceG9NJCugXn7Kuk7z4rnyv5ibs4F9kC/IfjvBFbf+TM/TkoWbEJiQp1PMqIC41pA2mfesnhykQutygPxV37hxzzwFGLV6D6S54pxcqWPBdCzIQR0Gy+gm1iGcNY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712844068; c=relaxed/simple; bh=XkX57hRnC4OPcTUrt7xzHlNf+YTzUhlIM+3YyFEgv3Q=; h=Date:From:To:Subject:Message-ID:Mime-Version; b=u7+WtAJiZw0nqdazO5fhjAuoHi+YYhTFWqq6MrCAj8HlVl0p+sU5Q/oAl2JcOKnJPJpC0NLhMOS4hp1PkTKyOHv0kIwH5fJnpyPeIpdqb+l39bU+A4lXe8j0V0vjtvkM0+9gSpyCqEKTXUh+ATNbsLRQXwGC/jNTL2A/mWIjN/o= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 43BE03iK019166; Thu, 11 Apr 2024 09:00:03 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 43BE02Ek019165; Thu, 11 Apr 2024 09:00:02 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 11 Apr 2024 09:00:02 -0500 From: Segher Boessenkool To: Uros Bizjak Cc: "gcc-patches@gcc.gnu.org" , Jeff Law , Richard Biener Subject: Re: Combine patch ping Message-ID: <20240411140002.GO19790@gate.crashing.org> References: <20240410175227.GN19790@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no 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 Wed, Apr 10, 2024 at 08:32:39PM +0200, Uros Bizjak wrote: > On Wed, Apr 10, 2024 at 7:56 PM Segher Boessenkool > wrote: > > This is never okay. You cannot commit a patch without approval, *ever*. This is the biggest issue, to start with. It is fundamental. > > That patch is also obvious -- obviously *wrong*, that is. There are > > big assumptions everywhere in the compiler how a CC reg can be used. > > This violates that, as explained elsewhere. > > Can you please elaborate what is wrong with this concrete patch. The explanation of the patch is contradictory to how RTL works at all, so it is just wrong. It might even do something sane, but I didn't get that far at all! Write good email explanations, and a good proposed commit message. Please. It is the only one people can judge a patch. Well, apart from doing everything myself from first principles, ignoring everything you said, just looking at the patch itself, but that is a hundred times more work. I don't do that. > The > part that the patch touches has several wrong assumptions, and the > fixed "???" comment just emphasizes that. I don't see what is wrong > with: > > (define_insn "@pushfl2" > [(set (match_operand:W 0 "push_operand" "=<") > (unspec:W [(match_operand 1 "flags_reg_operand")] > UNSPEC_PUSHFL))] > "GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_CC" > "pushf{}" > [(set_attr "type" "push") > (set_attr "mode" "")]) What does it even mean? What is a flags:CC? You always always always need to say what is *in* the flags, if you want to use it as input (which is what unspec does). CC is weird like this. Most targets do not have distinct physical flags for every condition, only a few conditions are "alive" at any point in the program! > it is just a push of the flags reg to the stack. If the push can't be > described in this way, then it is the middle end at fault, we can't > just change modes at will. But that is not what this describes: it operates on the flags register in some unspecified way, and pushes the result of *that* to the stack. (Stack pointer modification is not described here btw, should it be? Is that magically implemented by the backend some way, via type=push perhaps?) Segher