From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 3199C3858D1E for ; Wed, 25 Oct 2023 16:37:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3199C3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3199C3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::333 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698251869; cv=none; b=kNVP4VvGVIDpwwpedTZW5mlgfVMMjPtOqYQgzi3I+JXOUtZKTAsT6BdEELz1h/j/wDYTdGYN8ernNQaWXDEOrinW8COGsT3fLcA+26Dtsq8+meXPN7VVJvZ3jqcvHRQCyu69rIV8TEz9Gy6xBiOGnGdGXeY/yh/X8WOgBO3p7pA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698251869; c=relaxed/simple; bh=og9gFa6dwKlK2Yq6ORMDZd1m+JQ0ou6lGupvQT3rzHs=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=SPjk2zFzqAilk8uz/6+3oBq7EOzyJIkttxTVFP7KGZbvHgdW34TnUkqZzDOhMDhJfx7XTxLxNZYPS4QpUfsW/hi33mrU2y3HpJciyCxTUqmq3V/vNxssooiv2sor7m+0hhg2s06P91TpInWxgQQMkztDdwgLv+s7dsprh1fNWSs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6ce2fc858feso3515664a34.3 for ; Wed, 25 Oct 2023 09:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1698251867; x=1698856667; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=M6ioZH4x7NkuwTlrpWy0mEtdge2G0bTAFMMrlGulU+8=; b=gXkRxI8zSbk0lzHCCM9EJI8KIQFOOsCm+CIw7YANeIsU4hwFTmI0zbcH/BjRx61rLH cJsgU/TZk8Ph3+RQCKuqzwgWCJIHp9YB/rXwFYCANyetIf8gEFJbgJc3skRMDj0r2PPQ meHbz7ya3TNWUHzJdJukVb0y7+5edZ+qZ5Aaw/dfyKbr0Zy/U/iV96KRIgQhcYahdr0P jD2o96B7g9+501h3pFQZ2HtcjhI0s6RQ5/w2cKYPzzsdbkIxyKoYexAcm1kMfVC/OO3g 9J5P3/d4aC/Yk9/7MnIBQH/E4GIJ9B6nZYFCFDXsjIUAO3pMAT+1ffQ2f93hjSOP7Fda 7B7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698251867; x=1698856667; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=M6ioZH4x7NkuwTlrpWy0mEtdge2G0bTAFMMrlGulU+8=; b=CXavydFt17ncX7EsWWLkwMVBaMatJIpOsSDKkvv1hEb7AoRjQ8qUS7QI1dDirwLA9w jbaaNlhogY0HMK5S2WqQzEW9bfjjcIA9DWlRMwYtkx/R5EM0H7xyxmNkrMtfsEewJOjL qKtq7R18eVaMlX/stMDUxrgn1kRyLHdm2pWFEqI7CPXxZjBnJlY6+sd8grFVijHAknI5 xjT7K3R/UDRejXuCySY0S4dDtOu6OmGjzhUzAGBSrGFR1aT7p77g8j+eJBJTqmFctkxi kONPwGa+uGEWa2x3CFCPFYu91x9IyXfCsI1jo2mWTBDrGQkaXBpLS5ZmlW7RVmiU9jgg trGA== X-Gm-Message-State: AOJu0YwNLKbf2x9zMPNiVDqGyj1xA0kwSw+ydaYgA6B7qtZuHciTpKlx f6qPqMKFhWgoo1spgQ4XlHwtxg== X-Google-Smtp-Source: AGHT+IE4TPMz4wzKGFsUi0AJmx4XzVq28+e7fevnaWA842c+y9vZKeuOkj7dv8aZ6WEIxahMNx4+ew== X-Received: by 2002:a9d:7d08:0:b0:6be:fd51:cb6d with SMTP id v8-20020a9d7d08000000b006befd51cb6dmr15838978otn.31.1698251865877; Wed, 25 Oct 2023 09:37:45 -0700 (PDT) Received: from [192.168.50.117] (c-98-210-197-24.hsd1.ca.comcast.net. [98.210.197.24]) by smtp.gmail.com with ESMTPSA id v25-20020a9d69d9000000b006c65f431799sm2340962oto.23.2023.10.25.09.37.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Oct 2023 09:37:45 -0700 (PDT) Message-ID: Date: Wed, 25 Oct 2023 09:37:44 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC] RISC-V: elide sign extend when expanding cmp_and_jump Content-Language: en-US To: Jeff Law , Robin Dapp , gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com References: <20231025050155.627837-1-vineetg@rivosinc.com> <7fe582bc-d259-4d2a-bedf-4e1a334d7fc3@gmail.com> <33283a26-0271-41c3-8934-159658eab352@gmail.com> <20af64b0-2c3b-426e-adc0-10baac70e7f7@gmail.com> <7c049504-b8f7-4f03-aa54-5015c74d1bbe@gmail.com> From: Vineet Gupta In-Reply-To: <7c049504-b8f7-4f03-aa54-5015c74d1bbe@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,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: On 10/25/23 06:52, Jeff Law wrote: > > On 10/25/23 07:47, Robin Dapp wrote: >> >>> Well, it doesn't seem like there's a lot of difference between doing >>> it in the generic expander bits vs target expander bits -- the former >>> just calls into the latter for the most part.  Thus if the >>> subreg-promoted state is available in the target expander, I'd expect >>> it to be available in the generic expander. >> >> Ah, sorry I meant in the [sign|zero]extend expanders rather than the >> compare expanders in order to catch promoted subregs from other origins >> as well.  Maybe that doesn't work, though? > That's a *really* interesting idea.  Interested in playing around a > bit with that Vineet? Sure I'll tinker with the {sign,zero}expanders. And there's a third playing field :-) There seem to be still cases where subreg-promoted note is not set when it probably should. So we end up in riscv_extend_comparands but with note not being there (for something corresponding to function arg) thus can't skip the extension. Thx, -Vineet