From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id D15863858D28 for ; Tue, 11 Apr 2023 21:14:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D15863858D28 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-x1029.google.com with SMTP id jx2-20020a17090b46c200b002469a9ff94aso7560013pjb.3 for ; Tue, 11 Apr 2023 14:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681247645; x=1683839645; 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=E8bzj/d+TmWiMNL/bFQN0FWJk+VTM07dI1/5ZMJJVF0=; b=ms4Q+sSNk+BrvfL7QQXW7iBstfxxneJM9iGl15Ln29kgXciiDl5vSuTylhqbkc5juz OMx16cUfS4Rp9ciFOq5hXxQKSQeq5RsMXb0orkwJ/mBSJsjwI42iet4ogUY+9qEwCNdl gnmcyYPx0e/XgfcUpnKrNJMzg0gBsZLxNFJRBp4FhYI1HL8C7uorjmqION0FF84DlwZ7 oE/QUZd8eBYVdF08WexO6D7+wwHMVg+5oImxqCruHMuwbxuzCC914lyrieOjBSV55rJo az9A7zkwxvKe462vVbaJXXhNYeC06m8yX3+Gc16yzDAgqQPlaHAbptB0fxcN/klmXjX1 53Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681247645; x=1683839645; 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=E8bzj/d+TmWiMNL/bFQN0FWJk+VTM07dI1/5ZMJJVF0=; b=sk7N5BYRxiBSQzFRFI/nKAFClJRaS4/WsQqpDIQ3SXlX+zARhkrXsoq7P5CkCA999+ 8+nivV8HT/nMwEDEgycbrnwXPUCZCIZ5W3BDr9oNv5ZjwVtN5hNtLFcDi1imQm/hr/UR 5oUDsQLTqK7q8QD9edEspHVeY3/0+X/tdP+zkVB59KEbJEQdfV7eHabPSQSqAMtwpUEe 92rwRdu0qSJzsKbSW3Hvz66HWN5S7NWLaE9H2qC+Rnlva55X6CgPL1Hmk09SFA2ABB/O PTK4h8OUORasAxpOOSRZ7mGwjjFL7cQJy9TC/DX9pJcYOFmfPOBRBNhS7Gj4u+iKuFrq 0Kjg== X-Gm-Message-State: AAQBX9dgOvrcZGvHtPsPs2XmW8Q3G2DDRKQt5DsDVMEiJN8pgGyEgBHm Jn6AXrvuS/W6ugEB6SuWpWA= X-Google-Smtp-Source: AKy350ZupyBDDWrCh1d35DKUI9pv5mcjcROw0nLxVeF5w4zHMTFLwD1rhZpNfWk7wdTtN6RFeDAvjw== X-Received: by 2002:a05:6a20:b388:b0:ea:eb01:4f73 with SMTP id eg8-20020a056a20b38800b000eaeb014f73mr208977pzb.9.1681247644709; Tue, 11 Apr 2023 14:14:04 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id y2-20020a62b502000000b0063aed005623sm2128525pfe.154.2023.04.11.14.14.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Apr 2023 14:14:04 -0700 (PDT) Message-ID: Date: Tue, 11 Apr 2023 15:14:03 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] RISC-V: Fix PR108279 Content-Language: en-US To: Richard Biener , juzhe.zhong@rivai.ai Cc: gcc-patches , "kito.cheng" , palmer References: <20230327065907.155807-1-juzhe.zhong@rivai.ai> <7117f9e5-2a82-87d5-66e9-633d9f55cc2d@gmail.com> <127758663DFFBC5C+2023040306404192617341@rivai.ai> <7a8ef74e-6091-2ab9-7831-8fef2f8b8a63@gmail.com> <25FF0653055C8F40+2023040521531356688620@rivai.ai> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,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 4/11/23 02:55, Richard Biener wrote: > > Just to throw in a comment here - I think you should present LCM > with something it can identify as the same for compatible vsetvl and > then it should just work? OTOH if "compatible" is not transitive > that's not possible (but then I can't quickly make up an example > where it wouldn't be). I'm not sure it's that simple. Or at least not with a single iteration of LCM. One problem is that kills may affecting one setting, but not the other. I couldn't mentally come up with a single pass LCM to handle the case Juzhe was handling. ie, you may have two compatible settings where you can unify them and hoist the compatible setting to a less executed point. But the transp set for one of two compatible settings may be different for the other compatible setting because of vector instructions in a block. What was starting to form was a two pass approach. One which worked with individual vsetvl settings, another which worked on unified vsetvl settings. It wasn't clear to me which ordering would be better, but I didn't work through the likely scenarios -- it was clear this wasn't the time to introduce that kind of conceptual change. jeff