From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id E564C3858D28 for ; Mon, 19 Jun 2023 06:56:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E564C3858D28 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-ej1-x636.google.com with SMTP id a640c23a62f3a-983f499fc81so367852866b.3 for ; Sun, 18 Jun 2023 23:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687157779; x=1689749779; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:cc:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yXQnSha2nZylIDMbjKSF6mwz4PNgp3X1KmICQ0iRJGg=; b=GUEQmERoBCrdcMOZs6TlWYxUheVkaiNyE40eUh9hHn6E1clYwikyl8P2PHX967Fzks 5Q0TashL+/uUkZ6Wv/zi0QHXnabc3MMGXNJUNGq3AAQjuXc9iTWiEopWOUmZTVvzOsK7 YjEcd+oZqm1q+aafkFlYNyn+TWk5ZxKWb8YJ+XNWjMkO4ZzuWRItp4FqzJ/5ETFhNc/9 1ly7NGRWtED0UXomVZTO/btrmn0T2YaGHYrPMKUg6Bf0BYB1FXLj/iJdt3B6aVouKmaG NZRQDW3zAP/bgWFLrhDyXq107XyGzgZXUMmcH2kp81yf9i7TJGmkX7Uf0P3xcwaJO8Iq D9pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687157779; x=1689749779; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:cc:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yXQnSha2nZylIDMbjKSF6mwz4PNgp3X1KmICQ0iRJGg=; b=B2MvHI0YtVme5RuuKVPIYKMZAt8yIIjHW29GC1qRoCvmjOFt+MqGoV1U6S1z+dYw6W RssssRkoLAVztfTMyBcRz/SLCk2Jo8laL24RSlt5nGFGpaGnlP6D17F6yHjUSgU9JoDs EuZbtYAOFUVRptknRXT3U4/ZHWyh4FWqQrLd1AmBt/YxfKRJCINV5cJWqGxivtsiOPxV YSgW0LGn4LYUhenPB1PDwgh1CWRKUvw1GZvRB5TJUSkUA2tAwKUQOWfIlnFFlgq5UBkI zo1YVaqAThDismTlE4GjsMPUMYEy0Y3n3LkI7TPrzyA0/pkZWkYGv8EgWlscRoz/XN3L khew== X-Gm-Message-State: AC+VfDxIkCmzvTQ/sA5rlxpSg3CVDCAj0DHKL6zltCQ6OQGp6vaBV8jy KdtqNT5evbehdaWb7NdN29I= X-Google-Smtp-Source: ACHHUZ62p72wa7pDoA/Xbt1NewK8fqPEQY8DclkmWiky91rf0ezLFNVTp6bKpE+D/WQUYvb5HvJz7w== X-Received: by 2002:a17:907:3688:b0:96a:2acf:61e1 with SMTP id bi8-20020a170907368800b0096a2acf61e1mr6845991ejc.64.1687157779404; Sun, 18 Jun 2023 23:56:19 -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 gw23-20020a170906f15700b00988711405casm1917445ejb.144.2023.06.18.23.56.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Jun 2023 23:56:18 -0700 (PDT) Message-ID: <3c5cd2c6-8b65-6405-c8cf-b02b04c4cd88@gmail.com> Date: Mon, 19 Jun 2023 08:56:17 +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, "richard.sandiford" , rguenther Subject: Re: [PATCH V6] VECT: Support LEN_MASK_{LOAD,STORE} ifn && optabs To: =?UTF-8?B?6ZKf5bGF5ZOy?= , Jeff Law , gcc-patches References: <20230616102912.262207-1-juzhe.zhong@rivai.ai> <43e33266-e449-4ddf-4ea4-938dcd458665@gmail.com> Content-Language: en-US From: Robin Dapp In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 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,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: >>>If the pattern is not allowed to fail, then what code enforces the bias >>>argument's restrictions?  I don't see it in the generic expander code. > > I have no ideal since this is just copied from len_load/len_store which is  > s390 target dependent stuff.  > > I have sent V7 patch with fixing doc by following your suggestion. > We have: signed char internal_len_load_store_bias (internal_fn ifn, machine_mode mode) { optab optab = direct_internal_fn_optab (ifn); insn_code icode = direct_optab_handler (optab, mode); if (icode != CODE_FOR_nothing) { /* For now we only support biases of 0 or -1. Try both of them. */ if (insn_operand_matches (icode, 3, GEN_INT (0))) return 0; if (insn_operand_matches (icode, 3, GEN_INT (-1))) return -1; } return VECT_PARTIAL_BIAS_UNSUPPORTED; } This is used here: static bool vect_verify_loop_lens (loop_vec_info loop_vinfo) { [..] signed char partial_load_bias = internal_len_load_store_bias (IFN_LEN_LOAD, len_load_mode); signed char partial_store_bias = internal_len_load_store_bias (IFN_LEN_STORE, len_store_mode); gcc_assert (partial_load_bias == partial_store_bias); if (partial_load_bias == VECT_PARTIAL_BIAS_UNSUPPORTED) return false; /* If the backend requires a bias of -1 for LEN_LOAD, we must not emit len_loads with a length of zero. In order to avoid that we prohibit more than one loop length here. */ if (partial_load_bias == -1 && LOOP_VINFO_LENS (loop_vinfo).length () > 1) return false; Regards Robin