From: Richard Biener Date: Wed, 19 Jan 2022 12:59:21 +0000 (+0100) Subject: tree-optimization/104114 - avoid diagnosing V1mode lowering X-Git-Tag: upstream/12.2.0~1942 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad4188f8385f86cc04806fb0e26c7da1f5f655b8;p=platform%2Fupstream%2Fgcc.git 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 PR tree-optimization/104114 * tree-vect-generic.cc (expand_vector_piecewise): Do not diagnose single element vector decomposition. --- diff --git a/gcc/tree-vect-generic.cc b/gcc/tree-vect-generic.cc index 5814a71..f4fc7d1 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