public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6755] tree-optimization/104114 - avoid diagnosing V1mode lowering
@ 2022-01-20  8:04 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2022-01-20  8:04 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ad4188f8385f86cc04806fb0e26c7da1f5f655b8

commit r12-6755-gad4188f8385f86cc04806fb0e26c7da1f5f655b8
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Jan 19 13:59:21 2022 +0100

    tree-optimization/104114 - avoid diagnosing V1mode lowering
    
    Currently we diagnose vector lowering of V1mode operations that
    are not natively supported into V_C_E, scalar op plus CTOR with
    -Wvector-operation-performance but that's hardly useful behavior
    even though the way we lower things can be improved.
    
    The following disables the diagnostics for the cases the vect.exp
    testsuite runs into, on x86 that are vect-cond-11.c and
    vect-singleton_1.c.
    
    2022-01-19  Richard Biener  <rguenther@suse.de>
    
            PR tree-optimization/104114
            * tree-vect-generic.cc (expand_vector_piecewise): Do not diagnose
            single element vector decomposition.

Diff:
---
 gcc/tree-vect-generic.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-vect-generic.cc b/gcc/tree-vect-generic.cc
index 5814a71a5bb..f4fc7d16119 100644
--- a/gcc/tree-vect-generic.cc
+++ b/gcc/tree-vect-generic.cc
@@ -317,7 +317,10 @@ expand_vector_piecewise (gimple_stmt_iterator *gsi, elem_op_func f,
   int i;
   location_t loc = gimple_location (gsi_stmt (*gsi));
 
-  if (ret_type || !parallel_p)
+  if (nunits == 1)
+    /* Do not diagnose decomposing single element vectors.  */
+    ;
+  else if (ret_type || !parallel_p)
     warning_at (loc, OPT_Wvector_operation_performance,
 		"vector operation will be expanded piecewise");
   else


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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-20  8:04 [gcc r12-6755] tree-optimization/104114 - avoid diagnosing V1mode lowering Richard Biener

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