From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id BA6EE3858D35 for ; Thu, 22 Jun 2023 14:30:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BA6EE3858D35 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-wr1-x42f.google.com with SMTP id ffacd0b85a97d-311275efaf8so5704504f8f.3 for ; Thu, 22 Jun 2023 07:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687444251; x=1690036251; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ooGLxHoQjZor4sDUu71MSIEFIWPdx72HVHHsWjy91kc=; b=h7HnMIn9GW3xBacsueCEETH6TlxJGAXD4VDLOKeZfjiKrP528RocsPRljx4MdLRj/Y i1X9wXXrtyWxEXz+8B8cLHYkRGASCbpPgJrN8MS0MXBk3RI4HN0Z+lx7xSFy3izcrAws T9yTrU0naNMr4ohY+ea7GH+bKUI+c1cHkQNlkRsxXnROVfnqXBq5BatuFvmDmiHgxqxB XjCE6bJdhuFe0J01uUFkXGZ7dlgMGL807c1ONkJBB57GZ4CUwyh/eotXKYY0pdQ3w8eU hs3FrRF/zeCMcb+DF03XlhEvJdKLn8oMUwHbVPb6RYlleKRnnbWns0sOFHNaehPUYRL/ lpgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687444251; x=1690036251; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ooGLxHoQjZor4sDUu71MSIEFIWPdx72HVHHsWjy91kc=; b=CJXmqd9JkFS6vVoyxnsEj9PaSf+IzoMeSGurbFrEDBBPwlVSHMf24ysayFhXujMU47 EgBne+iGMM63VWckEe2y3ftBE/eB2cBGtfPnUqo3PXNepKQXw8C6MIGYPzmAUVH/+nRt zCxKQmfl1Ur4KTFWXMrx1wwURjnyZslOPbxt4vGA1Rkb+EYcuGWGJuT3OY45TW6sFjq0 p5+vY2sT4fyJoxK8n1Abls0tLkYNgd/33l+vESVl1ElWGHYGYjHY2L0t8+hBEQC3UKCC IhMhhRiONz4eZG9OBZ+c2m191bxZJf2wkXGkshExHnexJSDBmY/wA5308n8xg4QsJpO6 AJCA== X-Gm-Message-State: AC+VfDzzVm7QtiosuDSGdXnpMZnpgfmoOUQu3aOKDbc7utVKokRmTQz2 ITleuf4kPSo+lkNpa7Uitq4= X-Google-Smtp-Source: ACHHUZ4CAAijJPnBj26cDs/uL8MLv1jAEFYm+6yt3u4YVtdaUHbgb79FJIwGW1V5NpP/fFYq6y9Oaw== X-Received: by 2002:a5d:6e42:0:b0:306:31fb:1c3e with SMTP id j2-20020a5d6e42000000b0030631fb1c3emr12180503wrz.26.1687444250799; Thu, 22 Jun 2023 07:30:50 -0700 (PDT) Received: from [192.168.1.23] (ip-046-005-130-086.um12.pools.vodafone-ip.de. [46.5.130.86]) by smtp.gmail.com with ESMTPSA id y9-20020adfdf09000000b0031122bd3c82sm7243356wrl.17.2023.06.22.07.30.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Jun 2023 07:30:50 -0700 (PDT) Message-ID: <16623a5b-fd9f-eb58-59ec-3cda5a734a05@gmail.com> Date: Thu, 22 Jun 2023 16:30:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Cc: rdapp.gcc@gmail.com Subject: Re: [PATCH] RISC-V: Split VF iterators for Zvfh(min). Content-Language: en-US To: "Li, Pan2" , =?UTF-8?B?6ZKf5bGF5ZOy?= , gcc-patches , palmer , "kito.cheng" , Jeff Law References: <80468add-01ef-cdf3-f1a8-6f1e79b3cfba@gmail.com> <26991F7AECD6E2A5+2023062221250548897868@rivai.ai> From: Robin Dapp In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.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: > Just curious about the combine pass you mentioned, not very sure my > understand is correct but it looks like the combine pass totally > ignore the iterator requirement? > > It is sort of surprise to me as the combine pass may also need the > information of iterators. combine tries to match instructions (with fitting modes of course). It does not look at the insn constraints that reload/lra later can use to switch between alternatives depending on the register situation and other factors. We e.g. have an instruction (define_insn "bla" (set (match_operand:VF 1 "=vd") (match_operand:VF 2 "vr")) ... and implicitly [(set_attr "enabled" "true")] This instruction gets multiplexed via the VF iterator into (among others) (define_insn "bla" (set (match_operand:VNx4HF 1 "=vd") (match_operand:VNx4HF 2 "vr")) ... [(set_attr "enabled" "true")] When we set "enabled" to "false" via "fp_vector_disabled", we have: (define_insn "bla" (set (match_operand:VNx4HF 1 "=vd") (match_operand:VNx4HF 2 "vr")) ... [(set_attr "enabled" "false")] This means the only available alternative is disabled but the insn itself is still there, particularly for combine which does not look into the constraints. So in our case the iterator "allowed" the instruction (leading combine to think it is available) and we later masked it out with "enabled = false". Now we could argue that combine's behavior should change here and an insn without any alternatives is not actually available but that's not a battle I'm willing to fight :D Regards Robin