From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 70F0D3858D35 for ; Sat, 24 Jun 2023 16:38:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 70F0D3858D35 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-pf1-x42d.google.com with SMTP id d2e1a72fcca58-66f5faba829so104418b3a.3 for ; Sat, 24 Jun 2023 09:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687624712; x=1690216712; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=mYDFYXtjN6AsSMGOsTPZYCCMDCriUFzZlWpYYZ+dj1M=; b=R2j/6THit5hXulYAZ3URF1mI5rlBFI2EZI+l0b1WHAGpWnPMar6HeIpFWI2GLyACfq mYhAvpe8piI/dFlajquUq03v4LIyf+uaVXO5CaPydeaeff8MUEztK1DuA1rlVIIyUeBK CI4R/Xmxbb2+CHmXy9EfguKewrRCk4Y50cMHdD2/J0dF/deWKIWAryr2mfCpF4KmggTT 554S8w3t3FJZ73mk+bV0oeSmhRIrDJEhDcjiGqkgw48pXoSBJ2ZeBL5/G9IYpJnz2G3w DzQxjY0Bpx4/PdEWIn8t7RWEtw6CJi2jA/5NdjsqbRACpXQRoOcEHsZ5S+KdEEQPlRpl WdTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687624712; x=1690216712; h=content-transfer-encoding:in-reply-to:from:references: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=mYDFYXtjN6AsSMGOsTPZYCCMDCriUFzZlWpYYZ+dj1M=; b=NoInXz1b0DOQK1RdIIHX2pI7BKBkRoGoMExGUsq8rK3CklnD7qMdKjWbTVFsD5RfT2 yx+RobQSCwzZFyeVwx23nsVgRRwKPzgVBLLWJb0lLzcHX4KaahZKHDf7Zl9N77wix5Fk KC6FTY+ks54ewxDhu2H24uJrJz1u5urUd//eRTvpoDlr9VhV4Skp/MvlwYOjYuMc4655 4bo8PAxqpEt7Nu31Z/xHyCA9JGx8RQ1FbVIDSNCzkrUmDjRlh8HgdEbExmny+q+A/iob a55AeLkHDiiA+11mNcqePfKxIe6kNuaNKdZZo0LBao64t8jm0VREcU0vrHUadICpcVI/ 5EUg== X-Gm-Message-State: AC+VfDwUgNw4docdaPCk1upNmnNK//VobLF7djEHBpz0TcqwHZu0T4Vt bpQe+lfgpCPCokhOHYEeMQ0= X-Google-Smtp-Source: ACHHUZ7XrzE8mCgdfJ5fnk9SdwbnChwjIhX0XroVjVcHiBKt4vsP7nNd61CYd6c4V/XfqJvJ/9zE2w== X-Received: by 2002:aa7:8894:0:b0:653:609:7e2b with SMTP id z20-20020aa78894000000b0065306097e2bmr23910039pfe.2.1687624712180; Sat, 24 Jun 2023 09:38:32 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id 34-20020a631662000000b005572d796b9esm1449043pgw.88.2023.06.24.09.38.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Jun 2023 09:38:31 -0700 (PDT) Message-ID: Date: Sat, 24 Jun 2023 10:38:30 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] RISC-V: Split VF iterators for Zvfh(min). Content-Language: en-US To: Robin Dapp , gcc-patches , palmer , Kito Cheng , "juzhe.zhong@rivai.ai" , "Li, Pan2" References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_MANYTO,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 6/22/23 07:03, Robin Dapp wrote: > Hi, > > when working on FP widening/narrowing I realized the Zvfhmin handling > is not ideal right now: We use the "enabled" insn attribute to disable > instructions not available with Zvfhmin (but only with Zvfh). > > However, "enabled == 0" only disables insn alternatives, in our case all > of them when the mode is a HFmode. The insn itself remains available > (e.g. for combine to match) and we end up with an insn without alternatives > that reload cannot handle --> ICE. > > The proper solution is to disable the instruction for the respective > mode altogether. This patch achieves this by splitting the VF as well > as VWEXTF iterators into variants with TARGET_ZVFH and > TARGET_VECTOR_ELEN_FP_16 (which is true when either TARGET_ZVFH or > TARGET_ZVFHMIN are true). Also, VWCONVERTI, VHF and VHF_LMUL1 need > adjustments. > > Regards > Robin > > gcc/ChangeLog: > > * config/riscv/autovec.md: VF_AUTO -> VF. > * config/riscv/vector-iterators.md: Introduce VF_ZVFHMIN, > VWEXTF_ZVFHMIN and use TARGET_ZVFH in VWCONVERTI, VHF and > VHF_LMUL1. > * config/riscv/vector.md: Use new iterators. OK for the trunk. Thanks for walking everyone through the issues here. jeff