public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@linaro.org>
To: gcc-patches@gcc.gnu.org
Subject: [10/10] Add a vect_masked_store target selector
Date: Fri, 03 Nov 2017 16:23:00 -0000	[thread overview]
Message-ID: <878tfnpc03.fsf@linaro.org> (raw)
In-Reply-To: <87inerqqyz.fsf@linaro.org> (Richard Sandiford's message of "Fri,	03 Nov 2017 16:14:44 +0000")

This patch adds a target selector that says whether the target
supports IFN_MASK_STORE.


2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

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 } } } } */

  parent reply	other threads:[~2017-11-03 16:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 16:14 [0/10] Vectoriser testsuite tweaks Richard Sandiford
2017-11-03 16:16 ` [1/10] Consistently use asm volatile ("" ::: "memory") in vect tests Richard Sandiford
2017-11-08 19:10   ` Jeff Law
2017-11-03 16:17 ` [2/10] Add VECTOR_BITS to tree-vect.h Richard Sandiford
2017-11-08 19:13   ` Jeff Law
2017-11-03 16:18 ` [4/10] Don't assume vect_multiple_sizes means 2 sizes Richard Sandiford
2017-11-08 19:21   ` Jeff Law
2017-11-03 16:18 ` [3/10] Add available_vector_sizes to target-supports.exp Richard Sandiford
2017-11-08 19:13   ` Jeff Law
2017-11-17 13:23     ` Christophe Lyon
2017-11-03 16:19 ` [5/10] Add vect_perm3_* target selectors Richard Sandiford
2017-11-08 19:49   ` Jeff Law
2017-11-03 16:20 ` [6/10] Add a vect_element_align_preferred target selector Richard Sandiford
2017-11-08 22:31   ` Jeff Law
2017-11-03 16:21 ` [8/10] Add a vect_variable_length " Richard Sandiford
2017-11-08 22:33   ` Jeff Law
2017-11-03 16:21 ` [7/10] Add a vect_unaligned_possible " Richard Sandiford
2017-11-08 22:32   ` Jeff Law
2017-11-03 16:22 ` [9/10] Add a vect_align_stack_vars " Richard Sandiford
2017-11-08 22:40   ` Jeff Law
2017-11-03 16:23 ` Richard Sandiford [this message]
2017-11-08 22:44   ` [10/10] Add a vect_masked_store " Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tfnpc03.fsf@linaro.org \
    --to=richard.sandiford@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).