public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6582] vect: Check partial vector param for supports_partial_vectors [PR104015]
@ 2022-01-14 13:04 Kewen Lin
  0 siblings, 0 replies; only message in thread
From: Kewen Lin @ 2022-01-14 13:04 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6d51a9c6447bace21f860e70aed13c6cd90971bd

commit r12-6582-g6d51a9c6447bace21f860e70aed13c6cd90971bd
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Fri Jan 14 07:02:10 2022 -0600

    vect: Check partial vector param for supports_partial_vectors [PR104015]
    
    As described in PR104015, the function partial_vectors_supported_p
    mainly checks optabs for partial vectors support query, but we
    still have one parameter param_vect_partial_vector_usage to control
    the capability.
    
    Power9 introduces vector with length instructions (for
    len_load/len_store) but we don't enable partial vector on it by
    default. It should be considered as not supporting partial vector by
    default. This fix is to make the flag supports_partial_vectors check
    param_vect_partial_vector_usage accordingly.
    
    gcc/ChangeLog:
    
            PR tree-optimization/104015
            * tree-vect-loop.c (vect_analyze_loop): Check
            param_vect_partial_vector_usage for supports_partial_vectors.

Diff:
---
 gcc/tree-vect-loop.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 8748b1a5593..1dbdb9e5fa0 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -3051,7 +3051,8 @@ vect_analyze_loop (class loop *loop, vec_info_shared *shared)
   vector_modes[0] = autodetected_vector_mode;
   mode_i = 0;
 
-  bool supports_partial_vectors = partial_vectors_supported_p ();
+  bool supports_partial_vectors =
+    partial_vectors_supported_p () && param_vect_partial_vector_usage != 0;
   poly_uint64 first_vinfo_vf = LOOP_VINFO_VECT_FACTOR (first_loop_vinfo);
 
   while (1)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-14 13:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 13:04 [gcc r12-6582] vect: Check partial vector param for supports_partial_vectors [PR104015] Kewen Lin

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).