mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
tree-optimization/122110 - do not reject all bit-precision reductions
We can handle bitwise-operation reductions and reductions on mask vectors just fine. PR tree-optimization/122110 * tree-vect-loop.cc (vectorizable_reduction): Relax restriction to mode-precision operations.
This commit is contained in:
committed by
Richard Biener
parent
a52f635700
commit
c6865e7e15
@@ -7187,7 +7187,11 @@ vectorizable_reduction (loop_vec_info loop_vinfo,
|
||||
return false;
|
||||
|
||||
/* Do not try to vectorize bit-precision reductions. */
|
||||
if (!type_has_mode_precision_p (op.type))
|
||||
if (!VECTOR_BOOLEAN_TYPE_P (vectype_out)
|
||||
&& !type_has_mode_precision_p (op.type)
|
||||
&& op.code != BIT_AND_EXPR
|
||||
&& op.code != BIT_IOR_EXPR
|
||||
&& op.code != BIT_XOR_EXPR)
|
||||
return false;
|
||||
|
||||
/* Lane-reducing ops also never can be used in a SLP reduction group
|
||||
|
||||
Reference in New Issue
Block a user