From patchwork Wed Nov 8 15:12:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 118274 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5410325qgn; Wed, 8 Nov 2017 07:12:50 -0800 (PST) X-Google-Smtp-Source: ABhQp+TGVJD1sTz0XhfqAw4mh26RQgNv3HXnh+yWwmk3Iw7e9yF90rJibZl9SqWoPY0P6f37GnVl X-Received: by 10.99.147.69 with SMTP id w5mr750993pgm.401.1510153970535; Wed, 08 Nov 2017 07:12:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510153970; cv=none; d=google.com; s=arc-20160816; b=xFpI4ZuUCB/LNTSqlkvSzBu3Oftto30hwM613Qq9efA5ladI7T7UKEg5SkoxhTqVTf pbXHi3hSTyvOrSpVn3zlDM8NmHZsbZkX6R+AXXydBbPTWWynPT0XUwgmsSsy2/eI9NbS u3z3vfgebl1B+EUxWTe84iDAzzfT+vY/MzEBC66t/7TsGLKgeZOaB1GZsJtxQTcNU/CC MD44ZQXr/a2YhmImN8l8m0eO4fIrsew6Qw9GnK5/1aZ5k4DTSkUk0zyp8YxKqSTCdpJd uWkcrTzbLedQNZMBlkWy776UVpG5+X+WiTpQiuEw5z5gP3woPMKnBNiZqk2OeLuGmQYz mzcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:mail-followup-to:to:from:delivered-to:sender:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=aeF3/GfiAPPIulitVdp7JWfQSudNMp5+SgLvJa1IJok=; b=RMEk7edPCvIMWNbpCseivnIssCzsLygwxiqLUpd7NoR6R4ZCqrdZufYtYNl6H0EDE4 raTCfcZZMXo0Vbo/gxTGlEvFzkojRU7Oc2RE2SQLEqUDE148tBfwRqxuYoZeE593WC8n gogsR2DEafHvNoEqGK2qrYUMleHWu2f9P7iBu5cxdafGuzCrPelV6Bbarw1L395TcbjL 0d3/JFwUYGPw5mKQ1jFlZjrpWxJaYVJJnbBrPh2dSs9fMvKguWLBndPqNrNm4BQhtXYE rYnwA7coUwDp3khUjQ46MSxJUtyQk2mDvp7D9u1yCU04D1Z8igF4LLL7OwcuEWl0WIo9 NdsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=uLQoaPB4; spf=pass (google.com: domain of gcc-patches-return-466252-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-466252-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id r85si4400773pfl.178.2017.11.08.07.12.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Nov 2017 07:12:50 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-466252-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=uLQoaPB4; spf=pass (google.com: domain of gcc-patches-return-466252-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-466252-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=AVJSfgIK5K1HmISS WLxnrM03iH8O/X/8jK6UGVkBBo5G0mZZat0GvSHnb24kLeHvNaAR688ZW458hizb PDcIAUtQCCbM3kaG81T5AG6+vwk7qX3/xKebgfMYb2MkbawH4Tt6Fw7HfFxlCIf0 LDCewphNXj9GzTv+/EDDPSc8Mko= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=QoW03lckE4/fKbM6OfI2Mw CoAvM=; b=uLQoaPB4NzN/pUBcWFOR1RsMlDGb4umKiKd2YTkcz45scdKw4jB/oe xRwOm7RZJPZJmh+8tKGJ0l+5Tm4834GXDYE/p3yPD3///awJtLc2QnK7qWvWsTei 6UlmwRrLN1Ywi0VT8tOExu8pXbe5SQ53OBV5sJtpgcxLlWBqkHm2w= Received: (qmail 75478 invoked by alias); 8 Nov 2017 15:12:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 75442 invoked by uid 89); 8 Nov 2017 15:12:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-9.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_BLACK autolearn=ham version=3.3.2 spammy=6023 X-HELO: mail-wm0-f46.google.com Received: from mail-wm0-f46.google.com (HELO mail-wm0-f46.google.com) (74.125.82.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Nov 2017 15:12:30 +0000 Received: by mail-wm0-f46.google.com with SMTP id r196so11516741wmf.2 for ; Wed, 08 Nov 2017 07:12:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version; bh=aeF3/GfiAPPIulitVdp7JWfQSudNMp5+SgLvJa1IJok=; b=BCcYnKp/kXNadUoFAjubxYWpJnCIBtC+sPt3SsSHUU5MuY7J1sLzSEve2st+d7SMrS MGiJun/ToiDCFwlcOpLQUob/bpR0mJHpQYeLzbSrzD7RYEaTKI2RXHZLPZWtqc/SSm1H KU0alLMm340OHli5ORba9vR34dqk6UdqSUPVdVT6jF/BmxTnCmPDipQaIfMthnwsm7cj TUGcgvjVjfyxC93wyjK0C9POVp8S0Vq4JrpKvecPWDmpBhKaytRNXPmGc/NB8pVFyYS3 sandtXsnARXni/rd0nTkNgeJx72E6XlmznczPM0PUuxWNh03nAiL6aBgncZEEdeADAZE uLUA== X-Gm-Message-State: AJaThX6O9/GFNH7LPeNlKa+JZjgTBlfPdTkF4Afp0ZAgvj7oh3Wb4fQv QuXFcxakM2J7OGizNWcwtqQFTg== X-Received: by 10.28.229.149 with SMTP id c143mr628307wmh.156.1510153948187; Wed, 08 Nov 2017 07:12:28 -0800 (PST) Received: from localhost (94.197.121.218.threembb.co.uk. [94.197.121.218]) by smtp.gmail.com with ESMTPSA id u18sm6071526wrg.94.2017.11.08.07.12.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Nov 2017 07:12:27 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.earnshaw@arm.com, james.greenhalgh@arm.com, marcus.shawcroft@arm.com, richard.sandiford@linaro.org Cc: richard.earnshaw@arm.com, james.greenhalgh@arm.com, marcus.shawcroft@arm.com Subject: [1/4] Give the target more control over ARRAY_TYPE modes References: <87375oyfen.fsf@linaro.org> Date: Wed, 08 Nov 2017 15:12:23 +0000 In-Reply-To: <87375oyfen.fsf@linaro.org> (Richard Sandiford's message of "Wed, 08 Nov 2017 15:10:56 +0000") Message-ID: <87y3ngx0rs.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 So far we've used integer modes for LD[234] and ST[234] arrays. That doesn't scale well to SVE, since the sizes aren't fixed at compile time (and even if they were, we wouldn't want integers to be so wide). This patch lets the target use double-, triple- and quadruple-length vectors instead. 2017-11-08 Richard Sandiford Alan Hayward David Sherwood gcc/ * target.def (array_mode): New target hook. * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook. * doc/tm.texi: Regenerate. * hooks.h (hook_optmode_mode_uhwi_none): Declare. * hooks.c (hook_optmode_mode_uhwi_none): New function. * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use targetm.array_mode. * stor-layout.c (mode_for_array): Likewise. Support polynomial type sizes. Index: gcc/target.def =================================================================== --- gcc/target.def 2017-11-08 15:05:33.783582091 +0000 +++ gcc/target.def 2017-11-08 15:06:16.086850270 +0000 @@ -3400,6 +3400,22 @@ the vector element type.", HOST_WIDE_INT, (const_tree type), default_vector_alignment) +DEFHOOK +(array_mode, + "Return the mode that GCC should use for an array that has\n\ +@var{nelems} elements, with each element having mode @var{mode}.\n\ +Return no mode if the target has no special requirements. In the\n\ +latter case, GCC looks for an integer mode of the appropriate size\n\ +if available and uses BLKmode otherwise. Usually the search for the\n\ +integer mode is limited to @code{MAX_FIXED_MODE_SIZE}, but the\n\ +@code{TARGET_ARRAY_MODE_SUPPORTED_P} hook allows a larger mode to be\n\ +used in specific cases.\n\ +\n\ +The main use of this hook is to specify that an array of vectors should\n\ +also have a vector mode. The default implementation returns no mode.", + opt_machine_mode, (machine_mode mode, unsigned HOST_WIDE_INT nelems), + hook_optmode_mode_uhwi_none) + /* True if we should try to use a scalar mode to represent an array, overriding the usual MAX_FIXED_MODE limit. */ DEFHOOK Index: gcc/doc/tm.texi.in =================================================================== --- gcc/doc/tm.texi.in 2017-11-08 15:05:32.663824754 +0000 +++ gcc/doc/tm.texi.in 2017-11-08 15:06:16.085850270 +0000 @@ -3322,6 +3322,8 @@ stack. @hook TARGET_VECTOR_MODE_SUPPORTED_P +@hook TARGET_ARRAY_MODE + @hook TARGET_ARRAY_MODE_SUPPORTED_P @hook TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P Index: gcc/doc/tm.texi =================================================================== --- gcc/doc/tm.texi 2017-11-08 15:05:33.777173014 +0000 +++ gcc/doc/tm.texi 2017-11-08 15:06:16.084850270 +0000 @@ -4243,6 +4243,20 @@ insns involving vector mode @var{mode}. must have move patterns for this mode. @end deftypefn +@deftypefn {Target Hook} opt_machine_mode TARGET_ARRAY_MODE (machine_mode @var{mode}, unsigned HOST_WIDE_INT @var{nelems}) +Return the mode that GCC should use for an array that has +@var{nelems} elements, with each element having mode @var{mode}. +Return no mode if the target has no special requirements. In the +latter case, GCC looks for an integer mode of the appropriate size +if available and uses BLKmode otherwise. Usually the search for the +integer mode is limited to @code{MAX_FIXED_MODE_SIZE}, but the +@code{TARGET_ARRAY_MODE_SUPPORTED_P} hook allows a larger mode to be +used in specific cases. + +The main use of this hook is to specify that an array of vectors should +also have a vector mode. The default implementation returns no mode. +@end deftypefn + @deftypefn {Target Hook} bool TARGET_ARRAY_MODE_SUPPORTED_P (machine_mode @var{mode}, unsigned HOST_WIDE_INT @var{nelems}) Return true if GCC should try to use a scalar mode to store an array of @var{nelems} elements, given that each element has mode @var{mode}. Index: gcc/hooks.h =================================================================== --- gcc/hooks.h 2017-11-08 15:05:32.622623544 +0000 +++ gcc/hooks.h 2017-11-08 15:06:16.085850270 +0000 @@ -124,4 +124,7 @@ extern const char *hook_constcharptr_con extern const char *hook_constcharptr_const_tree_const_tree_null (const_tree, const_tree); extern const char *hook_constcharptr_int_const_tree_null (int, const_tree); extern const char *hook_constcharptr_int_const_tree_const_tree_null (int, const_tree, const_tree); + +extern opt_machine_mode hook_optmode_mode_uhwi_none (machine_mode, + unsigned HOST_WIDE_INT); #endif Index: gcc/hooks.c =================================================================== --- gcc/hooks.c 2017-11-08 15:05:32.622623544 +0000 +++ gcc/hooks.c 2017-11-08 15:06:16.085850270 +0000 @@ -525,3 +525,11 @@ hook_bool_mode_reg_class_t_reg_class_t_f return false; } +/* Generic hook that takes a mode and an unsigned HOST_WIDE_INT and + returns no mode. */ + +opt_machine_mode +hook_optmode_mode_uhwi_none (machine_mode, unsigned HOST_WIDE_INT) +{ + return opt_machine_mode (); +} Index: gcc/tree-vect-data-refs.c =================================================================== --- gcc/tree-vect-data-refs.c 2017-11-08 15:05:36.346297369 +0000 +++ gcc/tree-vect-data-refs.c 2017-11-08 15:06:16.087850270 +0000 @@ -60,20 +60,23 @@ Software Foundation; either version 3, o vect_lanes_optab_supported_p (const char *name, convert_optab optab, tree vectype, unsigned HOST_WIDE_INT count) { - machine_mode mode; - scalar_int_mode array_mode; + machine_mode mode, array_mode; bool limit_p; mode = TYPE_MODE (vectype); - limit_p = !targetm.array_mode_supported_p (mode, count); - if (!int_mode_for_size (count * GET_MODE_BITSIZE (mode), - limit_p).exists (&array_mode)) + if (!targetm.array_mode (mode, count).exists (&array_mode)) { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "no array mode for %s[" HOST_WIDE_INT_PRINT_DEC "]\n", - GET_MODE_NAME (mode), count); - return false; + poly_uint64 bits = count * GET_MODE_BITSIZE (mode); + limit_p = !targetm.array_mode_supported_p (mode, count); + if (!int_mode_for_size (bits, limit_p).exists (&array_mode)) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "no array mode for %s[" + HOST_WIDE_INT_PRINT_DEC "]\n", + GET_MODE_NAME (mode), count); + return false; + } } if (convert_optab_handler (optab, array_mode, mode) == CODE_FOR_nothing) Index: gcc/stor-layout.c =================================================================== --- gcc/stor-layout.c 2017-11-08 15:05:36.974386931 +0000 +++ gcc/stor-layout.c 2017-11-08 15:06:16.086850270 +0000 @@ -545,7 +545,8 @@ get_mode_alignment (machine_mode mode) mode_for_array (tree elem_type, tree size) { tree elem_size; - unsigned HOST_WIDE_INT int_size, int_elem_size; + poly_uint64 int_size, int_elem_size; + unsigned HOST_WIDE_INT num_elems; bool limit_p; /* One-element arrays get the component type's mode. */ @@ -554,14 +555,16 @@ mode_for_array (tree elem_type, tree siz return TYPE_MODE (elem_type); limit_p = true; - if (tree_fits_uhwi_p (size) && tree_fits_uhwi_p (elem_size)) + if (poly_int_tree_p (size, &int_size) + && poly_int_tree_p (elem_size, &int_elem_size) + && may_ne (int_elem_size, 0U) + && constant_multiple_p (int_size, int_elem_size, &num_elems)) { - int_size = tree_to_uhwi (size); - int_elem_size = tree_to_uhwi (elem_size); - if (int_elem_size > 0 - && int_size % int_elem_size == 0 - && targetm.array_mode_supported_p (TYPE_MODE (elem_type), - int_size / int_elem_size)) + machine_mode elem_mode = TYPE_MODE (elem_type); + machine_mode mode; + if (targetm.array_mode (elem_mode, num_elems).exists (&mode)) + return mode; + if (targetm.array_mode_supported_p (elem_mode, num_elems)) limit_p = false; } return mode_for_size_tree (size, MODE_INT, limit_p).else_blk (); From patchwork Wed Nov 8 15:13:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 118275 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5411815qgn; Wed, 8 Nov 2017 07:14:05 -0800 (PST) X-Google-Smtp-Source: ABhQp+SdMd9fTcwVMZpUmxOUS30AtWkYBO9Qw0PAE9QzojA1vIftfKoVb1q4TP8fQ/XdzepLtVWV X-Received: by 10.84.224.132 with SMTP id s4mr723921plj.409.1510154045910; Wed, 08 Nov 2017 07:14:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510154045; cv=none; d=google.com; s=arc-20160816; b=mkeV9bvsXLVGVNTgfciBLZsgWe6vq+8s7FavZ89zA9QKkgTPo/anRzqEJazg9PTXhe neLTVqmYNyhNe4wV6fyRBABbBeqYekInknVNIPjYQ3lFwwYLqTrl6bKRFXypilFJZ+8+ Okt+RFWIqTa4Op/hCqdcjSDLCebodFY4sSD+Tjh+mZirpPzPbR+xVqcaVr/UYaJYYLIS W2JFLBO8cUTld5mwb5PJryHKzm5BQHOZJCVhO5B06fDxzLr9yxCRmUZwe4K2JQjHPVJX LrLmDiL/xSZTwxDbwOypB/QUAsraTx/hfKqB0QUB9IoTP/u7B5+Rj+Q/TiU3YsXr5/kG oEPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:mail-followup-to:to:from:delivered-to:sender:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=acyQeWYYtgz0tKJtEVpBru9ER0Qij/QMQZzsj/KvIII=; b=cmxUM1V3hnIUeL4ijcC5j6VZwdu3j3m+AdFduk/aSoDSrC8UeLVMOf6Ec/1LlslVZn Lk4MiTRNZmvbzUtn8EnUGDIMJ7Sj4Euvt556wxhSvP5avLT+/V1Oumcne3UygBb1mSnM AqOXirTqNlfP3aD0itkPTkk/LohilmyWFwGhGZtFYuS9hh2slEMDkXyOQyFf+Oxt6r2e vNAKqWWiqC0Ttt+R28idlIu3rAN9kUNba/Vy/hNYnWKuhV6c35P7N07i78j9QccllLli 1y/LEh84cfd+kjX+9vHYrBOktGRpYOOhMpO4Fk9HqblBVytsVpQSuc7dsuf77s8B/XgS f1RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=pL802eYD; spf=pass (google.com: domain of gcc-patches-return-466254-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-466254-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id u3si4083526plb.171.2017.11.08.07.14.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Nov 2017 07:14:05 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-466254-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=pL802eYD; spf=pass (google.com: domain of gcc-patches-return-466254-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-466254-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=h22DByiCehg6jh19 5o6QiCyHpknvHTb6d9WI6sizbFtdUKPt/nlx5edL1mqAk6XLvIwv6jDqkyqOUSFh oukdzkeQBIU3MezzcZW9vk7fNFLDVfbbvLYCstjbdhjyYHWEQvKTHcd7FIjKn7P8 HXQKdTvHsLVVV1DTW4wHX0MwD80= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=q39TKm2ho3k21s55Prjfyi mAWB8=; b=pL802eYDEBa6UX1h873sMiV4cx51Xql9RtgamhDD6+BOIdBQ7uGE7U 54hh4fTcKJcbY2Z56bcLgMekjy6Ob5dioo6zht9xqBk0QDFKZyQnVLqtTDQR5wZA iHKLupVsPK179LtP+nddacCPTITtX72AC/08Bmj5BvCKKAAaAWOAs= Received: (qmail 78858 invoked by alias); 8 Nov 2017 15:13:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 78839 invoked by uid 89); 8 Nov 2017 15:13:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=ufc, pieces X-HELO: mail-wr0-f182.google.com Received: from mail-wr0-f182.google.com (HELO mail-wr0-f182.google.com) (209.85.128.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Nov 2017 15:13:38 +0000 Received: by mail-wr0-f182.google.com with SMTP id u40so2718711wrf.10 for ; Wed, 08 Nov 2017 07:13:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version; bh=acyQeWYYtgz0tKJtEVpBru9ER0Qij/QMQZzsj/KvIII=; b=UXAdXTpOOv6ZfUUWEXnrink4A893VdrInBU2iMglcm8eU10qN4F92/Q4/3YN3UElxX FRwy98gFNKWZqqqdEbFxsFFb7dADalXtEqFTQnDptqg0kTEjKp2dfZcHfg3Wn0/mBGeD JjJA1cAdrkTzVBojBN8xE+C1E63ZcDx/UQHxBYfKfPNrpCjC4LRJrrYbpUac9e6akDio G8Yd+x0TBeNu29p6t/HDuz+w0zEOt6T6XwhsjGULq046/BVXQW8pPrIjTVfINBISW9sa iAc6/Ddr945CKdDFTCQ+QW++00RF03bk/13TLpY0J2X5sSpNaToahvqLlN/moovvQH9B sP6A== X-Gm-Message-State: AJaThX4VUCvUAbmvRnNmp1QGdwtSOsuG0cBiftJy7IZkeSwxk1Zy0faO O9znYfPwjJrIMi9wtW6zF4XW+Kbu7ew= X-Received: by 10.223.139.149 with SMTP id o21mr743523wra.87.1510154016249; Wed, 08 Nov 2017 07:13:36 -0800 (PST) Received: from localhost (94.197.121.218.threembb.co.uk. [94.197.121.218]) by smtp.gmail.com with ESMTPSA id b23sm4636645wrg.37.2017.11.08.07.13.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Nov 2017 07:13:35 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.earnshaw@arm.com, james.greenhalgh@arm.com, marcus.shawcroft@arm.com, richard.sandiford@linaro.org Cc: richard.earnshaw@arm.com, james.greenhalgh@arm.com, marcus.shawcroft@arm.com Subject: [2/4] [AArch64] SVE load/store_lanes support References: <87375oyfen.fsf@linaro.org> Date: Wed, 08 Nov 2017 15:13:20 +0000 In-Reply-To: <87375oyfen.fsf@linaro.org> (Richard Sandiford's message of "Wed, 08 Nov 2017 15:10:56 +0000") Message-ID: <87shdox0q7.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 This patch adds support for SVE LD[234], ST[234] and associated structure modes. Unlike Advanced SIMD, these modes are extra-long vector modes instead of integer modes. 2017-11-08 Richard Sandiford Alan Hayward David Sherwood gcc/ * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector modes for SVE. * config/aarch64/aarch64-protos.h (aarch64_sve_struct_memory_operand_p): Declare. * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator. (vector_count, insn_length, VSINGLE, vsingle): New mode attributes. (VPRED, vpred): Handle SVE structure modes. * config/aarch64/constraints.md (Utx): New constraint. * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand) (aarch64_sve_struct_nonimmediate_operand): New predicates. * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs. * config/aarch64/aarch64-sve.md (mov, *aarch64_sve_mov_le) (*aarch64_sve_mov_be, pred_mov): New patterns for structure modes. Split into pieces after RA. (vec_load_lanes, vec_mask_load_lanes) (vec_store_lanes, vec_mask_store_lanes): New patterns. * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle SVE structure modes. (aarch64_classify_address): Likewise. (sizetochar): Move earlier in file. (aarch64_print_operand): Handle SVE register lists. (aarch64_array_mode): New function. (aarch64_sve_struct_memory_operand_p): Likewise. (TARGET_ARRAY_MODE): Redefine. Index: gcc/config/aarch64/aarch64-modes.def =================================================================== --- gcc/config/aarch64/aarch64-modes.def 2017-11-08 15:05:50.202852894 +0000 +++ gcc/config/aarch64/aarch64-modes.def 2017-11-08 15:06:19.687849905 +0000 @@ -87,6 +87,9 @@ INT_MODE (XI, 64); /* Give SVE vectors the names normally used for 256-bit vectors. The actual number depends on command-line flags. */ SVE_MODES (1, V32, V16, V8, V4) +SVE_MODES (2, V64, V32, V16, V8) +SVE_MODES (3, V96, V48, V24, V12) +SVE_MODES (4, V128, V64, V32, V16) /* Quad float: 128-bit floating mode for long doubles. */ FLOAT_MODE (TF, 16, ieee_quad_format); Index: gcc/config/aarch64/aarch64-protos.h =================================================================== --- gcc/config/aarch64/aarch64-protos.h 2017-11-08 15:05:50.204852894 +0000 +++ gcc/config/aarch64/aarch64-protos.h 2017-11-08 15:06:19.687849905 +0000 @@ -432,6 +432,7 @@ rtx aarch64_simd_gen_const_vector_dup (m bool aarch64_simd_mem_operand_p (rtx); bool aarch64_sve_ld1r_operand_p (rtx); bool aarch64_sve_ldr_operand_p (rtx); +bool aarch64_sve_struct_memory_operand_p (rtx); rtx aarch64_simd_vect_par_cnst_half (machine_mode, int, bool); rtx aarch64_tls_get_addr (void); tree aarch64_fold_builtin (tree, int, tree *, bool); Index: gcc/config/aarch64/iterators.md =================================================================== --- gcc/config/aarch64/iterators.md 2017-11-08 15:05:50.216852893 +0000 +++ gcc/config/aarch64/iterators.md 2017-11-08 15:06:19.690849904 +0000 @@ -249,6 +249,11 @@ (define_mode_iterator VMUL_CHANGE_NLANES ;; All SVE vector modes. (define_mode_iterator SVE_ALL [V32QI V16HI V8SI V4DI V16HF V8SF V4DF]) +;; All SVE vector structure modes. +(define_mode_iterator SVE_STRUCT [V64QI V32HI V16SI V8DI V32HF V16SF V8DF + V96QI V48HI V24SI V12DI V48HF V24SF V12DF + V128QI V64HI V32SI V16DI V64HF V32SF V16DF]) + ;; All SVE vector modes that have 8-bit or 16-bit elements. (define_mode_iterator SVE_BH [V32QI V16HI V16HF]) @@ -588,7 +593,14 @@ (define_mode_attr Vetype [(V8QI "b") (V1 (define_mode_attr Vesize [(V32QI "b") (V16HI "h") (V16HF "h") (V8SI "w") (V8SF "w") - (V4DI "d") (V4DF "d")]) + (V4DI "d") (V4DF "d") + (V64QI "b") (V96QI "b") (V128QI "b") + (V32HI "h") (V48HI "h") (V64HI "h") + (V32HF "h") (V48HF "h") (V64HF "h") + (V16SI "w") (V24SI "w") (V32SI "w") + (V16SF "w") (V24SF "w") (V32SF "w") + (V8DI "d") (V12DI "d") (V16DI "d") + (V8DF "d") (V12DF "d") (V16DF "d")]) ;; Vetype is used everywhere in scheduling type and assembly output, ;; sometimes they are not the same, for example HF modes on some @@ -946,17 +958,87 @@ (define_mode_attr insn_count [(OI "8") ( ;; No need of iterator for -fPIC as it use got_lo12 for both modes. (define_mode_attr got_modifier [(SI "gotpage_lo14") (DI "gotpage_lo15")]) -;; The predicate mode associated with an SVE data mode. +;; The number of subvectors in an SVE_STRUCT. +(define_mode_attr vector_count [(V64QI "2") (V32HI "2") + (V16SI "2") (V8DI "2") + (V32HF "2") (V16SF "2") (V8DF "2") + (V96QI "3") (V48HI "3") + (V24SI "3") (V12DI "3") + (V48HF "3") (V24SF "3") (V12DF "3") + (V128QI "4") (V64HI "4") + (V32SI "4") (V16DI "4") + (V64HF "4") (V32SF "4") (V16DF "4")]) + +;; The number of instruction bytes needed for an SVE_STRUCT move. This is +;; equal to vector_count * 4. +(define_mode_attr insn_length [(V64QI "8") (V32HI "8") + (V16SI "8") (V8DI "8") + (V32HF "8") (V16SF "8") (V8DF "8") + (V96QI "12") (V48HI "12") + (V24SI "12") (V12DI "12") + (V48HF "12") (V24SF "12") (V12DF "12") + (V128QI "16") (V64HI "16") + (V32SI "16") (V16DI "16") + (V64HF "16") (V32SF "16") (V16DF "16")]) + +;; The type of a subvector in an SVE_STRUCT. +(define_mode_attr VSINGLE [(V64QI "V32QI") (V32HI "V16HI") + (V16SI "V8SI") (V8DI "V4DI") + (V32HF "V16HF") (V16SF "V8SF") (V8DF "V4DF") + (V96QI "V32QI") (V48HI "V16HI") + (V24SI "V8SI") (V12DI "V4DI") + (V48HF "V16HF") (V24SF "V8SF") (V12DF "V4DF") + (V128QI "V32QI") (V64HI "V16HI") + (V32SI "V8SI") (V16DI "V4DI") + (V64HF "V16HF") (V32SF "V8SF") (V16DF "V4DF")]) + +;; ...and again in lower case. +(define_mode_attr vsingle [(V64QI "v32qi") (V32HI "v16hi") + (V16SI "v8si") (V8DI "v4di") + (V32HF "v16hf") (V16SF "v8sf") (V8DF "v4df") + (V96QI "v32qi") (V48HI "v16hi") + (V24SI "v8si") (V12DI "v4di") + (V48HF "v16hf") (V24SF "v8sf") (V12DF "v4df") + (V128QI "v32qi") (V64HI "v16hi") + (V32SI "v8si") (V16DI "v4di") + (V64HF "v16hf") (V32SF "v8sf") (V16DF "v4df")]) + +;; The predicate mode associated with an SVE data mode. For structure modes +;; this is equivalent to the of the subvector mode. (define_mode_attr VPRED [(V32QI "V32BI") (V16HI "V16BI") (V16HF "V16BI") (V8SI "V8BI") (V8SF "V8BI") - (V4DI "V4BI") (V4DF "V4BI")]) + (V4DI "V4BI") (V4DF "V4BI") + (V64QI "V32BI") + (V32HI "V16BI") (V32HF "V16BI") + (V16SI "V8BI") (V16SF "V8BI") + (V8DI "V4BI") (V8DF "V4BI") + (V96QI "V32BI") + (V48HI "V16BI") (V48HF "V16BI") + (V24SI "V8BI") (V24SF "V8BI") + (V12DI "V4BI") (V12DF "V4BI") + (V128QI "V32BI") + (V64HI "V16BI") (V64HF "V16BI") + (V32SI "V8BI") (V32SF "V8BI") + (V16DI "V4BI") (V16DF "V4BI")]) ;; ...and again in lower case. (define_mode_attr vpred [(V32QI "v32bi") (V16HI "v16bi") (V16HF "v16bi") (V8SI "v8bi") (V8SF "v8bi") - (V4DI "v4bi") (V4DF "v4bi")]) + (V4DI "v4bi") (V4DF "v4bi") + (V64QI "v32bi") + (V32HI "v16bi") (V32HF "v16bi") + (V16SI "v8bi") (V16SF "v8bi") + (V8DI "v4bi") (V8DF "v4bi") + (V96QI "v32bi") + (V48HI "v16bi") (V48HF "v16bi") + (V24SI "v8bi") (V24SF "v8bi") + (V12DI "v4bi") (V12DF "v4bi") + (V128QI "v32bi") + (V64HI "v16bi") (V64HF "v8bi") + (V32SI "v8bi") (V32SF "v8bi") + (V16DI "v4bi") (V16DF "v4bi")]) ;; ------------------------------------------------------------------- ;; Code Iterators Index: gcc/config/aarch64/constraints.md =================================================================== --- gcc/config/aarch64/constraints.md 2017-11-08 15:05:50.215852893 +0000 +++ gcc/config/aarch64/constraints.md 2017-11-08 15:06:19.690849904 +0000 @@ -210,6 +210,12 @@ (define_memory_constraint "Utw" (and (match_code "mem") (match_test "aarch64_sve_ld1r_operand_p (op)"))) +(define_memory_constraint "Utx" + "@internal + An address valid for SVE structure mov patterns (as distinct from + LD[234] and ST[234] patterns)." + (match_operand 0 "aarch64_sve_struct_memory_operand")) + (define_constraint "Ufc" "A floating point constant which can be used with an\ FMOV immediate operation." Index: gcc/config/aarch64/predicates.md =================================================================== --- gcc/config/aarch64/predicates.md 2017-11-08 15:05:50.216852893 +0000 +++ gcc/config/aarch64/predicates.md 2017-11-08 15:06:19.690849904 +0000 @@ -471,6 +471,14 @@ (define_predicate "aarch64_sve_general_o (match_operand 0 "aarch64_sve_ldr_operand") (match_test "aarch64_mov_operand_p (op, mode)")))) +(define_predicate "aarch64_sve_struct_memory_operand" + (and (match_code "mem") + (match_test "aarch64_sve_struct_memory_operand_p (op)"))) + +(define_predicate "aarch64_sve_struct_nonimmediate_operand" + (ior (match_operand 0 "register_operand") + (match_operand 0 "aarch64_sve_struct_memory_operand"))) + ;; Doesn't include immediates, since those are handled by the move ;; patterns instead. (define_predicate "aarch64_sve_dup_operand" Index: gcc/config/aarch64/aarch64.md =================================================================== --- gcc/config/aarch64/aarch64.md 2017-11-08 15:05:50.214852893 +0000 +++ gcc/config/aarch64/aarch64.md 2017-11-08 15:06:19.689849905 +0000 @@ -160,6 +160,8 @@ (define_c_enum "unspec" [ UNSPEC_PACK UNSPEC_FLOAT_CONVERT UNSPEC_WHILE_LO + UNSPEC_LDN + UNSPEC_STN ]) (define_c_enum "unspecv" [ Index: gcc/config/aarch64/aarch64-sve.md =================================================================== --- gcc/config/aarch64/aarch64-sve.md 2017-11-08 15:05:50.206852894 +0000 +++ gcc/config/aarch64/aarch64-sve.md 2017-11-08 15:06:19.687849905 +0000 @@ -189,6 +189,105 @@ (define_insn "maskstore" "st1\t%1., %2, %0" ) +;; SVE structure moves. +(define_expand "mov" + [(set (match_operand:SVE_STRUCT 0 "nonimmediate_operand") + (match_operand:SVE_STRUCT 1 "general_operand"))] + "TARGET_SVE" + { + /* Big-endian loads and stores need to be done via LD1 and ST1; + see the comment at the head of the file for details. */ + if ((MEM_P (operands[0]) || MEM_P (operands[1])) + && BYTES_BIG_ENDIAN) + { + gcc_assert (can_create_pseudo_p ()); + aarch64_expand_sve_mem_move (operands[0], operands[1], mode); + DONE; + } + + if (CONSTANT_P (operands[1])) + { + aarch64_expand_mov_immediate (operands[0], operands[1]); + DONE; + } + } +) + +;; Unpredicated structure moves (little-endian). +(define_insn "*aarch64_sve_mov_le" + [(set (match_operand:SVE_STRUCT 0 "aarch64_sve_nonimmediate_operand" "=w, Utr, w, w") + (match_operand:SVE_STRUCT 1 "aarch64_sve_general_operand" "Utr, w, w, Dn"))] + "TARGET_SVE && !BYTES_BIG_ENDIAN" + "#" + [(set_attr "length" "")] +) + +;; Unpredicated structure moves (big-endian). Memory accesses require +;; secondary reloads. +(define_insn "*aarch64_sve_mov_le" + [(set (match_operand:SVE_STRUCT 0 "register_operand" "=w, w") + (match_operand:SVE_STRUCT 1 "aarch64_nonmemory_operand" "w, Dn"))] + "TARGET_SVE && BYTES_BIG_ENDIAN" + "#" + [(set_attr "length" "")] +) + +;; Split unpredicated structure moves into pieces. This is the same +;; for both big-endian and little-endian code, although it only needs +;; to handle memory operands for little-endian code. +(define_split + [(set (match_operand:SVE_STRUCT 0 "aarch64_sve_nonimmediate_operand") + (match_operand:SVE_STRUCT 1 "aarch64_sve_general_operand"))] + "TARGET_SVE && reload_completed" + [(const_int 0)] + { + rtx dest = operands[0]; + rtx src = operands[1]; + if (REG_P (dest) && REG_P (src)) + aarch64_simd_emit_reg_reg_move (operands, mode, ); + else + for (unsigned int i = 0; i < ; ++i) + { + rtx subdest = simplify_gen_subreg (mode, dest, mode, + i * BYTES_PER_SVE_VECTOR); + rtx subsrc = simplify_gen_subreg (mode, src, mode, + i * BYTES_PER_SVE_VECTOR); + emit_insn (gen_rtx_SET (subdest, subsrc)); + } + DONE; + } +) + +;; Predicated structure moves. This works for both endiannesses but in +;; practice is only useful for big-endian. +(define_insn_and_split "pred_mov" + [(set (match_operand:SVE_STRUCT 0 "aarch64_sve_struct_nonimmediate_operand" "=w, Utx") + (unspec:SVE_STRUCT + [(match_operand: 1 "register_operand" "Upl, Upl") + (match_operand:SVE_STRUCT 2 "aarch64_sve_struct_nonimmediate_operand" "Utx, w")] + UNSPEC_MERGE_PTRUE))] + "TARGET_SVE + && (register_operand (operands[0], mode) + || register_operand (operands[2], mode))" + "#" + "&& reload_completed" + [(const_int 0)] + { + for (unsigned int i = 0; i < ; ++i) + { + rtx subdest = simplify_gen_subreg (mode, operands[0], + mode, + i * BYTES_PER_SVE_VECTOR); + rtx subsrc = simplify_gen_subreg (mode, operands[2], + mode, + i * BYTES_PER_SVE_VECTOR); + aarch64_emit_sve_pred_move (subdest, operands[1], subsrc); + } + DONE; + } + [(set_attr "length" "")] +) + (define_expand "mov" [(set (match_operand:PRED_ALL 0 "nonimmediate_operand") (match_operand:PRED_ALL 1 "general_operand"))] @@ -447,6 +546,60 @@ (define_insn "*vec_series_plus" } ) +;; Unpredicated LD[234]. +(define_expand "vec_load_lanes" + [(set (match_operand:SVE_STRUCT 0 "register_operand") + (unspec:SVE_STRUCT + [(match_dup 2) + (match_operand:SVE_STRUCT 1 "memory_operand")] + UNSPEC_LDN))] + "TARGET_SVE" + { + operands[2] = force_reg (mode, CONSTM1_RTX (mode)); + } +) + +;; Predicated LD[234]. +(define_insn "vec_mask_load_lanes" + [(set (match_operand:SVE_STRUCT 0 "register_operand" "=w") + (unspec:SVE_STRUCT + [(match_operand: 2 "register_operand" "Upl") + (match_operand:SVE_STRUCT 1 "memory_operand" "m")] + UNSPEC_LDN))] + "TARGET_SVE" + "ld\t%0, %2/z, %1" +) + +;; Unpredicated ST[234]. This is always a full update, so the dependence +;; on the old value of the memory location (via (match_dup 0)) is redundant. +;; There doesn't seem to be any obvious benefit to treating the all-true +;; case differently though. In particular, it's very unlikely that we'll +;; only find out during RTL that a store_lanes is dead. +(define_expand "vec_store_lanes" + [(set (match_operand:SVE_STRUCT 0 "memory_operand") + (unspec:SVE_STRUCT + [(match_dup 2) + (match_operand:SVE_STRUCT 1 "register_operand") + (match_dup 0)] + UNSPEC_STN))] + "TARGET_SVE" + { + operands[2] = force_reg (mode, CONSTM1_RTX (mode)); + } +) + +;; Predicated ST[234]. +(define_insn "vec_mask_store_lanes" + [(set (match_operand:SVE_STRUCT 0 "memory_operand" "+m") + (unspec:SVE_STRUCT + [(match_operand: 2 "register_operand" "Upl") + (match_operand:SVE_STRUCT 1 "register_operand" "w") + (match_dup 0)] + UNSPEC_STN))] + "TARGET_SVE" + "st\t%1, %2, %0" +) + (define_expand "vec_perm_const" [(match_operand:SVE_ALL 0 "register_operand") (match_operand:SVE_ALL 1 "register_operand") Index: gcc/config/aarch64/aarch64.c =================================================================== --- gcc/config/aarch64/aarch64.c 2017-11-08 15:05:50.213852893 +0000 +++ gcc/config/aarch64/aarch64.c 2017-11-08 15:06:19.689849905 +0000 @@ -1179,9 +1179,15 @@ aarch64_classify_vector_mode (machine_mo || inner == DImode || inner == DFmode)) { - if (TARGET_SVE - && must_eq (GET_MODE_BITSIZE (mode), BITS_PER_SVE_VECTOR)) - return VEC_SVE_DATA; + if (TARGET_SVE) + { + if (must_eq (GET_MODE_BITSIZE (mode), BITS_PER_SVE_VECTOR)) + return VEC_SVE_DATA; + if (must_eq (GET_MODE_BITSIZE (mode), BITS_PER_SVE_VECTOR * 2) + || must_eq (GET_MODE_BITSIZE (mode), BITS_PER_SVE_VECTOR * 3) + || must_eq (GET_MODE_BITSIZE (mode), BITS_PER_SVE_VECTOR * 4)) + return VEC_SVE_DATA | VEC_STRUCT; + } /* This includes V1DF but not V1DI (which doesn't exist). */ if (TARGET_SIMD @@ -1209,6 +1215,18 @@ aarch64_sve_data_mode_p (machine_mode mo return aarch64_classify_vector_mode (mode) & VEC_SVE_DATA; } +/* Implement target hook TARGET_ARRAY_MODE. */ +static opt_machine_mode +aarch64_array_mode (machine_mode mode, unsigned HOST_WIDE_INT nelems) +{ + if (aarch64_classify_vector_mode (mode) == VEC_SVE_DATA + && IN_RANGE (nelems, 2, 4)) + return mode_for_vector (GET_MODE_INNER (mode), + GET_MODE_NUNITS (mode) * nelems); + + return opt_machine_mode (); +} + /* Implement target hook TARGET_ARRAY_MODE_SUPPORTED_P. */ static bool aarch64_array_mode_supported_p (machine_mode mode, @@ -5677,6 +5695,18 @@ aarch64_classify_address (struct aarch64 ? offset_4bit_signed_scaled_p (mode, offset) : offset_9bit_signed_scaled_p (mode, offset)); + if (vec_flags == (VEC_SVE_DATA | VEC_STRUCT)) + { + poly_int64 end_offset = (offset + + GET_MODE_SIZE (mode) + - BYTES_PER_SVE_VECTOR); + return (type == ADDR_QUERY_M + ? offset_4bit_signed_scaled_p (mode, offset) + : (offset_9bit_signed_scaled_p (SVE_BYTE_MODE, offset) + && offset_9bit_signed_scaled_p (SVE_BYTE_MODE, + end_offset))); + } + if (vec_flags == VEC_SVE_PRED) return offset_9bit_signed_scaled_p (mode, offset); @@ -6391,6 +6421,20 @@ aarch64_print_vector_float_operand (FILE return true; } +/* Return the equivalent letter for size. */ +static char +sizetochar (int size) +{ + switch (size) + { + case 64: return 'd'; + case 32: return 's'; + case 16: return 'h'; + case 8 : return 'b'; + default: gcc_unreachable (); + } +} + /* Print operand X to file F in a target specific manner according to CODE. The acceptable formatting commands given by CODE are: 'c': An integer or symbol address without a preceding # @@ -6674,7 +6718,18 @@ aarch64_print_operand (FILE *f, rtx x, i { case REG: if (aarch64_sve_data_mode_p (GET_MODE (x))) - asm_fprintf (f, "z%d", REGNO (x) - V0_REGNUM); + { + if (REG_NREGS (x) == 1) + asm_fprintf (f, "z%d", REGNO (x) - V0_REGNUM); + else + { + char suffix + = sizetochar (GET_MODE_UNIT_BITSIZE (GET_MODE (x))); + asm_fprintf (f, "{z%d.%c - z%d.%c}", + REGNO (x) - V0_REGNUM, suffix, + END_REGNO (x) - V0_REGNUM - 1, suffix); + } + } else asm_fprintf (f, "%s", reg_names [REGNO (x)]); break; @@ -12825,20 +12880,6 @@ aarch64_final_prescan_insn (rtx_insn *in } -/* Return the equivalent letter for size. */ -static char -sizetochar (int size) -{ - switch (size) - { - case 64: return 'd'; - case 32: return 's'; - case 16: return 'h'; - case 8 : return 'b'; - default: gcc_unreachable (); - } -} - /* Return true if BASE_OR_STEP is a valid immediate operand for an SVE INDEX instruction. */ @@ -13432,6 +13473,28 @@ aarch64_sve_ldr_operand_p (rtx op) && addr.type == ADDRESS_REG_IMM); } +/* Return true if OP is a valid MEM operand for an SVE_STRUCT mode. + We need to be able to access the individual pieces, so the range + is different from LD[234] and ST[234]. */ +bool +aarch64_sve_struct_memory_operand_p (rtx op) +{ + if (!MEM_P (op)) + return false; + + machine_mode mode = GET_MODE (op); + struct aarch64_address_info addr; + if (!aarch64_classify_address (&addr, XEXP (op, 0), SVE_BYTE_MODE, false, + ADDR_QUERY_ANY) + || addr.type != ADDRESS_REG_IMM) + return false; + + poly_int64 first = addr.const_offset; + poly_int64 last = first + GET_MODE_SIZE (mode) - BYTES_PER_SVE_VECTOR; + return (offset_4bit_signed_scaled_p (SVE_BYTE_MODE, first) + && offset_4bit_signed_scaled_p (SVE_BYTE_MODE, last)); +} + /* Emit a register copy from operand to operand, taking care not to early-clobber source registers in the process. @@ -17542,6 +17605,9 @@ #define TARGET_VECTOR_MODE_SUPPORTED_P a #define TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT \ aarch64_builtin_support_vector_misalignment +#undef TARGET_ARRAY_MODE +#define TARGET_ARRAY_MODE aarch64_array_mode + #undef TARGET_ARRAY_MODE_SUPPORTED_P #define TARGET_ARRAY_MODE_SUPPORTED_P aarch64_array_mode_supported_p From patchwork Wed Nov 8 15:14:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 118280 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5413823qgn; Wed, 8 Nov 2017 07:15:48 -0800 (PST) X-Google-Smtp-Source: ABhQp+T7sYuul/Ku0rubIa0gxR4EWJSABr5BRbng5hVWste+V81s4RxI2Hrr3AFEprVmpjD84tQS X-Received: by 10.98.36.12 with SMTP id r12mr866668pfj.11.1510154148910; Wed, 08 Nov 2017 07:15:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510154148; cv=none; d=google.com; s=arc-20160816; b=xXY+689CGI0PclufCYyvlyfOnUkio5Pdp2Ov+1Cajp76mnUpWcyerumoyzn4Wjm8An lalIL7O6w7RzKYS0GNUfKeJCkgL+ZLOtrgM6OTNSCFCBAuQaoHUGXE4RSIYgqvlKC1Vf bcfuQoAo1K9sNYGRe+P5jyx+hLpIbBOerAMTnFIBLR8FN5fX8YOSYpt0dolM9/0veCUJ QfBBqz23LcXieU6BZfIuRK06vFLCGZ/dMwdZuzuM7LQeyxLkbVC8sOLZb6Tlk3/aDNCX BUBVF0zUXUj0MYlMxZo5saSnFqRvaoM7aL1T5dkhUFpyZySmiNB2Fm3a/ULuq9uOW91/ 6NLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:mail-followup-to:to:from:delivered-to:sender:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=zEY6DWXJTzZHh+lMDJ31Qdayz8TW5E7TZvcBVrwwd3g=; b=ziiGZ4J1Lr5xrhd9SJxfEAh0MENCBR2uax5fBrjqL3PSW5bfSQoAqTLRNMywOvnunt +NtxdQeXGjflLdKN7eAeSFbJtWWHt4O7IeckXLK2dBxyk8MsnrwHFvR+dS5WypOlFbsN 1zbfNThCm6RnAnCo5Vkp6RfzOX8X8peRB74DjjT2AEI6+7bO46Ng4K8kj4eNS2vzYb18 yps2oDrmQht89DZVDc0dOp3p86xRrS/fZZqHY2s/s53gkiefZ75c937QwJ89BMhoMo3+ MIvMTCGlXx3p40Gh/VIICxAYc6tlAHcu9IxHyGWCUHqQNzkwlhQ67O0NVbtljtzsVOtj E0iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=me0GSn5y; spf=pass (google.com: domain of gcc-patches-return-466255-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-466255-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id b31si4135852plb.222.2017.11.08.07.15.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Nov 2017 07:15:48 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-466255-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=me0GSn5y; spf=pass (google.com: domain of gcc-patches-return-466255-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-466255-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=uEPDgqB8sypW/uTa MgF/cAtEuPf8no5PVhS5nIajnY0sq/zoH6GMzXfZYTVWiQEP+xMEFkuQ+deTIeO3 sWjvuVGVOZTgRnELqtwzG9ZXiZA0Ppmh9kXjG8OCf451IZ7aCwOVLr7r3iblfx7l wnGa3p/DEco/sr7mTPOsXeU5qxY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=yXLbbl0FigGTSWI6w/hIcN /uQKc=; b=me0GSn5y3D9wBoNq0PQeS1ZegYqq+SkwZp85IOimJGtf83YSmOKPgv GDZnmr1L4QwX9F6yOoH5oGSYT1CCYMVBLGzJdIfig/MxLIqLtVwrZbwySra6au5F Y7k3QJlKgK0+ee4uuZRsTMCrD8xSxPqq4XyG3GVXQcI42QAwc3RyA= Received: (qmail 102638 invoked by alias); 8 Nov 2017 15:15:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 102538 invoked by uid 89); 8 Nov 2017 15:15:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=slp24c, UD:slp-24-big-array.c, slp-24.c, UD:slp-24.c X-HELO: mail-wm0-f65.google.com Received: from mail-wm0-f65.google.com (HELO mail-wm0-f65.google.com) (74.125.82.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Nov 2017 15:15:14 +0000 Received: by mail-wm0-f65.google.com with SMTP id r68so17027726wmr.0 for ; Wed, 08 Nov 2017 07:15:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version; bh=zEY6DWXJTzZHh+lMDJ31Qdayz8TW5E7TZvcBVrwwd3g=; b=o0o2CQI3uQr0+vgXsla+HXAhswXpGzG5FlAWnYCOWZB8LvVWS6uUzS7F3MuBUbzWDv ziH0IknrzL2I2qOX4hkuFffV+pVrPuExBKXowFrYWgDSa5bfJm6SrLfF4GCfpeTBtV/V DfKlO5hc9eRWVBOZJiCX0JIs0LjsiQIRix4iKhFVC0aKMcHI+qipWz7NEa9PGP8V7Uzs TW1I4Qu6J8EYmd+wawc+4T3rBEbS5Wel0zA5YPmAfpC6HAeS5PJzVNxO1h26jZm7uBqi /5KmK8+5JLzHE77v42VyKXFvS4juTVEVVbJjPG6wlCAmYQ2KafGUCbjxYkdGeWiiobUp +iRQ== X-Gm-Message-State: AJaThX5+otZ3BxkSITZbsJheayUofRt4cWFrSuVjlrW0CKsYGOPb8Brm gCfBpu2L7vyHzeYwftfDKVw+ith8ASY= X-Received: by 10.28.69.8 with SMTP id s8mr613241wma.65.1510154105809; Wed, 08 Nov 2017 07:15:05 -0800 (PST) Received: from localhost (94.197.121.218.threembb.co.uk. [94.197.121.218]) by smtp.gmail.com with ESMTPSA id v5sm2200199wrf.29.2017.11.08.07.15.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Nov 2017 07:15:05 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.earnshaw@arm.com, james.greenhalgh@arm.com, marcus.shawcroft@arm.com, richard.sandiford@linaro.org Cc: richard.earnshaw@arm.com, james.greenhalgh@arm.com, marcus.shawcroft@arm.com Subject: [3/4] load/store_lanes testsuite markup References: <87375oyfen.fsf@linaro.org> Date: Wed, 08 Nov 2017 15:14:59 +0000 In-Reply-To: <87375oyfen.fsf@linaro.org> (Richard Sandiford's message of "Wed, 08 Nov 2017 15:10:56 +0000") Message-ID: <87o9ocx0ng.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Supporting load/store lanes for variable-length vectors means that we use them instead of SLP (for which we can't yet handle external and constant definitions -- fixed by a later patch). Previously we'd fail to use load/store lanes too and fall back to 128-bit vectorisation. 2017-11-08 Richard Sandiford Alan Hayward David Sherwood gcc/testsuite/ * lib/target-supports.exp (check_effective_target_vect_load_lanes): Return true for SVE too. * g++.dg/vect/pr36648.cc: XFAIL for variable-length vectors if load/store lanes are supported. * gcc.dg/vect/no-scevccp-slp-30.c: Likewise. * gcc.dg/vect/pr37027.c: Likewise. * gcc.dg/vect/pr67790.c: Likewise. * gcc.dg/vect/slp-1.c: Likewise. * gcc.dg/vect/slp-10.c: Likewise. * gcc.dg/vect/slp-12b.c: Likewise. * gcc.dg/vect/slp-12c.c: Likewise. * gcc.dg/vect/slp-17.c: Likewise. * gcc.dg/vect/slp-19b.c: Likewise. * gcc.dg/vect/slp-2.c: Likewise. * gcc.dg/vect/slp-20.c: Likewise. * gcc.dg/vect/slp-21.c: Likewise. * gcc.dg/vect/slp-22.c: Likewise. * gcc.dg/vect/slp-24-big-array.c: Likewise. * gcc.dg/vect/slp-24.c: Likewise. * gcc.dg/vect/slp-28.c: Likewise. * gcc.dg/vect/slp-33.c: Likewise. * gcc.dg/vect/slp-39.c: Likewise. * gcc.dg/vect/slp-6.c: Likewise. * gcc.dg/vect/slp-7.c: Likewise. * gcc.dg/vect/slp-cond-1.c: Likewise. * gcc.dg/vect/slp-cond-2-big-array.c: Likewise. * gcc.dg/vect/slp-cond-2.c: Likewise. * gcc.dg/vect/slp-multitypes-1.c: Likewise. * gcc.dg/vect/slp-multitypes-10.c: Likewise. * gcc.dg/vect/slp-multitypes-11-big-array.c: Likewise. * gcc.dg/vect/slp-multitypes-11.c: Likewise. * gcc.dg/vect/slp-multitypes-12.c: Likewise. * gcc.dg/vect/slp-multitypes-8.c: Likewise. * gcc.dg/vect/slp-multitypes-9.c: Likewise. * gcc.dg/vect/slp-reduc-1.c: Likewise. * gcc.dg/vect/slp-reduc-2.c: Likewise. * gcc.dg/vect/slp-reduc-5.c: Likewise. * gcc.dg/vect/slp-widen-mult-half.c: Likewise. * gcc.dg/vect/vect-cselim-1.c: Likewise. * gcc.dg/vect/slp-25.c: Remove XFAIL for variable-length SVE. * gcc.dg/vect/slp-perm-5.c: Likewise. * gcc.dg/vect/slp-perm-6.c: Likewise. * gcc.dg/vect/slp-perm-9.c: Likewise. * gcc.dg/vect/vect-119.c: Likewise. * gcc.dg/vect/vect-live-slp-1.c: Likewise. * gcc.dg/vect/vect-live-slp-2.c: Likewise. * gcc.dg/vect/vect-live-slp-3.c: Likewise. * gcc.dg/vect/vect-over-widen-1-big-array.c: Likewise. * gcc.dg/vect/vect-over-widen-1.c: Likewise. * gcc.dg/vect/vect-over-widen-3-big-array.c: Likewise. * gcc.dg/vect/vect-over-widen-4-big-array.c: Likewise. * gcc.dg/vect/vect-over-widen-4.c: Likewise. * gcc.dg/vect/slp-reduc-6.c: Remove XFAIL for variable-length vectors. * gcc.dg/vect/vect-load-lanes-peeling-1.c: Expect an epilogue loop for variable-length vectors. Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp 2017-11-08 15:05:50.258852888 +0000 +++ gcc/testsuite/lib/target-supports.exp 2017-11-08 15:06:23.208849548 +0000 @@ -6506,8 +6506,7 @@ proc check_effective_target_vect_load_la } else { set et_vect_load_lanes 0 if { ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) - || ([istarget aarch64*-*-*] - && ![check_effective_target_aarch64_sve]) } { + || [istarget aarch64*-*-*] } { set et_vect_load_lanes 1 } } Index: gcc/testsuite/g++.dg/vect/pr36648.cc =================================================================== --- gcc/testsuite/g++.dg/vect/pr36648.cc 2017-02-23 19:54:10.000000000 +0000 +++ gcc/testsuite/g++.dg/vect/pr36648.cc 2017-11-08 15:06:23.202849548 +0000 @@ -25,6 +25,6 @@ int main() { } targets, ! vect_no_align is a sufficient test. */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { { { ! vect_no_align } && { ! powerpc*-*-* } } || { powerpc*-*-* && vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { { { ! vect_no_align } && { ! powerpc*-*-* } } || { powerpc*-*-* && vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { { { ! vect_no_align } && { ! powerpc*-*-* } } || { powerpc*-*-* && vect_hw_misalign } } xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c =================================================================== --- gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c 2017-11-08 15:06:23.202849548 +0000 @@ -52,5 +52,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/pr37027.c =================================================================== --- gcc/testsuite/gcc.dg/vect/pr37027.c 2015-11-11 15:40:09.000000000 +0000 +++ gcc/testsuite/gcc.dg/vect/pr37027.c 2017-11-08 15:06:23.202849548 +0000 @@ -32,5 +32,5 @@ foo (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_add } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_add } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_no_int_add || { vect_variable_length && vect_load_lanes } } } } } */ Index: gcc/testsuite/gcc.dg/vect/pr67790.c =================================================================== --- gcc/testsuite/gcc.dg/vect/pr67790.c 2015-12-01 19:44:24.000000000 +0000 +++ gcc/testsuite/gcc.dg/vect/pr67790.c 2017-11-08 15:06:23.202849548 +0000 @@ -37,4 +37,4 @@ int main() return 0; } -/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */ +/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-1.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-1.c 2017-11-08 15:06:23.202849548 +0000 @@ -118,5 +118,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-10.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-10.c 2017-10-04 16:25:39.696051107 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-10.c 2017-11-08 15:06:23.202849548 +0000 @@ -107,7 +107,7 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {target {vect_uintfloat_cvt && vect_int_mult} } } } */ /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" {target {{! { vect_uintfloat_cvt}} && vect_int_mult} } } } */ /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" {target {{! { vect_uintfloat_cvt}} && { ! {vect_int_mult}}} } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" {target {vect_uintfloat_cvt && vect_int_mult} } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" {target { vect_uintfloat_cvt && vect_int_mult } xfail { vect_variable_length && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" {target {{! { vect_uintfloat_cvt}} && vect_int_mult} } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" {target {{! { vect_uintfloat_cvt}} && { ! {vect_int_mult}}} } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-12b.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-12b.c 2017-10-04 16:25:39.697051107 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-12b.c 2017-11-08 15:06:23.202849548 +0000 @@ -46,6 +46,6 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_strided2 && vect_int_mult } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { target { ! { vect_strided2 && vect_int_mult } } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { vect_strided2 && vect_int_mult } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { vect_strided2 && vect_int_mult } xfail { vect_variable_length && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { ! { vect_strided2 && vect_int_mult } } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-12c.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-12c.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-12c.c 2017-11-08 15:06:23.202849548 +0000 @@ -48,5 +48,5 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_int_mult } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { target { ! vect_int_mult } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_int_mult } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_int_mult xfail { vect_variable_length && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { ! vect_int_mult } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-17.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-17.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-17.c 2017-11-08 15:06:23.203849548 +0000 @@ -51,5 +51,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-19b.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-19b.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-19b.c 2017-11-08 15:06:23.203849548 +0000 @@ -53,5 +53,5 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided4 } } } */ /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { target { ! vect_strided4 } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_strided4 } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_strided4 xfail { vect_variable_length && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { ! vect_strided4 } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-2.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-2.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-2.c 2017-11-08 15:06:23.203849548 +0000 @@ -140,5 +140,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-20.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-20.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-20.c 2017-11-08 15:06:23.203849548 +0000 @@ -110,5 +110,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-21.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-21.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-21.c 2017-11-08 15:06:23.203849548 +0000 @@ -201,6 +201,6 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" { target { vect_strided4 || vect_extract_even_odd } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! { vect_strided4 || vect_extract_even_odd } } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target vect_strided4 } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target vect_strided4 xfail { vect_variable_length && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { ! { vect_strided4 } } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-22.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-22.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-22.c 2017-11-08 15:06:23.203849548 +0000 @@ -129,5 +129,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 6 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 6 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-24-big-array.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-24-big-array.c 2017-11-08 15:05:40.718203564 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-24-big-array.c 2017-11-08 15:06:23.203849548 +0000 @@ -91,4 +91,4 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && ilp32 } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail { vect_no_align && ilp32 } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail { { vect_no_align && ilp32 } || { vect_variable_length && vect_load_lanes } } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-24.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-24.c 2017-11-08 15:05:40.718203564 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-24.c 2017-11-08 15:06:23.204849548 +0000 @@ -77,4 +77,4 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && ilp32 } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail { vect_no_align && ilp32 } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail { { vect_no_align && ilp32 } || { vect_variable_length && vect_load_lanes } } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-28.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-28.c 2017-11-08 15:05:42.968853628 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-28.c 2017-11-08 15:06:23.204849548 +0000 @@ -89,5 +89,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-33.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-33.c 2017-10-04 16:25:39.697051107 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-33.c 2017-11-08 15:06:23.204849548 +0000 @@ -105,7 +105,7 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {target {vect_uintfloat_cvt && vect_int_mult} } } } */ /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" {target {{! { vect_uintfloat_cvt}} && vect_int_mult} } } } */ /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" {target {{! { vect_uintfloat_cvt}} && {! {vect_int_mult}}} } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" {target {vect_uintfloat_cvt && vect_int_mult} } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" {target {vect_uintfloat_cvt && vect_int_mult} xfail { vect_variable_length && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" {target {{! { vect_uintfloat_cvt}} && vect_int_mult} } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" {target {{! { vect_uintfloat_cvt}} && {! {vect_int_mult}}} } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-39.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-39.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-39.c 2017-11-08 15:06:23.204849548 +0000 @@ -21,4 +21,4 @@ void bar (double w) } } -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-6.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-6.c 2015-06-02 23:53:35.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-6.c 2017-11-08 15:06:23.204849548 +0000 @@ -116,6 +116,6 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {target vect_int_mult} } } */ /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" {target { ! { vect_int_mult } } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" {target vect_int_mult } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" {target vect_int_mult xfail { vect_variable_length && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" {target { ! { vect_int_mult } } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-7.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-7.c 2015-06-02 23:53:35.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-7.c 2017-11-08 15:06:23.204849548 +0000 @@ -122,6 +122,6 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target vect_short_mult } } }*/ /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { ! { vect_short_mult } } } } }*/ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { target vect_short_mult } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { target vect_short_mult xfail { vect_variable_length && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target { ! { vect_short_mult } } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-cond-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-cond-1.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-cond-1.c 2017-11-08 15:06:23.204849548 +0000 @@ -122,4 +122,4 @@ main () return 0; } -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-cond-2-big-array.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-cond-2-big-array.c 2017-10-04 16:25:39.698051107 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-cond-2-big-array.c 2017-11-08 15:06:23.205849548 +0000 @@ -125,4 +125,4 @@ main () return 0; } -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-cond-2.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-cond-2.c 2017-10-04 16:25:39.698051107 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-cond-2.c 2017-11-08 15:06:23.205849548 +0000 @@ -125,4 +125,4 @@ main () return 0; } -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-multitypes-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-multitypes-1.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-multitypes-1.c 2017-11-08 15:06:23.205849548 +0000 @@ -52,5 +52,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-multitypes-10.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-multitypes-10.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-multitypes-10.c 2017-11-08 15:06:23.205849548 +0000 @@ -46,5 +46,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_pack_trunc } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_pack_trunc } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_pack_trunc xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-multitypes-11-big-array.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-multitypes-11-big-array.c 2017-11-08 15:05:40.720950312 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-multitypes-11-big-array.c 2017-11-08 15:06:23.205849548 +0000 @@ -55,5 +55,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_unpack } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_unpack } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_unpack xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-multitypes-11.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-multitypes-11.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-multitypes-11.c 2017-11-08 15:06:23.205849548 +0000 @@ -49,5 +49,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_unpack } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_unpack } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_unpack xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-multitypes-12.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-multitypes-12.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-multitypes-12.c 2017-11-08 15:06:23.205849548 +0000 @@ -62,5 +62,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-multitypes-8.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-multitypes-8.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-multitypes-8.c 2017-11-08 15:06:23.205849548 +0000 @@ -40,5 +40,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_unpack } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_unpack } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_unpack xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-multitypes-9.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-multitypes-9.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-multitypes-9.c 2017-11-08 15:06:23.205849548 +0000 @@ -40,5 +40,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_pack_trunc } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_pack_trunc } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_pack_trunc xfail { vect_variable_length && vect_load_lanes } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-reduc-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-reduc-1.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-reduc-1.c 2017-11-08 15:06:23.206849548 +0000 @@ -43,5 +43,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_add } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_add } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_no_int_add || { vect_variable_length && vect_load_lanes } } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-reduc-2.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-reduc-2.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-reduc-2.c 2017-11-08 15:06:23.206849548 +0000 @@ -38,5 +38,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_add } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_add } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_no_int_add || { vect_variable_length && vect_load_lanes } } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-reduc-5.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-reduc-5.c 2015-09-07 18:51:04.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-reduc-5.c 2017-11-08 15:06:23.206849548 +0000 @@ -43,5 +43,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail vect_no_int_min_max } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_min_max } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_no_int_min_max || { vect_variable_length && vect_load_lanes } } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c 2016-11-22 21:16:10.000000000 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c 2017-11-08 15:06:23.206849548 +0000 @@ -46,7 +46,7 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_hi_to_si } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target vect_widen_mult_hi_to_si } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target vect_widen_mult_hi_to_si xfail { vect_variable_length && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */ /* { dg-final { scan-tree-dump-times "pattern recognized" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-cselim-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-cselim-1.c 2017-11-08 15:05:50.253852889 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-cselim-1.c 2017-11-08 15:06:23.206849548 +0000 @@ -83,6 +83,4 @@ main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_masked_store } xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vect_strided2 } } } } } */ -/* Fails for variable-length SVE because we can't yet handle the - interleaved load. This is fixed by a later patch. */ -/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target vect_masked_store xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target vect_masked_store } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-25.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-25.c 2017-11-08 15:05:50.252852889 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-25.c 2017-11-08 15:06:23.204849548 +0000 @@ -57,6 +57,4 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */ /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ -/* Needs store_lanes for SVE, otherwise falls back to Advanced SIMD. - Will be fixed when SVE LOAD_LANES support is added. */ -/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { { ! vect_unaligned_possible } || { ! vect_natural_alignment } } && { ! { aarch64_sve && vect_variable_length } } } } } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { ! vect_unaligned_possible } || { ! vect_natural_alignment } } } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-perm-5.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-perm-5.c 2017-11-08 15:05:50.252852889 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-perm-5.c 2017-11-08 15:06:23.205849548 +0000 @@ -104,9 +104,7 @@ int main (int argc, const char* argv[]) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */ -/* Fails for variable-length SVE because we fall back to Advanced SIMD - and use LD3/ST3. Will be fixed when SVE LOAD_LANES support is added. */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target { vect_perm3_int && {! vect_load_lanes } } xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target { vect_perm3_int && { ! vect_load_lanes } } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target vect_load_lanes } } } */ /* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm3_int && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump "LOAD_LANES" "vect" { target vect_load_lanes } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-perm-6.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-perm-6.c 2017-11-08 15:05:50.252852889 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-perm-6.c 2017-11-08 15:06:23.206849548 +0000 @@ -103,10 +103,8 @@ int main (int argc, const char* argv[]) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */ -/* Fails for variable-length SVE because we fall back to Advanced SIMD - and use LD3/ST3. Will be fixed when SVE LOAD_LANES support is added. */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target { vect_perm3_int && {! vect_load_lanes } } xfail { aarch64_sve && vect_variable_length } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_load_lanes } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target { vect_perm3_int && { ! vect_load_lanes } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_load_lanes xfail { vect_variable_length && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm3_int && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump "LOAD_LANES" "vect" { target vect_load_lanes } } } */ /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-perm-9.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-perm-9.c 2017-11-08 15:05:50.252852889 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-perm-9.c 2017-11-08 15:06:23.206849548 +0000 @@ -57,9 +57,7 @@ int main (int argc, const char* argv[]) return 0; } -/* Fails for variable-length SVE because we fall back to Advanced SIMD - and use LD3/ST3. Will be fixed when SVE LOAD_LANES support is added. */ -/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 2 "vect" { target { ! { vect_perm_short || vect_load_lanes } } xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 2 "vect" { target { ! { vect_perm_short || vect_load_lanes } } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm_short || vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump-times "permutation requires at least three vectors" 1 "vect" { target { vect_perm_short && { ! vect_perm3_short } } } } } */ /* { dg-final { scan-tree-dump-not "permutation requires at least three vectors" "vect" { target vect_perm3_short } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-119.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-119.c 2017-11-08 15:05:50.253852889 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-119.c 2017-11-08 15:06:23.206849548 +0000 @@ -25,7 +25,4 @@ unsigned int foo (const unsigned int x[O return sum; } -/* Requires load-lanes for SVE, which is implemented by a later patch. - Until then we report it twice, once for SVE and once for 128-bit - Advanced SIMD. */ -/* { dg-final { scan-tree-dump-times "Detected interleaving load of size 2" 1 "vect" { xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "Detected interleaving load of size 2" 1 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-live-slp-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-live-slp-1.c 2017-11-08 15:05:50.254852889 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-live-slp-1.c 2017-11-08 15:06:23.206849548 +0000 @@ -68,8 +68,5 @@ main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" } } */ -/* We can't yet create the necessary SLP constant vector for variable-length - SVE and so fall back to Advanced SIMD. This means that we repeat each - analysis note. */ -/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 4 "vect" { xfail { aarch64_sve && vect_variable_length } } } }*/ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ +/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 4 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-live-slp-2.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-live-slp-2.c 2017-11-08 15:05:50.254852889 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-live-slp-2.c 2017-11-08 15:06:23.207849548 +0000 @@ -62,8 +62,5 @@ main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */ -/* We can't yet create the necessary SLP constant vector for variable-length - SVE and so fall back to Advanced SIMD. This means that we repeat each - analysis note. */ -/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 2 "vect" { xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ +/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 2 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c 2017-11-08 15:05:50.254852889 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c 2017-11-08 15:06:23.207849548 +0000 @@ -69,8 +69,5 @@ main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" } } */ -/* We can't yet create the necessary SLP constant vector for variable-length - SVE and so fall back to Advanced SIMD. This means that we repeat each - analysis note. */ -/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 4 "vect" { xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { xfail { vect_variable_length && vect_load_lanes } } } } */ +/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 4 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-over-widen-1-big-array.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-over-widen-1-big-array.c 2017-11-08 15:05:50.255852889 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-over-widen-1-big-array.c 2017-11-08 15:06:23.207849548 +0000 @@ -59,8 +59,6 @@ int main (void) /* { dg-final { scan-tree-dump-times "vect_recog_widen_shift_pattern: detected" 2 "vect" { target vect_widen_shift } } } */ /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 2 "vect" { target vect_widen_shift } } } */ -/* Requires LD4 for variable-length SVE. Until that's supported we fall - back to Advanced SIMD, which does have widening shifts. */ -/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" { target { ! vect_widen_shift } xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" { target { ! vect_widen_shift } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-over-widen-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-over-widen-1.c 2017-11-08 15:05:50.255852889 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-over-widen-1.c 2017-11-08 15:06:23.207849548 +0000 @@ -63,9 +63,7 @@ int main (void) /* { dg-final { scan-tree-dump-times "vect_recog_widen_shift_pattern: detected" 2 "vect" { target vect_widen_shift } } } */ /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 2 "vect" { target vect_widen_shift } } } */ -/* Requires LD4 for variable-length SVE. Until that's supported we fall - back to Advanced SIMD, which does have widening shifts. */ -/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" { target { { ! vect_sizes_32B_16B } && { ! vect_widen_shift } } xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" { target { { ! vect_sizes_32B_16B } && { ! vect_widen_shift } } } } } */ /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 8 "vect" { target vect_sizes_32B_16B } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-over-widen-3-big-array.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-over-widen-3-big-array.c 2017-11-08 15:05:50.256852889 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-over-widen-3-big-array.c 2017-11-08 15:06:23.207849548 +0000 @@ -59,9 +59,7 @@ int main (void) return 0; } -/* Requires LD4 for variable-length SVE. Until that's supported we fall - back to Advanced SIMD, which does have widening shifts. */ -/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 2 "vect" { target { ! vect_widen_shift } xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 2 "vect" { target { ! vect_widen_shift } } } } */ /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 1 "vect" { target vect_widen_shift } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-over-widen-4-big-array.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-over-widen-4-big-array.c 2017-11-08 15:05:50.256852889 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-over-widen-4-big-array.c 2017-11-08 15:06:23.207849548 +0000 @@ -63,8 +63,6 @@ int main (void) /* { dg-final { scan-tree-dump-times "vect_recog_widen_shift_pattern: detected" 2 "vect" { target vect_widen_shift } } } */ /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 2 "vect" { target vect_widen_shift } } } */ -/* Requires LD4 for variable-length SVE. Until that's supported we fall - back to Advanced SIMD, which does have widening shifts. */ -/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" { target { ! vect_widen_shift } xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" { target { ! vect_widen_shift } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-over-widen-4.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-over-widen-4.c 2017-11-08 15:05:50.256852889 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-over-widen-4.c 2017-11-08 15:06:23.207849548 +0000 @@ -67,9 +67,7 @@ int main (void) /* { dg-final { scan-tree-dump-times "vect_recog_widen_shift_pattern: detected" 2 "vect" { target vect_widen_shift } } } */ /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 2 "vect" { target vect_widen_shift } } } */ -/* Requires LD4 for variable-length SVE. Until that's supported we fall - back to Advanced SIMD, which does have widening shifts. */ -/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" { target { { ! vect_sizes_32B_16B } && { ! vect_widen_shift } } xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" { target { { ! vect_sizes_32B_16B } && { ! vect_widen_shift } } } } } */ /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 8 "vect" { target vect_sizes_32B_16B } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/slp-reduc-6.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-reduc-6.c 2017-11-08 15:05:46.805853239 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-reduc-6.c 2017-11-08 15:06:23.206849548 +0000 @@ -44,5 +44,5 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_int_add || { ! { vect_unpack || vect_strided2 } } } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */ -/* { dg-final { scan-tree-dump-times "different interleaving chains in one node" 1 "vect" { target { ! vect_no_int_add } xfail vect_variable_length } } } */ +/* { dg-final { scan-tree-dump-times "different interleaving chains in one node" 1 "vect" { target { ! vect_no_int_add } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-load-lanes-peeling-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-load-lanes-peeling-1.c 2016-11-22 21:16:10.000000000 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-load-lanes-peeling-1.c 2017-11-08 15:06:23.207849548 +0000 @@ -10,4 +10,4 @@ f (int *__restrict a, int *__restrict b) } /* { dg-final { scan-tree-dump-not "Data access with gaps" "vect" } } */ -/* { dg-final { scan-tree-dump-not "epilog loop required" "vect" } } */ +/* { dg-final { scan-tree-dump-not "epilog loop required" "vect" { xfail vect_variable_length } } } */ From patchwork Wed Nov 8 15:16:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 118281 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5415195qgn; Wed, 8 Nov 2017 07:17:01 -0800 (PST) X-Google-Smtp-Source: ABhQp+TqHurMDAIOV0/ZoOWr0yNhrKgQC7yP4Pe0lY4m6JM3GSqNb/pFR1hIkAJA7LSuIvc3sR2Q X-Received: by 10.98.3.7 with SMTP id 7mr866123pfd.160.1510154221740; Wed, 08 Nov 2017 07:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510154221; cv=none; d=google.com; s=arc-20160816; b=xyOUWL3rtKQkEeLwlbKUPkS0JJ4VUMvcrmoAMu7i/3rM8V1pa34RKJZDI8H94wjhVp JOZNTg2fl85xR/PWEJfCWL2fDx0bkabl/0vEkzM10ZN/evssW1/oHdNXfKhyh6y/2rcw xEYFNMNa4jZt0bYLCNclVCWWZPBq5UDhJ8TnLc5N/AwAbaOmSq+1hl84ZSngPqczm+hS lKosoO4X5KNB43ab55ZpTy3iefMB2XvhfWm4Fr/1fgm7iYjLF9R+5So1Q6sgbMrVuEDI eZQc/SrJXKdMvUNdCatvebqlulTpcoPLdCEBKPwIc5SLCT1yiOiBAigJJ0hHMC7OOCIk +7EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:mail-followup-to:to:from:delivered-to:sender:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=DHrXvF4+Wj3dEF+mixQwE4x0KGWBQLe01ZtpGjWL/4c=; b=uFylEYY9dOYgXHyQ/vcMCQ2WtOjGjFUSQ2m254n0ymcL/89/t2pP+zvgIyo8XyH+0o 6xr+i3Xj8ckp9LrmA0uN1diIIu6OYJxq1mISv399FIlO1k+cZW8d+3pm2tlBAAsHLCh0 is7bby8Z9Tg40emycXS9G0d7jUl5JqSJD5OSMtZ9riYg0z87OoypSgS9h4+FxnFakjZW cHJPIFMYuIZ3CMLVn/sCLmhikofCYLQjSBRIYczL5p13hv0oYDXfQOGMvivx1vFeIU43 ll7nA8PyWZlbjEkjFSMeS+FAUsXl4KezztNSfmsxooWYN48ix/8aeQ3qVcxIuX4s53QW Fzcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=pvdYGqOq; spf=pass (google.com: domain of gcc-patches-return-466256-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-466256-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id p7si4143111pgr.173.2017.11.08.07.17.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Nov 2017 07:17:01 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-466256-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=pvdYGqOq; spf=pass (google.com: domain of gcc-patches-return-466256-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-466256-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=YdINqKhfPJdwhUWg +YNwKgBxF8kcBcBYIeBftlLHlLp3D1j/B3qNpkQ79xNG67AMAKYXg9Iso1zZVuN2 r+KI0BvvFMAQlHYIB4ocMH9iyrBPowmOudJZp1FVXqoJ3om/ttnTWHHECFPfYOXa kH5Gztdc8sAEI8Z4iU8XWQdXBWQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=ZeJi4ZRlLaW1/iYSKWx7cd oIZmI=; b=pvdYGqOqIDGiXL2ghIWRI/A4cPvfX/vokl2EF5y57kd0K/IRGSTtup YPl+xEUIkHh8106wVsBq5y1lF3Doj/ixfYaQhzeeAq2pqQjzLV0EwPpbK30mUHcR FIIIGrHISBMk0SUKJSfn9oLLPkNDbC97TDSx2+TQiK7HOATx2/oOc= Received: (qmail 110221 invoked by alias); 8 Nov 2017 15:16:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 110191 invoked by uid 89); 8 Nov 2017 15:16:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f43.google.com Received: from mail-wm0-f43.google.com (HELO mail-wm0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Nov 2017 15:16:28 +0000 Received: by mail-wm0-f43.google.com with SMTP id r68so11188294wmr.1 for ; Wed, 08 Nov 2017 07:16:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version; bh=DHrXvF4+Wj3dEF+mixQwE4x0KGWBQLe01ZtpGjWL/4c=; b=erdDW/R3LIbFDrNlepmbycBvbNVQNnf5atznsVGmq975LlxNXLA/GQ6UUenKkrVl+/ SrjgcgIWlshEb7M3YcNSpAiQmtx5jRkOzK0aVGzOX+pYynFx8jBkosEUw3EbWR+UXtJR HPfZEYYcCTJMzL74E0f0mUf50BNlZSUuw8MjDYnuNuthv8qAju/fTVvAaB478o2888A5 wmtev8inmKBTPBneMM0HyONL1ywe8t1/dQDphuYScy0mr5kHvOarAG6t8I0DXQEWtnBF 4rafPtedXd8XqUtmjwODYGXH9wj/Q0kLIdWzst958FRO8xK1LpGlBFpMNSnNbrCXfloS PypQ== X-Gm-Message-State: AJaThX6JhJ4ge+Rnz7jR8j5Uvtg4bX98gXLyMV5DJc0LOGTu/Q33ZzI4 0MKW0ABERfQHOUQAyzfMEN4d40egvd0= X-Received: by 10.28.74.86 with SMTP id x83mr765825wma.146.1510154184312; Wed, 08 Nov 2017 07:16:24 -0800 (PST) Received: from localhost (94.197.121.218.threembb.co.uk. [94.197.121.218]) by smtp.gmail.com with ESMTPSA id j4sm1712253wrg.11.2017.11.08.07.16.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Nov 2017 07:16:23 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.earnshaw@arm.com, james.greenhalgh@arm.com, marcus.shawcroft@arm.com, richard.sandiford@linaro.org Cc: richard.earnshaw@arm.com, james.greenhalgh@arm.com, marcus.shawcroft@arm.com Subject: [4/4] [AArch64] Tests for SVE structure modes References: <87375oyfen.fsf@linaro.org> Date: Wed, 08 Nov 2017 15:16:21 +0000 In-Reply-To: <87375oyfen.fsf@linaro.org> (Richard Sandiford's message of "Wed, 08 Nov 2017 15:10:56 +0000") Message-ID: <87k1z0x0l6.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 This patch adds tests for the SVE structure mode move patterns and for LD[234] and ST[234] vectorisation. 2017-11-08 Richard Sandiford Alan Hayward David Sherwood gcc/testsuite/ * gcc.target/aarch64/sve_struct_move_1.c: New test. * gcc.target/aarch64/sve_struct_move_2.c: Likewise. * gcc.target/aarch64/sve_struct_move_3.c: Likewise. * gcc.target/aarch64/sve_struct_move_4.c: Likewise. * gcc.target/aarch64/sve_struct_move_5.c: Likewise. * gcc.target/aarch64/sve_struct_move_6.c: Likewise. * gcc.target/aarch64/sve_struct_vect_1.c: Likewise. * gcc.target/aarch64/sve_struct_vect_1_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_2.c: Likewise. * gcc.target/aarch64/sve_struct_vect_2_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_3.c: Likewise. * gcc.target/aarch64/sve_struct_vect_3_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_4.c: Likewise. * gcc.target/aarch64/sve_struct_vect_4_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_5.c: Likewise. * gcc.target/aarch64/sve_struct_vect_5_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_6.c: Likewise. * gcc.target/aarch64/sve_struct_vect_6_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_7.c: Likewise. * gcc.target/aarch64/sve_struct_vect_7_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_8.c: Likewise. * gcc.target/aarch64/sve_struct_vect_8_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_9.c: Likewise. * gcc.target/aarch64/sve_struct_vect_9_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_10.c: Likewise. * gcc.target/aarch64/sve_struct_vect_10_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_11.c: Likewise. * gcc.target/aarch64/sve_struct_vect_11_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_12.c: Likewise. * gcc.target/aarch64/sve_struct_vect_12_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_13.c: Likewise. * gcc.target/aarch64/sve_struct_vect_13_run.c: Likewise. * gcc.target/aarch64/sve_struct_vect_14.c: Likewise. * gcc.target/aarch64/sve_struct_vect_15.c: Likewise. * gcc.target/aarch64/sve_struct_vect_16.c: Likewise. * gcc.target/aarch64/sve_struct_vect_17.c: Likewise. Index: gcc/testsuite/gcc.target/aarch64/sve_struct_move_1.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_move_1.c 2017-11-08 15:06:27.247849138 +0000 @@ -0,0 +1,129 @@ +/* { dg-do assemble } */ +/* { dg-options "-O -march=armv8-a+sve -msve-vector-bits=256 -mbig-endian --save-temps" } */ + +typedef char v32qi __attribute__((vector_size(32))); +typedef struct { v32qi a[2]; } v64qi; + +typedef short v16hi __attribute__((vector_size(32))); +typedef struct { v16hi a[2]; } v32hi; + +typedef int v8si __attribute__((vector_size(32))); +typedef struct { v8si a[2]; } v16si; + +typedef long v4di __attribute__((vector_size(32))); +typedef struct { v4di a[2]; } v8di; + +typedef _Float16 v16hf __attribute__((vector_size(32))); +typedef struct { v16hf a[2]; } v32hf; + +typedef float v8sf __attribute__((vector_size(32))); +typedef struct { v8sf a[2]; } v16sf; + +typedef double v4df __attribute__((vector_size(32))); +typedef struct { v4df a[2]; } v8df; + +#define TEST_TYPE(TYPE, REG1, REG2) \ + void \ + f1_##TYPE (TYPE *a) \ + { \ + register TYPE x asm (#REG1) = a[0]; \ + asm volatile ("# test " #TYPE " 1 %S0" :: "w" (x)); \ + register TYPE y asm (#REG2) = x; \ + asm volatile ("# test " #TYPE " 2 %S0, %S1, %S2" \ + : "=&w" (x) : "0" (x), "w" (y)); \ + a[1] = x; \ + } \ + /* This must compile, but we don't care how. */ \ + void \ + f2_##TYPE (TYPE *a) \ + { \ + TYPE x = a[0]; \ + x.a[0][3] = 1; \ + x.a[1][2] = 12; \ + asm volatile ("# %0" :: "w" (x)); \ + } \ + void \ + f3_##TYPE (TYPE *a, int i) \ + { \ + TYPE x = a[0]; \ + x.a[0][i] = 1; \ + asm volatile ("# %0" :: "w" (x)); \ + } \ + void \ + f4_##TYPE (TYPE *a, int i, int j) \ + { \ + TYPE x = a[0]; \ + x.a[i][j] = 44; \ + asm volatile ("# %0" :: "w" (x)); \ + } + +TEST_TYPE (v64qi, z0, z2) +TEST_TYPE (v32hi, z5, z7) +TEST_TYPE (v16si, z10, z12) +TEST_TYPE (v8di, z15, z17) +TEST_TYPE (v32hf, z18, z20) +TEST_TYPE (v16sf, z21, z23) +TEST_TYPE (v8df, z28, z30) + +/* { dg-final { scan-assembler {\tld1b\tz0.b, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1b\tz1.b, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v64qi 1 z0\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz2.d, z0.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz3.d, z1.d\n} } } */ +/* { dg-final { scan-assembler { test v64qi 2 z0, z0, z2\n} } } */ +/* { dg-final { scan-assembler {\tst1b\tz0.b, p[0-7], \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1b\tz1.b, p[0-7], \[x0, #3, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1h\tz5.h, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz6.h, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v32hi 1 z5\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz7.d, z5.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz8.d, z6.d\n} } } */ +/* { dg-final { scan-assembler { test v32hi 2 z5, z5, z7\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz5.h, p[0-7], \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz6.h, p[0-7], \[x0, #3, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1w\tz10.s, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz11.s, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v16si 1 z10\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz12.d, z10.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz13.d, z11.d\n} } } */ +/* { dg-final { scan-assembler { test v16si 2 z10, z10, z12\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz10.s, p[0-7], \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz11.s, p[0-7], \[x0, #3, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1d\tz15.d, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz16.d, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v8di 1 z15\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz17.d, z15.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz18.d, z16.d\n} } } */ +/* { dg-final { scan-assembler { test v8di 2 z15, z15, z17\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz15.d, p[0-7], \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz16.d, p[0-7], \[x0, #3, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1h\tz18.h, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz19.h, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v32hf 1 z18\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz20.d, z18.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz21.d, z19.d\n} } } */ +/* { dg-final { scan-assembler { test v32hf 2 z18, z18, z20\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz18.h, p[0-7], \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz19.h, p[0-7], \[x0, #3, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1w\tz21.s, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz22.s, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v16sf 1 z21\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz23.d, z21.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz24.d, z22.d\n} } } */ +/* { dg-final { scan-assembler { test v16sf 2 z21, z21, z23\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz21.s, p[0-7], \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz22.s, p[0-7], \[x0, #3, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1d\tz28.d, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz29.d, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v8df 1 z28\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz30.d, z28.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz31.d, z29.d\n} } } */ +/* { dg-final { scan-assembler { test v8df 2 z28, z28, z30\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz28.d, p[0-7], \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz29.d, p[0-7], \[x0, #3, mul vl\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_move_2.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_move_2.c 2017-11-08 15:06:27.247849138 +0000 @@ -0,0 +1,127 @@ +/* { dg-do assemble } */ +/* { dg-options "-O -march=armv8-a+sve -msve-vector-bits=256 -mbig-endian --save-temps" } */ + +typedef char v32qi __attribute__((vector_size(32))); +typedef struct { v32qi a[3]; } v96qi; + +typedef short v16hi __attribute__((vector_size(32))); +typedef struct { v16hi a[3]; } v48hi; + +typedef int v8si __attribute__((vector_size(32))); +typedef struct { v8si a[3]; } v24si; + +typedef long v4di __attribute__((vector_size(32))); +typedef struct { v4di a[3]; } v12di; + +typedef _Float16 v16hf __attribute__((vector_size(32))); +typedef struct { v16hf a[3]; } v48hf; + +typedef float v8sf __attribute__((vector_size(32))); +typedef struct { v8sf a[3]; } v24sf; + +typedef double v4df __attribute__((vector_size(32))); +typedef struct { v4df a[3]; } v12df; + +#define TEST_TYPE(TYPE, REG1, REG2) \ + void \ + f_##TYPE (TYPE *a) \ + { \ + register TYPE x asm (#REG1) = a[0]; \ + asm volatile ("# test " #TYPE " 1 %S0" :: "w" (x)); \ + register TYPE y asm (#REG2) = x; \ + asm volatile ("# test " #TYPE " 2 %S0, %S1, %S2" \ + : "=&w" (x) : "0" (x), "w" (y)); \ + a[1] = x; \ + } + +TEST_TYPE (v96qi, z0, z3) +TEST_TYPE (v48hi, z6, z2) +TEST_TYPE (v24si, z12, z15) +TEST_TYPE (v12di, z16, z13) +TEST_TYPE (v48hf, z18, z1) +TEST_TYPE (v24sf, z20, z23) +TEST_TYPE (v12df, z26, z29) + +/* { dg-final { scan-assembler {\tld1b\tz0.b, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1b\tz1.b, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1b\tz2.b, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v96qi 1 z0\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz3.d, z0.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz4.d, z1.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz5.d, z2.d\n} } } */ +/* { dg-final { scan-assembler { test v96qi 2 z0, z0, z3\n} } } */ +/* { dg-final { scan-assembler {\tst1b\tz0.b, p[0-7], \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1b\tz1.b, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1b\tz2.b, p[0-7], \[x0, #5, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1h\tz6.h, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz7.h, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz8.h, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v48hi 1 z6\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz2.d, z6.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz3.d, z7.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz4.d, z8.d\n} } } */ +/* { dg-final { scan-assembler { test v48hi 2 z6, z6, z2\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz6.h, p[0-7], \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz7.h, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz8.h, p[0-7], \[x0, #5, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1w\tz12.s, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz13.s, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz14.s, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v24si 1 z12\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz15.d, z12.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz16.d, z13.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz17.d, z14.d\n} } } */ +/* { dg-final { scan-assembler { test v24si 2 z12, z12, z15\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz12.s, p[0-7], \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz13.s, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz14.s, p[0-7], \[x0, #5, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1d\tz16.d, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz17.d, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz18.d, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v12di 1 z16\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz13.d, z16.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz14.d, z17.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz15.d, z18.d\n} } } */ +/* { dg-final { scan-assembler { test v12di 2 z16, z16, z13\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz16.d, p[0-7], \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz17.d, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz18.d, p[0-7], \[x0, #5, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1h\tz18.h, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz19.h, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz20.h, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v48hf 1 z18\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz1.d, z18.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz2.d, z19.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz3.d, z20.d\n} } } */ +/* { dg-final { scan-assembler { test v48hf 2 z18, z18, z1\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz18.h, p[0-7], \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz19.h, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz20.h, p[0-7], \[x0, #5, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1w\tz20.s, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz21.s, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz22.s, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v24sf 1 z20\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz23.d, z20.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz24.d, z21.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz25.d, z22.d\n} } } */ +/* { dg-final { scan-assembler { test v24sf 2 z20, z20, z23\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz20.s, p[0-7], \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz21.s, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz22.s, p[0-7], \[x0, #5, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1d\tz26.d, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz27.d, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz28.d, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v12df 1 z26\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz29.d, z26.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz30.d, z27.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz31.d, z28.d\n} } } */ +/* { dg-final { scan-assembler { test v12df 2 z26, z26, z29\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz26.d, p[0-7], \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz27.d, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz28.d, p[0-7], \[x0, #5, mul vl\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_move_3.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_move_3.c 2017-11-08 15:06:27.247849138 +0000 @@ -0,0 +1,148 @@ +/* { dg-do assemble } */ +/* { dg-options "-O -march=armv8-a+sve -msve-vector-bits=256 -mbig-endian --save-temps" } */ + +typedef char v32qi __attribute__((vector_size(32))); +typedef struct { v32qi a[4]; } v128qi; + +typedef short v16hi __attribute__((vector_size(32))); +typedef struct { v16hi a[4]; } v64hi; + +typedef int v8si __attribute__((vector_size(32))); +typedef struct { v8si a[4]; } v32si; + +typedef long v4di __attribute__((vector_size(32))); +typedef struct { v4di a[4]; } v16di; + +typedef _Float16 v16hf __attribute__((vector_size(32))); +typedef struct { v16hf a[4]; } v64hf; + +typedef float v8sf __attribute__((vector_size(32))); +typedef struct { v8sf a[4]; } v32sf; + +typedef double v4df __attribute__((vector_size(32))); +typedef struct { v4df a[4]; } v16df; + +#define TEST_TYPE(TYPE, REG1, REG2) \ + void \ + f_##TYPE (TYPE *a) \ + { \ + register TYPE x asm (#REG1) = a[0]; \ + asm volatile ("# test " #TYPE " 1 %S0" :: "w" (x)); \ + register TYPE y asm (#REG2) = x; \ + asm volatile ("# test " #TYPE " 2 %S0, %S1, %S2" \ + : "=&w" (x) : "0" (x), "w" (y)); \ + a[1] = x; \ + } + +TEST_TYPE (v128qi, z0, z4) +TEST_TYPE (v64hi, z6, z2) +TEST_TYPE (v32si, z12, z16) +TEST_TYPE (v16di, z17, z13) +TEST_TYPE (v64hf, z18, z1) +TEST_TYPE (v32sf, z20, z16) +TEST_TYPE (v16df, z24, z28) + +/* { dg-final { scan-assembler {\tld1b\tz0.b, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1b\tz1.b, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1b\tz2.b, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1b\tz3.b, p[0-7]/z, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v128qi 1 z0\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz4.d, z0.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz5.d, z1.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz6.d, z2.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz7.d, z3.d\n} } } */ +/* { dg-final { scan-assembler { test v128qi 2 z0, z0, z4\n} } } */ +/* { dg-final { scan-assembler {\tst1b\tz0.b, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1b\tz1.b, p[0-7], \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1b\tz2.b, p[0-7], \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1b\tz3.b, p[0-7], \[x0, #7, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1h\tz6.h, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz7.h, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz8.h, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz9.h, p[0-7]/z, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v64hi 1 z6\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz2.d, z6.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz3.d, z7.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz4.d, z8.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz5.d, z9.d\n} } } */ +/* { dg-final { scan-assembler { test v64hi 2 z6, z6, z2\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz6.h, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz7.h, p[0-7], \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz8.h, p[0-7], \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz9.h, p[0-7], \[x0, #7, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1w\tz12.s, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz13.s, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz14.s, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz15.s, p[0-7]/z, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v32si 1 z12\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz16.d, z12.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz17.d, z13.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz18.d, z14.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz19.d, z15.d\n} } } */ +/* { dg-final { scan-assembler { test v32si 2 z12, z12, z16\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz12.s, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz13.s, p[0-7], \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz14.s, p[0-7], \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz15.s, p[0-7], \[x0, #7, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1d\tz17.d, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz18.d, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz19.d, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz20.d, p[0-7]/z, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v16di 1 z17\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz13.d, z17.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz14.d, z18.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz15.d, z19.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz16.d, z20.d\n} } } */ +/* { dg-final { scan-assembler { test v16di 2 z17, z17, z13\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz17.d, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz18.d, p[0-7], \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz19.d, p[0-7], \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz20.d, p[0-7], \[x0, #7, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1h\tz18.h, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz19.h, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz20.h, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1h\tz21.h, p[0-7]/z, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v64hf 1 z18\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz1.d, z18.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz2.d, z19.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz3.d, z20.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz4.d, z21.d\n} } } */ +/* { dg-final { scan-assembler { test v64hf 2 z18, z18, z1\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz18.h, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz19.h, p[0-7], \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz20.h, p[0-7], \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1h\tz21.h, p[0-7], \[x0, #7, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1w\tz20.s, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz21.s, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz22.s, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1w\tz23.s, p[0-7]/z, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v32sf 1 z20\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz16.d, z20.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz17.d, z21.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz18.d, z22.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz19.d, z23.d\n} } } */ +/* { dg-final { scan-assembler { test v32sf 2 z20, z20, z16\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz20.s, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz21.s, p[0-7], \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz22.s, p[0-7], \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1w\tz23.s, p[0-7], \[x0, #7, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tld1d\tz24.d, p[0-7]/z, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz25.d, p[0-7]/z, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz26.d, p[0-7]/z, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tld1d\tz27.d, p[0-7]/z, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v16df 1 z24\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz28.d, z24.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz29.d, z25.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz30.d, z26.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz31.d, z27.d\n} } } */ +/* { dg-final { scan-assembler { test v16df 2 z24, z24, z28\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz24.d, p[0-7], \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz25.d, p[0-7], \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz26.d, p[0-7], \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tst1d\tz27.d, p[0-7], \[x0, #7, mul vl\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_move_4.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_move_4.c 2017-11-08 15:06:27.247849138 +0000 @@ -0,0 +1,116 @@ +/* { dg-do assemble } */ +/* { dg-options "-O -march=armv8-a+sve -msve-vector-bits=256 -mlittle-endian --save-temps" } */ + +typedef char v32qi __attribute__((vector_size(32))); +typedef struct { v32qi a[2]; } v64qi; + +typedef short v16hi __attribute__((vector_size(32))); +typedef struct { v16hi a[2]; } v32hi; + +typedef int v8si __attribute__((vector_size(32))); +typedef struct { v8si a[2]; } v16si; + +typedef long v4di __attribute__((vector_size(32))); +typedef struct { v4di a[2]; } v8di; + +typedef float v8sf __attribute__((vector_size(32))); +typedef struct { v8sf a[2]; } v16sf; + +typedef double v4df __attribute__((vector_size(32))); +typedef struct { v4df a[2]; } v8df; + +#define TEST_TYPE(TYPE, REG1, REG2) \ + void \ + f1_##TYPE (TYPE *a) \ + { \ + register TYPE x asm (#REG1) = a[0]; \ + asm volatile ("# test " #TYPE " 1 %S0" :: "w" (x)); \ + register TYPE y asm (#REG2) = x; \ + asm volatile ("# test " #TYPE " 2 %S0, %S1, %S2" \ + : "=&w" (x) : "0" (x), "w" (y)); \ + a[1] = x; \ + } \ + /* This must compile, but we don't care how. */ \ + void \ + f2_##TYPE (TYPE *a) \ + { \ + TYPE x = a[0]; \ + x.a[0][3] = 1; \ + x.a[1][2] = 12; \ + asm volatile ("# %0" :: "w" (x)); \ + } \ + void \ + f3_##TYPE (TYPE *a, int i) \ + { \ + TYPE x = a[0]; \ + x.a[0][i] = 1; \ + asm volatile ("# %0" :: "w" (x)); \ + } \ + void \ + f4_##TYPE (TYPE *a, int i, int j) \ + { \ + TYPE x = a[0]; \ + x.a[i][j] = 44; \ + asm volatile ("# %0" :: "w" (x)); \ + } + +TEST_TYPE (v64qi, z0, z2) +TEST_TYPE (v32hi, z5, z7) +TEST_TYPE (v16si, z10, z12) +TEST_TYPE (v8di, z15, z17) +TEST_TYPE (v16sf, z20, z23) +TEST_TYPE (v8df, z28, z30) + +/* { dg-final { scan-assembler {\tldr\tz0, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz1, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v64qi 1 z0\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz2.d, z0.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz3.d, z1.d\n} } } */ +/* { dg-final { scan-assembler { test v64qi 2 z0, z0, z2\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz0, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz1, \[x0, #3, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz5, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz6, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v32hi 1 z5\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz7.d, z5.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz8.d, z6.d\n} } } */ +/* { dg-final { scan-assembler { test v32hi 2 z5, z5, z7\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz5, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz6, \[x0, #3, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz10, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz11, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v16si 1 z10\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz12.d, z10.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz13.d, z11.d\n} } } */ +/* { dg-final { scan-assembler { test v16si 2 z10, z10, z12\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz10, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz11, \[x0, #3, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz15, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz16, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v8di 1 z15\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz17.d, z15.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz18.d, z16.d\n} } } */ +/* { dg-final { scan-assembler { test v8di 2 z15, z15, z17\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz15, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz16, \[x0, #3, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz20, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz21, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v16sf 1 z20\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz23.d, z20.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz24.d, z21.d\n} } } */ +/* { dg-final { scan-assembler { test v16sf 2 z20, z20, z23\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz20, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz21, \[x0, #3, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz28, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz29, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v8df 1 z28\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz30.d, z28.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz31.d, z29.d\n} } } */ +/* { dg-final { scan-assembler { test v8df 2 z28, z28, z30\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz28, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz29, \[x0, #3, mul vl\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_move_5.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_move_5.c 2017-11-08 15:06:27.248849138 +0000 @@ -0,0 +1,111 @@ +/* { dg-do assemble } */ +/* { dg-options "-O -march=armv8-a+sve -msve-vector-bits=256 -mlittle-endian --save-temps" } */ + +typedef char v32qi __attribute__((vector_size(32))); +typedef struct { v32qi a[3]; } v96qi; + +typedef short v16hi __attribute__((vector_size(32))); +typedef struct { v16hi a[3]; } v48hi; + +typedef int v8si __attribute__((vector_size(32))); +typedef struct { v8si a[3]; } v24si; + +typedef long v4di __attribute__((vector_size(32))); +typedef struct { v4di a[3]; } v12di; + +typedef float v8sf __attribute__((vector_size(32))); +typedef struct { v8sf a[3]; } v24sf; + +typedef double v4df __attribute__((vector_size(32))); +typedef struct { v4df a[3]; } v12df; + +#define TEST_TYPE(TYPE, REG1, REG2) \ + void \ + f_##TYPE (TYPE *a) \ + { \ + register TYPE x asm (#REG1) = a[0]; \ + asm volatile ("# test " #TYPE " 1 %S0" :: "w" (x)); \ + register TYPE y asm (#REG2) = x; \ + asm volatile ("# test " #TYPE " 2 %S0, %S1, %S2" \ + : "=&w" (x) : "0" (x), "w" (y)); \ + a[1] = x; \ + } + +TEST_TYPE (v96qi, z0, z3) +TEST_TYPE (v48hi, z6, z2) +TEST_TYPE (v24si, z12, z15) +TEST_TYPE (v12di, z16, z13) +TEST_TYPE (v24sf, z20, z23) +TEST_TYPE (v12df, z26, z29) + +/* { dg-final { scan-assembler {\tldr\tz0, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz1, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz2, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v96qi 1 z0\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz3.d, z0.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz4.d, z1.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz5.d, z2.d\n} } } */ +/* { dg-final { scan-assembler { test v96qi 2 z0, z0, z3\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz0, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz1, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz2, \[x0, #5, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz6, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz7, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz8, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v48hi 1 z6\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz2.d, z6.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz3.d, z7.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz4.d, z8.d\n} } } */ +/* { dg-final { scan-assembler { test v48hi 2 z6, z6, z2\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz6, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz7, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz8, \[x0, #5, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz12, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz13, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz14, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v24si 1 z12\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz15.d, z12.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz16.d, z13.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz17.d, z14.d\n} } } */ +/* { dg-final { scan-assembler { test v24si 2 z12, z12, z15\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz12, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz13, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz14, \[x0, #5, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz16, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz17, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz18, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v12di 1 z16\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz13.d, z16.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz14.d, z17.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz15.d, z18.d\n} } } */ +/* { dg-final { scan-assembler { test v12di 2 z16, z16, z13\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz16, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz17, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz18, \[x0, #5, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz20, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz21, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz22, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v24sf 1 z20\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz23.d, z20.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz24.d, z21.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz25.d, z22.d\n} } } */ +/* { dg-final { scan-assembler { test v24sf 2 z20, z20, z23\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz20, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz21, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz22, \[x0, #5, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz26, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz27, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz28, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v12df 1 z26\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz29.d, z26.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz30.d, z27.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz31.d, z28.d\n} } } */ +/* { dg-final { scan-assembler { test v12df 2 z26, z26, z29\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz26, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz27, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz28, \[x0, #5, mul vl\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_move_6.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_move_6.c 2017-11-08 15:06:27.248849138 +0000 @@ -0,0 +1,129 @@ +/* { dg-do assemble } */ +/* { dg-options "-O -march=armv8-a+sve -msve-vector-bits=256 -mlittle-endian --save-temps" } */ + +typedef char v32qi __attribute__((vector_size(32))); +typedef struct { v32qi a[4]; } v128qi; + +typedef short v16hi __attribute__((vector_size(32))); +typedef struct { v16hi a[4]; } v64hi; + +typedef int v8si __attribute__((vector_size(32))); +typedef struct { v8si a[4]; } v32si; + +typedef long v4di __attribute__((vector_size(32))); +typedef struct { v4di a[4]; } v16di; + +typedef float v8sf __attribute__((vector_size(32))); +typedef struct { v8sf a[4]; } v32sf; + +typedef double v4df __attribute__((vector_size(32))); +typedef struct { v4df a[4]; } v16df; + +#define TEST_TYPE(TYPE, REG1, REG2) \ + void \ + f_##TYPE (TYPE *a) \ + { \ + register TYPE x asm (#REG1) = a[0]; \ + asm volatile ("# test " #TYPE " 1 %S0" :: "w" (x)); \ + register TYPE y asm (#REG2) = x; \ + asm volatile ("# test " #TYPE " 2 %S0, %S1, %S2" \ + : "=&w" (x) : "0" (x), "w" (y)); \ + a[1] = x; \ + } + +TEST_TYPE (v128qi, z0, z4) +TEST_TYPE (v64hi, z6, z2) +TEST_TYPE (v32si, z12, z16) +TEST_TYPE (v16di, z17, z13) +TEST_TYPE (v32sf, z20, z16) +TEST_TYPE (v16df, z24, z28) + +/* { dg-final { scan-assembler {\tldr\tz0, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz1, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz2, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz3, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v128qi 1 z0\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz4.d, z0.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz5.d, z1.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz6.d, z2.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz7.d, z3.d\n} } } */ +/* { dg-final { scan-assembler { test v128qi 2 z0, z0, z4\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz0, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz1, \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz2, \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz3, \[x0, #7, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz6, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz7, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz8, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz9, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v64hi 1 z6\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz2.d, z6.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz3.d, z7.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz4.d, z8.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz5.d, z9.d\n} } } */ +/* { dg-final { scan-assembler { test v64hi 2 z6, z6, z2\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz6, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz7, \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz8, \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz9, \[x0, #7, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz12, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz13, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz14, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz15, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v32si 1 z12\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz16.d, z12.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz17.d, z13.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz18.d, z14.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz19.d, z15.d\n} } } */ +/* { dg-final { scan-assembler { test v32si 2 z12, z12, z16\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz12, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz13, \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz14, \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz15, \[x0, #7, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz17, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz18, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz19, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz20, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v16di 1 z17\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz13.d, z17.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz14.d, z18.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz15.d, z19.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz16.d, z20.d\n} } } */ +/* { dg-final { scan-assembler { test v16di 2 z17, z17, z13\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz17, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz18, \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz19, \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz20, \[x0, #7, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz20, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz21, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz22, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz23, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v32sf 1 z20\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz16.d, z20.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz17.d, z21.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz18.d, z22.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz19.d, z23.d\n} } } */ +/* { dg-final { scan-assembler { test v32sf 2 z20, z20, z16\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz20, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz21, \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz22, \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz23, \[x0, #7, mul vl\]\n} } } */ + +/* { dg-final { scan-assembler {\tldr\tz24, \[x0\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz25, \[x0, #1, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz26, \[x0, #2, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tldr\tz27, \[x0, #3, mul vl\]\n} } } */ +/* { dg-final { scan-assembler { test v16df 1 z24\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz28.d, z24.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz29.d, z25.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz30.d, z26.d\n} } } */ +/* { dg-final { scan-assembler {\tmov\tz31.d, z27.d\n} } } */ +/* { dg-final { scan-assembler { test v16df 2 z24, z24, z28\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz24, \[x0, #4, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz25, \[x0, #5, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz26, \[x0, #6, mul vl\]\n} } } */ +/* { dg-final { scan-assembler {\tstr\tz27, \[x0, #7, mul vl\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_1.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_1.c 2017-11-08 15:06:27.248849138 +0000 @@ -0,0 +1,89 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#ifndef TYPE +#define TYPE unsigned char +#endif + +#ifndef NAME +#define NAME(X) X +#endif + +#define N 1024 + +void __attribute__ ((noinline, noclone)) +NAME(f2) (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c) +{ + for (int i = 0; i < N; ++i) + { + a[i] = c[i * 2]; + b[i] = c[i * 2 + 1]; + } +} + +void __attribute__ ((noinline, noclone)) +NAME(f3) (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c, + TYPE *__restrict d) +{ + for (int i = 0; i < N; ++i) + { + a[i] = d[i * 3]; + b[i] = d[i * 3 + 1]; + c[i] = d[i * 3 + 2]; + } +} + +void __attribute__ ((noinline, noclone)) +NAME(f4) (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c, + TYPE *__restrict d, TYPE *__restrict e) +{ + for (int i = 0; i < N; ++i) + { + a[i] = e[i * 4]; + b[i] = e[i * 4 + 1]; + c[i] = e[i * 4 + 2]; + d[i] = e[i * 4 + 3]; + } +} + +void __attribute__ ((noinline, noclone)) +NAME(g2) (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c) +{ + for (int i = 0; i < N; ++i) + { + c[i * 2] = a[i]; + c[i * 2 + 1] = b[i]; + } +} + +void __attribute__ ((noinline, noclone)) +NAME(g3) (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c, + TYPE *__restrict d) +{ + for (int i = 0; i < N; ++i) + { + d[i * 3] = a[i]; + d[i * 3 + 1] = b[i]; + d[i * 3 + 2] = c[i]; + } +} + +void __attribute__ ((noinline, noclone)) +NAME(g4) (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c, + TYPE *__restrict d, TYPE *__restrict e) +{ + for (int i = 0; i < N; ++i) + { + e[i * 4] = a[i]; + e[i * 4 + 1] = b[i]; + e[i * 4 + 2] = c[i]; + e[i * 4 + 3] = d[i]; + } +} + +/* { dg-final { scan-assembler {\tld2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_1_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_1_run.c 2017-11-08 15:06:27.249849138 +0000 @@ -0,0 +1,63 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#include "sve_struct_vect_1.c" + +TYPE a[N], b[N], c[N], d[N], e[N * 4]; + +void __attribute__ ((noinline, noclone)) +init_array (TYPE *array, int n, TYPE base, TYPE step) +{ + for (int i = 0; i < n; ++i) + array[i] = base + step * i; +} + +void __attribute__ ((noinline, noclone)) +check_array (TYPE *array, int n, TYPE base, TYPE step) +{ + for (int i = 0; i < n; ++i) + if (array[i] != (TYPE) (base + step * i)) + __builtin_abort (); +} + +int __attribute__ ((optimize (1))) +main (void) +{ + init_array (e, 2 * N, 11, 5); + f2 (a, b, e); + check_array (a, N, 11, 10); + check_array (b, N, 16, 10); + + init_array (e, 3 * N, 7, 6); + f3 (a, b, c, e); + check_array (a, N, 7, 18); + check_array (b, N, 13, 18); + check_array (c, N, 19, 18); + + init_array (e, 4 * N, 4, 11); + f4 (a, b, c, d, e); + check_array (a, N, 4, 44); + check_array (b, N, 15, 44); + check_array (c, N, 26, 44); + check_array (d, N, 37, 44); + + init_array (a, N, 2, 8); + init_array (b, N, 6, 8); + g2 (a, b, e); + check_array (e, 2 * N, 2, 4); + + init_array (a, N, 4, 15); + init_array (b, N, 9, 15); + init_array (c, N, 14, 15); + g3 (a, b, c, e); + check_array (e, 3 * N, 4, 5); + + init_array (a, N, 14, 36); + init_array (b, N, 23, 36); + init_array (c, N, 32, 36); + init_array (d, N, 41, 36); + g4 (a, b, c, d, e); + check_array (e, 4 * N, 14, 9); + + return 0; +} Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_2.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_2.c 2017-11-08 15:06:27.249849138 +0000 @@ -0,0 +1,12 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned short +#include "sve_struct_vect_1.c" + +/* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_2_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_2_run.c 2017-11-08 15:06:27.250849138 +0000 @@ -0,0 +1,5 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned short +#include "sve_struct_vect_1_run.c" Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_3.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_3.c 2017-11-08 15:06:27.250849138 +0000 @@ -0,0 +1,12 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned int +#include "sve_struct_vect_1.c" + +/* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_3_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_3_run.c 2017-11-08 15:06:27.250849138 +0000 @@ -0,0 +1,5 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned int +#include "sve_struct_vect_1_run.c" Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_4.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_4.c 2017-11-08 15:06:27.250849138 +0000 @@ -0,0 +1,12 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned long +#include "sve_struct_vect_1.c" + +/* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_4_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_4_run.c 2017-11-08 15:06:27.250849138 +0000 @@ -0,0 +1,5 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned long +#include "sve_struct_vect_1_run.c" Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_5.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_5.c 2017-11-08 15:06:27.250849138 +0000 @@ -0,0 +1,12 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE float +#include "sve_struct_vect_1.c" + +/* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_5_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_5_run.c 2017-11-08 15:06:27.250849138 +0000 @@ -0,0 +1,5 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE float +#include "sve_struct_vect_1_run.c" Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_6.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_6.c 2017-11-08 15:06:27.250849138 +0000 @@ -0,0 +1,12 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE double +#include "sve_struct_vect_1.c" + +/* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_6_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_6_run.c 2017-11-08 15:06:27.250849138 +0000 @@ -0,0 +1,5 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE double +#include "sve_struct_vect_1_run.c" Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_7.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_7.c 2017-11-08 15:06:27.250849138 +0000 @@ -0,0 +1,84 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#ifndef TYPE +#define TYPE unsigned char +#define ITYPE signed char +#endif + +void __attribute__ ((noinline, noclone)) +f2 (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c, ITYPE n) +{ + for (ITYPE i = 0; i < n; ++i) + { + a[i] = c[i * 2]; + b[i] = c[i * 2 + 1]; + } +} + +void __attribute__ ((noinline, noclone)) +f3 (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c, + TYPE *__restrict d, ITYPE n) +{ + for (ITYPE i = 0; i < n; ++i) + { + a[i] = d[i * 3]; + b[i] = d[i * 3 + 1]; + c[i] = d[i * 3 + 2]; + } +} + +void __attribute__ ((noinline, noclone)) +f4 (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c, + TYPE *__restrict d, TYPE *__restrict e, ITYPE n) +{ + for (ITYPE i = 0; i < n; ++i) + { + a[i] = e[i * 4]; + b[i] = e[i * 4 + 1]; + c[i] = e[i * 4 + 2]; + d[i] = e[i * 4 + 3]; + } +} + +void __attribute__ ((noinline, noclone)) +g2 (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c, ITYPE n) +{ + for (ITYPE i = 0; i < n; ++i) + { + c[i * 2] = a[i]; + c[i * 2 + 1] = b[i]; + } +} + +void __attribute__ ((noinline, noclone)) +g3 (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c, + TYPE *__restrict d, ITYPE n) +{ + for (ITYPE i = 0; i < n; ++i) + { + d[i * 3] = a[i]; + d[i * 3 + 1] = b[i]; + d[i * 3 + 2] = c[i]; + } +} + +void __attribute__ ((noinline, noclone)) +g4 (TYPE *__restrict a, TYPE *__restrict b, TYPE *__restrict c, + TYPE *__restrict d, TYPE *__restrict e, ITYPE n) +{ + for (ITYPE i = 0; i < n; ++i) + { + e[i * 4] = a[i]; + e[i * 4 + 1] = b[i]; + e[i * 4 + 2] = c[i]; + e[i * 4 + 3] = d[i]; + } +} + +/* { dg-final { scan-assembler {\tld2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_7_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_7_run.c 2017-11-08 15:06:27.250849138 +0000 @@ -0,0 +1,65 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#include "sve_struct_vect_7.c" + +#define N 93 + +TYPE a[N], b[N], c[N], d[N], e[N * 4]; + +void __attribute__ ((noinline, noclone)) +init_array (TYPE *array, int n, TYPE base, TYPE step) +{ + for (int i = 0; i < n; ++i) + array[i] = base + step * i; +} + +void __attribute__ ((noinline, noclone)) +check_array (TYPE *array, int n, TYPE base, TYPE step) +{ + for (int i = 0; i < n; ++i) + if (array[i] != (TYPE) (base + step * i)) + __builtin_abort (); +} + +int __attribute__ ((optimize (1))) +main (void) +{ + init_array (e, 2 * N, 11, 5); + f2 (a, b, e, N); + check_array (a, N, 11, 10); + check_array (b, N, 16, 10); + + init_array (e, 3 * N, 7, 6); + f3 (a, b, c, e, N); + check_array (a, N, 7, 18); + check_array (b, N, 13, 18); + check_array (c, N, 19, 18); + + init_array (e, 4 * N, 4, 11); + f4 (a, b, c, d, e, N); + check_array (a, N, 4, 44); + check_array (b, N, 15, 44); + check_array (c, N, 26, 44); + check_array (d, N, 37, 44); + + init_array (a, N, 2, 8); + init_array (b, N, 6, 8); + g2 (a, b, e, N); + check_array (e, 2 * N, 2, 4); + + init_array (a, N, 4, 15); + init_array (b, N, 9, 15); + init_array (c, N, 14, 15); + g3 (a, b, c, e, N); + check_array (e, 3 * N, 4, 5); + + init_array (a, N, 14, 36); + init_array (b, N, 23, 36); + init_array (c, N, 32, 36); + init_array (d, N, 41, 36); + g4 (a, b, c, d, e, N); + check_array (e, 4 * N, 14, 9); + + return 0; +} Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_8.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_8.c 2017-11-08 15:06:27.251849138 +0000 @@ -0,0 +1,13 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned short +#define ITYPE short +#include "sve_struct_vect_7.c" + +/* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_8_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_8_run.c 2017-11-08 15:06:27.251849138 +0000 @@ -0,0 +1,6 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned short +#define ITYPE short +#include "sve_struct_vect_7_run.c" Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_9.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_9.c 2017-11-08 15:06:27.251849138 +0000 @@ -0,0 +1,13 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned int +#define ITYPE int +#include "sve_struct_vect_7.c" + +/* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_9_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_9_run.c 2017-11-08 15:06:27.251849138 +0000 @@ -0,0 +1,6 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned int +#define ITYPE int +#include "sve_struct_vect_7_run.c" Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_10.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_10.c 2017-11-08 15:06:27.248849138 +0000 @@ -0,0 +1,13 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned long +#define ITYPE long +#include "sve_struct_vect_7.c" + +/* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_10_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_10_run.c 2017-11-08 15:06:27.248849138 +0000 @@ -0,0 +1,6 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE unsigned long +#define ITYPE long +#include "sve_struct_vect_7_run.c" Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_11.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_11.c 2017-11-08 15:06:27.248849138 +0000 @@ -0,0 +1,13 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE _Float16 +#define ITYPE short +#include "sve_struct_vect_7.c" + +/* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_11_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_11_run.c 2017-11-08 15:06:27.248849138 +0000 @@ -0,0 +1,6 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE _Float16 +#define ITYPE short +#include "sve_struct_vect_7_run.c" Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_12.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_12.c 2017-11-08 15:06:27.248849138 +0000 @@ -0,0 +1,13 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE float +#define ITYPE int +#include "sve_struct_vect_7.c" + +/* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_12_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_12_run.c 2017-11-08 15:06:27.248849138 +0000 @@ -0,0 +1,6 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE float +#define ITYPE int +#include "sve_struct_vect_7_run.c" Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_13.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_13.c 2017-11-08 15:06:27.249849138 +0000 @@ -0,0 +1,13 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE double +#define ITYPE long +#include "sve_struct_vect_7.c" + +/* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tld4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ +/* { dg-final { scan-assembler {\tst4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_13_run.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_13_run.c 2017-11-08 15:06:27.249849138 +0000 @@ -0,0 +1,6 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve --save-temps" } */ + +#define TYPE double +#define ITYPE long +#include "sve_struct_vect_7_run.c" Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_14.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_14.c 2017-11-08 15:06:27.249849138 +0000 @@ -0,0 +1,72 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve -msve-vector-bits=256 --save-temps" } */ + +#define TYPE unsigned char +#define NAME(X) qi_##X +#include "sve_struct_vect_1.c" +#undef NAME +#undef TYPE + +#define TYPE unsigned short +#define NAME(X) hi_##X +#include "sve_struct_vect_1.c" +#undef NAME +#undef TYPE + +#define TYPE unsigned int +#define NAME(X) si_##X +#include "sve_struct_vect_1.c" +#undef NAME +#undef TYPE + +#define TYPE unsigned long +#define NAME(X) di_##X +#include "sve_struct_vect_1.c" +#undef NAME +#undef TYPE + +#define TYPE _Float16 +#define NAME(X) hf_##X +#include "sve_struct_vect_1.c" +#undef NAME +#undef TYPE + +#define TYPE float +#define NAME(X) sf_##X +#include "sve_struct_vect_1.c" +#undef NAME +#undef TYPE + +#define TYPE double +#define NAME(X) df_##X +#include "sve_struct_vect_1.c" +#undef NAME +#undef TYPE + +/* { dg-final { scan-assembler-times {\tld2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tld3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tld4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ + +/* { dg-final { scan-assembler-times {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ + +/* { dg-final { scan-assembler-times {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ + +/* { dg-final { scan-assembler-times {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_15.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_15.c 2017-11-08 15:06:27.249849138 +0000 @@ -0,0 +1,32 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve -msve-vector-bits=512 --save-temps" } */ + +#include "sve_struct_vect_14.c" + +/* { dg-final { scan-assembler-times {\tld2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tld3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tld4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ + +/* { dg-final { scan-assembler-times {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ + +/* { dg-final { scan-assembler-times {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ + +/* { dg-final { scan-assembler-times {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_16.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_16.c 2017-11-08 15:06:27.249849138 +0000 @@ -0,0 +1,32 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve -msve-vector-bits=1024 --save-temps" } */ + +#include "sve_struct_vect_14.c" + +/* { dg-final { scan-assembler-times {\tld2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tld3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tld4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ + +/* { dg-final { scan-assembler-times {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ + +/* { dg-final { scan-assembler-times {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ + +/* { dg-final { scan-assembler-times {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */ Index: gcc/testsuite/gcc.target/aarch64/sve_struct_vect_17.c =================================================================== --- /dev/null 2017-11-08 11:04:45.353113300 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve_struct_vect_17.c 2017-11-08 15:06:27.249849138 +0000 @@ -0,0 +1,32 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2 -ftree-vectorize -march=armv8-a+sve -msve-vector-bits=2048 --save-temps" } */ + +#include "sve_struct_vect_14.c" + +/* { dg-final { scan-assembler-times {\tld2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tld3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tld4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst2b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst3b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ +/* { dg-final { scan-assembler-times {\tst4b\t{z[0-9]+.b - z[0-9]+.b}, p[0-7], \[x[0-9]+\]\n} 1 } } */ + +/* { dg-final { scan-assembler-times {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7], \[x[0-9]+\]\n} 2 } } */ + +/* { dg-final { scan-assembler-times {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7], \[x[0-9]+\]\n} 2 } } */ + +/* { dg-final { scan-assembler-times {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tld4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst3d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */ +/* { dg-final { scan-assembler-times {\tst4d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7], \[x[0-9]+\]\n} 2 } } */