From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id B2F3D3858C27 for ; Mon, 28 Nov 2022 18:07:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B2F3D3858C27 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x536.google.com with SMTP id r18so10620801pgr.12 for ; Mon, 28 Nov 2022 10:07:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=rDX+GGxW85pKk8nT9Y15Y+1fAYWVP6KOuu2zwHVEKD0=; b=C/qbMRBB/Og5b52FpM7FQeb8J/4LDzJgMBkbgy0Unm+wfbYsKp11CFkQp3ElPlDZL/ CkLS5mFV+4n2FKO14hJ+URufU1JANjS5hhXAmIguwNLSom3iazNO/PJJqPx8NuKsM4DW zjOOn8a37ViFJg7Ynx+hPpjRI55LgDeur9/Au/mDif9LxbqaL3x5hrVoZulNsox+HB6u Q93/41DOz/eLldnTbB9Ggd8C/mXGoH4VlAd++ymxdSUOc1++KMLEqCc6Exb9BuVEn1dn +8rVjyN7G3+CkdACmh2X6ukCo1QJqSZr1h6ejTyG3zMa6y4eirjVFpSwBGSnw8F1AUTu CMGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=rDX+GGxW85pKk8nT9Y15Y+1fAYWVP6KOuu2zwHVEKD0=; b=KvmWhqbUcNjswAsMAqyIt5S4mqzdhuJilBdTC0fhaziSnIUYq1TQt6keZEQN36ed3a LRnqXKYSR9z3b8GmkFJKa59wC1Mw0JEA/qRgmjl+qxMTIbxg7lyeb5Y8MWGlQlYBLjKt HEbQHGlJKNT4bkdFs6RQbupMFZlazzrFS2SvuxfW7vvwL6w2faYwLEoHAEVr3WX8kaxf M98mEgM+ma0MS/umLVpQhW0YUwoVbkKAaITHoCm325YDRr00njc/NjPHkL3XEBuiqts2 Fg//H8vBtLffXq8JUXokU+rbPpT4iB/3l1KoB9PbTj4FNWKuPDLn059Dx8wkZfjwS5P6 67tA== X-Gm-Message-State: ANoB5pl4tQYLdOzgGOM7riT5rtVjkqql9Bhf5t4fH/xUupvE2QFhntV3 nF1J0F3AXCg2Q1KeASCRArA= X-Google-Smtp-Source: AA0mqf6IjyboJZ6jHvu3/n4DRXc5eLPkqyyTrKmCyIGOMZdBBXCqqISeFKxKer+XfwJFwGKKf5xo4w== X-Received: by 2002:a63:e509:0:b0:474:4380:cca6 with SMTP id r9-20020a63e509000000b004744380cca6mr28115574pgh.229.1669658848596; Mon, 28 Nov 2022 10:07:28 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id k5-20020a170902c40500b00186ff402508sm9144185plk.281.2022.11.28.10.07.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Nov 2022 10:07:27 -0800 (PST) Message-ID: <486923d1-de21-4069-3aee-d9367fc4e5f9@gmail.com> Date: Mon, 28 Nov 2022 11:07:26 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v2] RISC-V: Avoid redundant sign-extension for SImode SGE, SGEU, SLE, SLEU Content-Language: en-US To: "Maciej W. Rozycki" Cc: Kito Cheng , GCC Patches , Andrew Waterman References: <904539a8-00ca-851c-b893-d6684d58df73@gmail.com> <85ca8410-376b-5de7-0cfd-c213d8ab0cbd@gmail.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 11/28/22 10:44, Maciej W. Rozycki wrote: > >> Your patch is probably still useful.  I think Kito's only concern was to make >> sure we don't have the ANDI instruction in addition to not having the SEXT >> instruction.  So still approved for trunk, just update the testcases to make >> sure we don't have the ANDI too. > > Given the false negatives how about getting a bit stricter and also > checking there's nothing following the XORI instruction, like here? > > It might be an overkill to have a check both for the sequence and for the > absence of ANDI or SEXT.W as well, but I'd rather have them both out of an > abundance of caution. Sure. That works for me as well. OK for the trunk. Interestingly enough Raphael and I are looking at a case where Roger's patch is causing poorer code generation. Given what we're finding as we work through the other case, I won't be surprised if we find multiple cases where RISC-V is generating poorer code after that patch, even though it's a perfectly sensible patch. jeff