From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 2943A385B536 for ; Mon, 28 Nov 2022 14:50:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2943A385B536 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-pj1-x1030.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so3318989pje.5 for ; Mon, 28 Nov 2022 06:50:37 -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:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Vgz0MT43cVBYMdtIHLYufP8aKMSjDGGt//dnj9jAisM=; b=JJWWJ3DYmFvDm4OQJAEKbjN7DV3rAhjOKMhuGPV9DDDmFGGBHdcZZemK52j3/P4nEn T5N5WZc+hHZUQ37Y5ijelzOavLvBa08lmq7AAQ60EkK1qj5TrlpjKVloefGgM5c9QljQ KvfUNtNp9EmjDh4/zFGR8pej/2iQKdiglyuXRMfV9MSN616ofNplO3tZ2eBHaNmSxUsz KHLrYTdMDfPb1CvFoEkb/AXEzu+7UAgY/AUvoN1iuZJZmb32wy8fjIEOnAWO0cpc/27v o1041339Kf1HS00/pV6kivPmnxGUiq0s8qdvcw3ldUOoc5V/tLGF+MNhhbXcmoCzau7Z /0Lg== 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:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Vgz0MT43cVBYMdtIHLYufP8aKMSjDGGt//dnj9jAisM=; b=AZ/NG4ynuxA7isJr8sll33xs1SwUfr74y7Al5miUSptjraEWKE/Tj7s++Tvvo0Wtc1 G5D80iGRfZcYItwbbKtHlaFtZgrTq1LSFPSt4HMkXYyj0bFxYPCPipkzNp0eAAJL4il4 JZC7QL2rx2NFwaTGSdq+3xjHtAajQ537PfGHS6zudOEGVSEhKVzGx4DF6A+1cJxBNV5K Zk0pJ95Y1WpDtGDfLa2S4gPyrmxXP1KJJS156ZqudlYXSTPRJKxlaRL6pGPz9LsUhzez v8sJX3RTEHJcA2tvh+1rRrm7BZXNjI/EWNNDWOzx42OR3fyOrCkpAklkkxlWeiB7C6z8 qHBw== X-Gm-Message-State: ANoB5pkqh5t5ynQpZ6wHk9Wt9e8dxckOB/ekYM/KRABtQMUnDYiXX8qe PeLpyyMt55d6vdU6p90td5w= X-Google-Smtp-Source: AA0mqf7dQHIB05Aza7xQinVEETWqmeDWw4+nA68O5Pad4V3zer2ySSk0tcI/3y0paUIIG1BEY+i12A== X-Received: by 2002:a17:902:ab89:b0:185:3659:1ce9 with SMTP id f9-20020a170902ab8900b0018536591ce9mr30900129plr.26.1669647035613; Mon, 28 Nov 2022 06:50:35 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id o15-20020a17090a3d4f00b002193db6f18dsm1545480pjf.13.2022.11.28.06.50.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Nov 2022 06:50:35 -0800 (PST) Message-ID: <904539a8-00ca-851c-b893-d6684d58df73@gmail.com> Date: Mon, 28 Nov 2022 07:50:33 -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: [PING][PATCH] RISC-V: Avoid redundant sign-extension for SImode SGE, SGEU, SLE, SLEU To: "Maciej W. Rozycki" , Kito Cheng Cc: GCC Patches , Andrew Waterman References: Content-Language: en-US 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/25/22 07:07, Maciej W. Rozycki wrote: > Hi Kito, > > On Fri, 12 Aug 2022, Maciej W. Rozycki wrote: > >>> LGTM, but with a nit, I don't get set.w but get an andi like below, so >>> maybe we should also scan-assembler-not andi? feel free to commit that >>> directly with that fix >>> >>> ```asm >>> sleu: >>> sgtu a0,a0,a1 # 9 [c=4 l=4] *sgtu_disi >>> xori a0,a0,1 # 10 [c=4 l=4] *xorsi3_internal/1 >>> andi a0,a0,1 # 16 [c=4 l=4] anddi3/1 >>> ret # 25 [c=0 l=4] simple_return >>> ``` >> Interesting. I can do that, but can you please share the compilation >> options, given or defaulted (from `--with...' configuration options), this >> happens with? > I have noticed it went nowhere. Can you please check what compilation > options lead to this discrepancy so that we can have the fix included in > GCC 13? I'd like to understand what's going on here. FWIW, I don't see the redundant sign extension with this testcase at -O2 on the trunk.  Is it possible the patch has been made redundant over the last few months? Jeff