From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id DE6333858D33 for ; Fri, 10 Nov 2023 01:32:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DE6333858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DE6333858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::536 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699579934; cv=none; b=qE6AABxEMpyNN9XMrfApv7Vc855acBnII/bHeOR+kRF4ySAEZ63QNwancqJs1R8zGG6A4moDPzS+hTC70q/6yvmI13IZwbOwyEhanhDYjhFEc5eIqYfVeEugOkX64fHnIdJhtdbeV6l7Knbs1lHyPNa1ADuIDzmaSxKXG4OjDO8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699579934; c=relaxed/simple; bh=TUWo2whrj8aAUSrGc94DHNchHDijKo8XhUaXIzpUVqA=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=hDW3BqpRF9t6cZpJP5LWD0aK2Qg8MwS4wEnvJgW3K1fbv9/uHZ9wSviWFOaXYz4/xzIgGuKmnV8VQah4SNK8n4eNpl/QBbUnVS/lyd2TCoxlCiNqqPCLK2pj+5NMIDE1zSQiQMIltAz76S07/AerBFJzEg2K8RkemHhp2wQ2iMU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-545ed16b137so1742317a12.1 for ; Thu, 09 Nov 2023 17:32:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1699579927; x=1700184727; darn=gcc.gnu.org; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9o7w7z89QK7EiODL73pkWPkLpzxR2NHqkWd+nPLRd9w=; b=W6Ge1DsP5UyMrqvkLqqcyUdlrosE7LsiupNDO6EwLfLvRuT//uUhUi3xV2AOzfyaGC qpuNIv96arulkx9nfi9kd2/r4cRHNkSmyxuzRk6KpnREG27YY6SiX1DgDKH6Ez3764HM O2uw7T3ub+twC0idMAR6lC1DETBicBXIWz1RgeI/1fUGaByFMb+RSjb4wDCu3EAHokle CGyL6O4SQtO1GzQ2eYiG+aZfjx4qQqMm+qNcWAlxYrGr9xQ9UGmO8H/ryIFGz2hmZuL3 Vipp9Mr3Oq7c41f4GdgrEzSlnnnXwZM8qwjPvMYebUgjMds/i74jLL/BSWI3YXdgoYtf BC3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699579927; x=1700184727; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9o7w7z89QK7EiODL73pkWPkLpzxR2NHqkWd+nPLRd9w=; b=B9+iKao8VyYlztOuMvmKLzOluCleCW+84cz0AF83pJUQWBTf6HSWGk1muuBxkvXHys 06rTPjL+Pemi7PJP8P3d7ci9jJF9tqriu4kuW8AaMmfkfgi/H4mTjA4y1WZ8aYl2q24z 1tjIoOSAwa5qUYYEJZHwMGUOf/w4qrcwbQM4VqR54Gvsy4P++sx+GDd5IOhP4LDj8aP1 Ss9PrYQLHdZO/78ZhJfeZWeHJnBJGZYQCiwBZ6BAjDm5THsyVsKWpxiSq0iJMPh1cbo7 /8d40PBhrdsci+y7s6xNJC7tqNr+qaLVXdw5k0BLxr4oH00L88OD85T5A0FSwrt6B/7n iG8w== X-Gm-Message-State: AOJu0YzIE0iZhBNJgrCS2FL5m3gEoxQwKhQN2v9rezfFN9SpMv7iXdzF Jqv04BZJqww5zPYROaTqbzK9vw== X-Google-Smtp-Source: AGHT+IHuKPN1F4MgbSqx6JT3dEf8qrN2BJsan1YvRvxu1EXt6Ut1s5Yfi0TxK3+oX62pTnbeT9Up9A== X-Received: by 2002:a50:8e59:0:b0:543:5b61:6908 with SMTP id 25-20020a508e59000000b005435b616908mr5465320edx.18.1699579927082; Thu, 09 Nov 2023 17:32:07 -0800 (PST) Received: from annie.orcam.me.uk (annie.orcam.me.uk. [2001:4190:8020::48]) by smtp.gmail.com with ESMTPSA id d4-20020a056402516400b0052febc781bfsm489567ede.36.2023.11.09.17.32.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Nov 2023 17:32:06 -0800 (PST) Date: Fri, 10 Nov 2023 01:32:03 +0000 (GMT) From: "Maciej W. Rozycki" To: Jeff Law cc: gcc-patches@gcc.gnu.org Subject: Re: [committed] RISC-V: Fix INSN costing and more zicond tests In-Reply-To: <236780fb-a6cc-4e56-b490-0e44e56d5b06@gmail.com> Message-ID: References: <236780fb-a6cc-4e56-b490-0e44e56d5b06@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,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 Thu, 9 Nov 2023, Jeff Law wrote: > > Can we have the insn costing reverted to correct calculation? > What needs to happen is that code needs to be extended, not reverted. Many > codes have to be synthesized based on the condition and the true/false arms. > That's not currently accounted for. How is maintaining zillions of variants of insn counts by hand (IIUC what you mean) going to be more efficient (or even practical maintenance-wise) than what the middle end did automagically? What exactly was wrong with the previous approach, and then why didn't your change include a proof of correctness in the form of testsuite cases verifying branch vs conditional move costing stays the same (or gets corrected if applicable) across your change? I guess I'll post my patch series regardless on the presumption that correct insn counting will have been reinstated for GCC 14 one way or another (i.e. by reverting commit 44efc743acc0 locally in my tree and then getting clean test results across the patch series) and we can take it from there. Also to make sure we're on the same page. I do hope it will be considered worthwhile despite this issue making it not ready for testsuite verification, as not only it adds new features, but it fixes numerous existing problems, plain bugs, and deficiencies as well which we currently have in conditional move handling. But it relies on correct costing for verification, which I couldn't have expected that will get broken again (regardless of your clearly good intentions). And I'd rather we had these test cases or otherwise costing regressions are easily missed (as indicated here). Maciej