tree-optimization/105175 - avoid -Wvector-operation-performance
authorRichard Biener <rguenther@suse.de>
Wed, 6 Apr 2022 09:18:12 +0000 (11:18 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 8 Apr 2022 06:34:06 +0000 (08:34 +0200)
commitb789c44c6463452900f7b1e6d2a0af6567534bfc
tree6dccf4cb568a33ccaf72da90a03eafaa0cc552a1
parentdf00d10320c5283e68ecd39e2825c4be88661744
tree-optimization/105175 - avoid -Wvector-operation-performance

This avoids -Wvector-operation-performance diagnostics for vectorizer
produced code.  It's unfortunate the warning_at code in
tree-vect-generic.cc needs adjustments but the diagnostic suppression
code doesn't magically suppress those otherwise.

2022-04-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/105175
* tree-vect-stmts.cc (vectorizable_operation): Suppress
-Wvector-operation-performance if using emulated vectors.
* tree-vect-generic.cc (expand_vector_piecewise): Do not diagnose
-Wvector-operation-performance when suppressed.
(expand_vector_parallel): Likewise.
(expand_vector_comparison): Likewise.
(expand_vector_condition): Likewise.
(lower_vec_perm): Likewise.
(expand_vector_conversion): Likewise.

* gcc.dg/pr105175.c: New testcase.
gcc/testsuite/gcc.dg/pr105175.c [new file with mode: 0644]
gcc/tree-vect-generic.cc
gcc/tree-vect-stmts.cc