diff options
| author | Richard Biener <rguenther@suse.de> | 2025-08-21 13:46:06 +0200 |
|---|---|---|
| committer | Richard Biener <rguenther@suse.de> | 2025-12-05 12:33:46 +0100 |
| commit | 1da0e5c1405e87e9f2a11ed358b40dff21085657 (patch) | |
| tree | 8f381cd8fb3c5c42b5e4ae17df347ec7509bc1e5 /gcc/fortran/array.cc | |
| parent | 82305f37dbedaded25014d3f45736e503d564bb2 (diff) | |
| download | gcc-1da0e5c1405e87e9f2a11ed358b40dff21085657.zip gcc-1da0e5c1405e87e9f2a11ed358b40dff21085657.tar.gz gcc-1da0e5c1405e87e9f2a11ed358b40dff21085657.tar.bz2 | |
Move even/odd validity check from supportable_widening_operation to caller
The following moves the incomplete validity check to use
WIDEN_MULT_{EVEN,ODD} to the caller of supportable_widening_operation
where we have access to more (but not enough) information. I have
made the test conservative enough I hope. For the testcase what was
broken is that it uses a SLP reduction where lane-swizzling isn't
valid.
PR tree-optimization/123002
* tree-vectorizer.h (supportable_widening_operation): Remove
vinfo and stmt_info parameters, add flag to indicate whether
the context would allow OP_{EVEN,ODD}.
* tree-vect-patterns.cc (vect_recog_abd_pattern): Adjust
and pass false.
(vect_recog_widen_op_pattern): Likewise.
(vect_recog_widen_abd_pattern): Likewise.
* tree-vect-stmts.cc (vectorizable_conversion): Move
even/odd validity check here, from supportable_widening_operation.
Adjust it to be conservative.
(supportable_widening_operation): Get flag whether even/odd
is OK to use and remove then unused parameters and code.
* gcc.dg/vect/vect-pr123002.c: New testcase.
Diffstat (limited to 'gcc/fortran/array.cc')
0 files changed, 0 insertions, 0 deletions
