From patchwork Mon Aug 14 18:34:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 135591 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp2929135vqi; Mon, 14 Aug 2023 11:36:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGc1Rb2WQwoVTj+cnRjzv8e7Oo+P/gjFPxJFyV/FujTBsdY05P+rEkYBL9n+/37LQmtnCUn X-Received: by 2002:a17:907:7819:b0:99c:ca27:c44c with SMTP id la25-20020a170907781900b0099cca27c44cmr7797127ejc.45.1692038205036; Mon, 14 Aug 2023 11:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692038205; cv=none; d=google.com; s=arc-20160816; b=i+nJdLd6SedbZj0hNZP9ZQoIooxrZp/u3b69ltzfoQf/YIVSPUqMlfD3gk3+zc5b6x B5drlAUGFUwBQEQZc44KlsJfuL4fZGAuSOmmYWV4LulYGe/HThAHQjsr9aHSBOJujOnO ILUPdHxndPmKgTvyJfNWyDa/GGEtbzzDXfR2c4evK3Mh52M9g+W/FfPW994dLiIIP/NU 2uBKCNi4ayfe3JS6ooS7DskGY1ygan3sjT4JzxEYij/T7bdpWvNBSOEgXeI0hoooUzjP hw0/jlDW2D66GO1aZur7ENQP/0ohwIRKXAKwXqlLqRNyF9OQhioM7nMLwT0QKejh3/iJ 9BWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=e9aX6k4BG2EDDEUEfciOdjgh4AIUrsDEerTQIIIYKZM=; fh=XxyM7Ym2GZuIk6CR9Av7X+K6FIjQnvqQn0ljduIMmhY=; b=OW/pp1A/Vbkq3+1rLjcipocU8acgykP3IBywb1EIAei1hSHI1TYVUYWlObUVVY2sev XCrNzPPXLcV9CzbQkeaHhNtLw9lLDP0mDWj3SQnM9giAWhKRzixYGNiV0oQFNdO0BOP3 txXQm7sNnKut5jG+hXhojJECSbEAxtVQj1H4kCCfMmzFf8eBNLCDh3rwbYBhbhPTYEXd T7Sj0iBE3cHwxYiOoPGGGudRHCyzsNWC1/g2174pvIFl+hn5L6ia2VXu0ma42s5SQGO8 GTBAVmmVcXUboIXv7551FbfoGce+zMUA7s+wl73eA61qR3YSeLOC63tI5XnJkQ+M/CyE IcgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=mrz3LLEF; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id si28-20020a170906cedc00b0099290e2c162si8127042ejb.444.2023.08.14.11.36.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 11:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=mrz3LLEF; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B857B385DC1C for ; Mon, 14 Aug 2023 18:35:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B857B385DC1C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692038135; bh=e9aX6k4BG2EDDEUEfciOdjgh4AIUrsDEerTQIIIYKZM=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=mrz3LLEFqYF7Op/e0CxtbTRoc7tKBGCd16rMfb//+EVcoy9GjpYLgnyuYJ33Nnbl4 gYNlnuESbyg0Kv5cHvZhgO+2BnE1wad6ZnirIq5pgpUmUI90hgHaaX0ig++nQ+vSI9 KZwPurQK7nMQ/Uwa+26ZrejzStfuHEuiuxs/FDpw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 062CD3858433 for ; Mon, 14 Aug 2023 18:34:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 062CD3858433 Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-6bcade59b24so3844990a34.0 for ; Mon, 14 Aug 2023 11:34:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692038086; x=1692642886; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e9aX6k4BG2EDDEUEfciOdjgh4AIUrsDEerTQIIIYKZM=; b=gwWVnLi5mNDFye0w12FG0mPpzzdQvvRLPE4uh3wr+THwvbPmD6vQHupSIarLAvdZJP diFzraXpZIaIsPdSBH2YvWSTPhWobw5J7N4i3IdFSEw9jWfqt3y4LUk3Ee0edbWzD/ap Ws/PzoxjN7Ax48qPfxFiLMSM73rK1SM9Q33wfXwSj9Owvfm0vUyRE8YaefwqzWne1zTJ GhgJewIXtDKUuTU0JPQfIf+BZ8u+Dl7Jed3oXqFx0+BohRX7/8Ru+7QVb/ORLFP8lE58 VKFjA15UNYp1x1Z29qD103EvA0vbRkeNDtgh0xfiyqdmhEtyXZ0zQc68lFCI8hBLdA1p 5fig== X-Gm-Message-State: AOJu0Yw2J/Ga19xoCjmPPlTRVXR0/MzZTud0nh8OUT98M1Jc73tlPFyU Vp0nKSCgW077N4uGaN9rah4yoDS8zz5fPFz6kptmjnbF X-Received: by 2002:a05:6870:8919:b0:1a9:caa1:9571 with SMTP id i25-20020a056870891900b001a9caa19571mr10888265oao.34.1692038085900; Mon, 14 Aug 2023 11:34:45 -0700 (PDT) Received: from localhost.localdomain ([139.178.84.207]) by smtp.gmail.com with ESMTPSA id l22-20020a056870e91600b001bec2a8f4e3sm5451968oan.14.2023.08.14.11.34.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 11:34:45 -0700 (PDT) To: gcc-patches@gcc.gnu.org, Kyrylo.Tkachov@arm.com, richard.earnshaw@arm.com, richard.sandiford@arm.com Cc: Christophe Lyon Subject: [PATCH 6/9] arm: [MVE intrinsics] add support for U and p formats in parse_element_type Date: Mon, 14 Aug 2023 18:34:19 +0000 Message-Id: <20230814183422.1905511-6-christophe.lyon@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230814183422.1905511-1-christophe.lyon@linaro.org> References: <20230814183422.1905511-1-christophe.lyon@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Christophe Lyon via Gcc-patches From: Christophe Lyon Reply-To: Christophe Lyon Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774230653024341685 X-GMAIL-MSGID: 1774230653024341685 Introduce these two format specifiers to define the shape of vmull[bt]q_poly intrinsics. 'U' is used to define a double-width unsigned 'p' is used to define an element of 'poly' type. 2023-08-14 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (parse_element_type): Add support for 'U' and 'p' format specifiers. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index c8eb3351ef2..761da4d8ece 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -61,10 +61,12 @@ apply_predication (const function_instance &instance, tree return_type, [01] - the element type in type suffix 0 or 1 of INSTANCE. h - a half-sized version of + p - a poly type with the same width as s - a signed type with the given number of bits s[01] - a signed type with the same width as type suffix 0 or 1 u - an unsigned type with the given number of bits u[01] - an unsigned type with the same width as type suffix 0 or 1 + U - an unsigned type with the double width as w - a double-sized version of x - a type with the given number of bits and same signedness as the next argument. @@ -102,6 +104,20 @@ parse_element_type (const function_instance &instance, const char *&format) type_suffixes[suffix].element_bits * 2); } + if (ch == 'U') + { + type_suffix_index suffix = parse_element_type (instance, format); + return find_type_suffix (TYPE_unsigned, + type_suffixes[suffix].element_bits * 2); + } + + if (ch == 'p') + { + type_suffix_index suffix = parse_element_type (instance, format); + return find_type_suffix (TYPE_poly, + type_suffixes[suffix].element_bits); + } + if (ch == 'x') { const char *next = format;