From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by sourceware.org (Postfix) with ESMTPS id 3816D3858D35 for ; Thu, 3 Aug 2023 14:32:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3816D3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7909307ecd1so35165639f.1 for ; Thu, 03 Aug 2023 07:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1691073119; x=1691677919; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=F7WH2tju1kCyCCQCvqOG9LHcKcGoTePxf9Sn7/Wl9+4=; b=iQIOXtST94VysMDP0kwovs4S6euwivCOBWCh1r1Kh9c3EZJnOIHxae7Q5MfipxezoK JbC7yRVtrZn1CVrKaZiWpOL7OpcEC0cyAOwGDh+qnOQxNGxkQYFxwokKckdCYkqwXTsh N633oRyMw4Dki7qrcvNzADEztU1m5ie7DTuDVFIBjQYhbT7ZH6EH++yHMnEQv7FQrzmv UN9V0OZWlTzKcGcsxrVCZnoHCi2NGKKIyKa8h5rvxguAO++sbi9I7T/2FBrkTWPLlQCM K60aKKF/+e0Aau9tV8fz6oatH5r/v+a56JX1v34WbHVmI3QhID+YK1fVVBVlptqFBfAE NTKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691073119; x=1691677919; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=F7WH2tju1kCyCCQCvqOG9LHcKcGoTePxf9Sn7/Wl9+4=; b=L/fra3jLgrNe3cnSk7QzWyB/tc8URgOWJ1ya40U7oG5SuvRn9n+HhdFNrHXNBD2bVe GSxdqL5FgYvadkQLSmEir5MoaJv4ZGfVWNLrkgPX5Mfu6cpSwE+b8VMKm/hcGXVooXa8 nwVR/CrQgPvpb7xs+ZHxBWeIw+MHvaZNt9CRGqHnXNKt+BV9X4tTEvJRH7GqMcCdaDRg W7X7gulTtbE5k1LuraJ2UaWygJ9gMUEzTbuwQ91+sgLBncP8Z9md2akeEAQAENWA33Rb Ano6MWqU7mNap0+csNZWsFRpBCsza8TadcqYhRgQwREay6W/ekEM3DQUmQCthGrtD8j1 pdkg== X-Gm-Message-State: ABy/qLY/OKn5fIwFarAdVEuI1go0zopha3cih1fjv5EfkEKbrGfg2UWt JxrpqmOCIogE5YI6m9DIqiOdE8FqrdBnxGaEZtk3G58r9i0xiC/PBFE= X-Google-Smtp-Source: APBJJlHWO2hSYgolXFboEC2NW+pm1GBLgqdNUmUb1H36EUEoItZZegKNSDhFWbo5hQqq4CLuzNk65+/q2NygGfchmsw= X-Received: by 2002:a92:c26c:0:b0:345:787a:cb1c with SMTP id h12-20020a92c26c000000b00345787acb1cmr18848030ild.6.1691073119372; Thu, 03 Aug 2023 07:31:59 -0700 (PDT) MIME-Version: 1.0 References: <112f5c53-4809-b71d-2296-dfaebde733cb@gmail.com> In-Reply-To: From: Kito Cheng Date: Thu, 3 Aug 2023 22:31:48 +0800 Message-ID: Subject: Re: [PATCH 3/5] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to 0 To: Jeff Law Cc: Robin Dapp , gcc-patches , "kito.cheng" , zengxiao , =?UTF-8?B?6ZKf5bGF5ZOy?= Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > > I am working on that, it seems the cost of vsetvli instruction become 0 > > due to this change, then loop invariant motion won't hoist vsetvli longer. > I haven't looked yet (generating baseline rvv.exp data right now). But > before I went to bed last night I was worried that a change snuck > through that shouldn't have (changing the toplevel INSN/SET cost > handling -- that wasn't supposed to be in the commit). I was too tired > to verify and correct without possibly mucking it up further. > > That'll be the first thing to look at. THe costing change was supposed > only affect if-then-else constructs, not sets in general. If so, I think the most simple fix is adding more checks on the set cost - only check the SET_SRC is if-then-else? Let me run the regression to see if that works - although the current vsetvli cost is too high (4x~5x), but I think it should be fixed later with a more complete expermantal.