From patchwork Fri Nov 3 16:23:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 117946 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3658058qgn; Fri, 3 Nov 2017 09:23:44 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RGpUTW3ogo6VG98P72fA71nDa8Szz+aEAJhmTGZsofvuhp+KF3G1A1iUIRNowUvQftIqaq X-Received: by 10.99.7.133 with SMTP id 127mr7574519pgh.147.1509726224232; Fri, 03 Nov 2017 09:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509726224; cv=none; d=google.com; s=arc-20160816; b=cdibjctVOKNtYkXYZUTe3eX6wDh6EcXlTPnQ+swb9PeDi1QFyoXq8nQbeoN50iGVN/ PHFpqelwc/LBVsmMzPwTyRybaAKVJ67dPQpHDWRrYu2cTlCZkMZfEVyTmlSMbwpVg47S t9I/wZQ8RSTpbXCWvkobmUpaGsC3GpuskMfOwYewoaA/sIufRhPOVULodO4gjPRS0jKC AhUz00ONmOGv5kEtSgWyb8cwDNhOWKNsCHPI0YEDKtdj70jhPVezqf5lHNguAEG6wHpF TaeKnR2zohpnC8HOvEBiyLJIdMLAcI07M+tcgOldmBiEvg5Ym1+pn1nAp96cP5GLdSRs JARA== 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: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=zeFfnIrnBcipmtZpQ6Ec7qlQLNcigXwAQMiDHjQ4FWk=; b=b6nYseNuN+dglB62IhaPlSCNDO/HoZuhfA4Vj2i5yxOz9HkAS8KCHIrWDK4K+4LQ4u xBFhkFzfwgjncrDiyWLy8x88g7tvaRYSLVJ2Kc/d3IMs5Vk7GnEg9ApKtmiZtCgvPnwn LUZtLYv/XB12miDyMCURyvmnqGGi8TdPx83H6FokVEe9yduUljomqwv6xNlh8Fx1urHb HtzaV3rF9MmL9hLcGGZujLa8+jF1Nebts7q7yxpY8MEaPPr7ngfRT7mvEaxzfsfQ3No4 IUDG+o8JqJy1CqdgPdP6f4lJn8el5kC4ppb5OTJAEMdmVFuqkCiVaAMX6QX64RiA2Yrp GJIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=TuxPX/OM; spf=pass (google.com: domain of gcc-patches-return-465881-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-465881-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 p73si6741950pfi.83.2017.11.03.09.23.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Nov 2017 09:23:44 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-465881-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=TuxPX/OM; spf=pass (google.com: domain of gcc-patches-return-465881-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-465881-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:subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=default; b=nK92/XiwSUstq2q056azrZcdTSb9x 34mm3J3oQXbMS6eZl7ZgupsJOX876k0Gy76utDczYGDqi+I0ZKTTPXQ87Oo6fNh6 1F51eQlFfZHeiNW07c6JnoE6+5nthHJ5DSTGKeoE+Szl5DT7pwU/5U+JYll2Sr/p G4OvOnHI7AcY0s= 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:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=default; bh=TKOUrbht+ZeiCKiqzOm/8OKqwKk=; b=Tux PX/OMePLoqOOVDuS69mE7NvKBg2Xu5KU460WRtqlkk4qhJRrS8WSNItGBL56ywtG dHzZ9kK41VTwijdok0hlmp/fxTtMB/JM/kenSq8JNNRwycB5G+xlCmioO73J99cM Fu/j3x17/lHfIT8XrwNFJOfAINzPo6dk0uYhSBJA= Received: (qmail 47908 invoked by alias); 3 Nov 2017 16:23:31 -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 47899 invoked by uid 89); 3 Nov 2017 16:23:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 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=aligns X-HELO: mail-wr0-f177.google.com Received: from mail-wr0-f177.google.com (HELO mail-wr0-f177.google.com) (209.85.128.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Nov 2017 16:23:29 +0000 Received: by mail-wr0-f177.google.com with SMTP id z55so2994262wrz.1 for ; Fri, 03 Nov 2017 09:23:29 -0700 (PDT) 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:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=zeFfnIrnBcipmtZpQ6Ec7qlQLNcigXwAQMiDHjQ4FWk=; b=VZMXrr2w4zCfYXiZ+GZg8WvUn4p1Cl+5qm+lp5Kkar/ZWFrbkUNKqYS5kTUwXoJ+cH 1GlmCOVKLv3C0h+tT8csSlHmapGvOzLxAhPK+36HB/oruWbsL8cpUd34nNSrDcWRbkqP gXn8jQYIDkSOTd4lynJq4JVGRfa/uTZJBOHfOYJG4k5KMAZe6uRHDuM7dpxtr/jZjN6U DmX2zLjtLVySwTAY0k+N512ZQ3x0reT5zmGyrR3+56fM4aekN/Ehhn9glr7k8CqHuhs9 ogixA7iix30u9xOq+Tsxcoa10UZycepRU3buK4kssT/Of+pY35WxENi9tZfj3mEVrzOC sUzg== X-Gm-Message-State: AJaThX4l2hj5pw7OIcRJC2z/NuEHFDaGlDF/AW5gYNfljH0oAnVLRjK4 TrEYC1zRhk65YhG4IufqKiQdM1cV8O0= X-Received: by 10.223.188.13 with SMTP id s13mr1699668wrg.39.1509726207507; Fri, 03 Nov 2017 09:23:27 -0700 (PDT) Received: from localhost (188.29.164.162.threembb.co.uk. [188.29.164.162]) by smtp.gmail.com with ESMTPSA id p200sm2246143wmd.9.2017.11.03.09.23.26 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Nov 2017 09:23:26 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [10/10] Add a vect_masked_store target selector References: <87inerqqyz.fsf@linaro.org> Date: Fri, 03 Nov 2017 16:23:24 +0000 In-Reply-To: <87inerqqyz.fsf@linaro.org> (Richard Sandiford's message of "Fri, 03 Nov 2017 16:14:44 +0000") Message-ID: <878tfnpc03.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 This patch adds a target selector that says whether the target supports IFN_MASK_STORE. 2017-11-03 Richard Sandiford Alan Hayward David Sherwood gcc/ * doc/sourcebuild.texi (vect_masked_store): Document. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_vect_masked_store): New proc. * gcc.dg/vect/vect-cselim-1.c (foo): Mention that the second loop is vectorizable with masked stores. Update scan-tree-dump-times accordingly. Index: gcc/doc/sourcebuild.texi =================================================================== --- gcc/doc/sourcebuild.texi 2017-11-03 16:06:56.516976666 +0000 +++ gcc/doc/sourcebuild.texi 2017-11-03 16:07:00.028331940 +0000 @@ -1403,6 +1403,9 @@ Target supports hardware vectors of @cod @item vect_long_long Target supports hardware vectors of @code{long long}. +@item vect_masked_store +Target supports vector masked stores. + @item vect_aligned_arrays Target aligns arrays to vector alignment boundary. Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp 2017-11-03 16:06:56.519977825 +0000 +++ gcc/testsuite/lib/target-supports.exp 2017-11-03 16:07:00.029332326 +0000 @@ -6433,6 +6433,12 @@ proc check_effective_target_vect_load_la return $et_vect_load_lanes } +# Return 1 if the target supports vector masked stores. + +proc check_effective_target_vect_masked_store { } { + return 0 +} + # Return 1 if the target supports vector conditional operations, 0 otherwise. proc check_effective_target_vect_condition { } { Index: gcc/testsuite/gcc.dg/vect/vect-cselim-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-cselim-1.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-cselim-1.c 2017-11-03 16:07:00.028331940 +0000 @@ -38,7 +38,7 @@ foo () } } - /* Not vectorizable. */ + /* Only vectorizable with masked stores. */ for (i = 0; i < N; i++) { c = in1[i].b; @@ -82,4 +82,5 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vect_strided2 } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_masked_store } xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vect_strided2 } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { vect_masked_store } } } } */