https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99856
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unknown |9.3.0
Priority|P3 |P2
Status|NEW |ASSIGNED
Target Milestone|--- |9.4
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot
gnu.org
Target| |x86_64-*-*
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
t.c:16:14: note: op template: patt_266 = (<unnamed-unsigned:17>) _8;
t.c:16:14: note: stmt 0 patt_266 = (<unnamed-unsigned:17>) _8;
t.c:16:14: note: stmt 1 patt_243 = (<unnamed-unsigned:17>) _28;
t.c:16:14: note: stmt 2 patt_220 = (<unnamed-unsigned:17>) _46;
t.c:16:14: note: stmt 3 patt_198 = (<unnamed-unsigned:17>) _60;
t.c:16:14: note: children 0x38267e0
WTF
t.c:16:14: note: ==> examining pattern def stmt: patt_266 =
(<unnamed-unsigned:17>) _8;
t.c:16:14: note: precomputed vectype: vector(8) unsigned int
t.c:16:14: note: get vectype for smallest scalar type: unsigned char
the dumps do not show who creates this 17 bit precision temporary, but clearly
this causes
t.c:16:14: note: ==> examining statement: patt_266 = (<unnamed-unsigned:17>)
_8;
t.c:16:14: note: vect_is_simple_use: operand *_7, type of def: internal
t.c:16:14: missed: type conversion to/from bit-precision unsupported.
t.c:16:14: missed: bit-precision arithmetic not supported.
t.c:16:14: note: vect_is_simple_use: operand *_7, type of def: internal
t.c:11:1: missed: not vectorized: relevant stmt not supported: patt_266 =
(<unnamed-unsigned:17>) _8;
t.c:16:14: note: removing SLP instance operations starting from: *_20 = _21;
t.c:16:14: missed: unsupported SLP instances
t.c:16:14: note: re-trying with SLP disabled
...
t.c:16:14: note: ==> examining statement: patt_266 = (<unnamed-unsigned:17>)
_8;
t.c:16:14: note: vect_is_simple_use: operand *_7, type of def: internal
t.c:16:14: note: vect_is_simple_use: vectype const vector(32) unsigned char
t.c:16:14: missed: type conversion to/from bit-precision unsupported.
t.c:16:14: missed: bit-precision arithmetic not supported.
t.c:16:14: note: vect_is_simple_use: operand *_7, type of def: internal
t.c:16:14: note: vect_is_simple_use: vectype const vector(32) unsigned char
t.c:11:1: missed: not vectorized: relevant stmt not supported: patt_266 =
(<unnamed-unsigned:17>) _8;
t.c:16:14: missed: bad operation or unsupported loop bound.
Breakpoint 6, build_nonstandard_integer_type (precision=17, unsignedp=1)
at /home/rguenther/src/gcc3/gcc/tree.c:8090
8090 if (unsignedp)
(gdb) bt
#0 build_nonstandard_integer_type (precision=17, unsignedp=1)
at /home/rguenther/src/gcc3/gcc/tree.c:8090
#1 0x00000000024461ab in vect_recog_over_widening_pattern (vinfo=0x385bf60,
last_stmt_info=0x38d1130, type_out=0x7fffffffc7d0)
at /home/rguenther/src/gcc3/gcc/tree-vect-patterns.c:1719
#2 0x0000000002453c10 in vect_pattern_recog_1 (vinfo=0x385bf60,
recog_func=0x359bf80 <vect_vect_recog_func_ptrs>, stmt_info=0x38d1130)
at /home/rguenther/src/gcc3/gcc/tree-vect-patterns.c:5463
#3 0x0000000002453fee in vect_pattern_recog (vinfo=0x385bf60)
at /home/rguenther/src/gcc3/gcc/tree-vect-patterns.c:5603
where
(gdb) p last_stmt_info->min_output_precision
$9 = 17
(gdb) p last_stmt_info->operation_precision
$10 = 8
and the min_output_precision is determined from the defs uses
min_input_precision.
I didn't trace further where we arrive at '17', but
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index b575b456301..803de3fc287 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -1705,6 +1705,7 @@ vect_recog_over_widening_pattern (vec_info *vinfo,
/* Apply the minimum efficient precision we just calculated. */
if (new_precision < min_precision)
new_precision = min_precision;
+ new_precision = vect_element_precision (new_precision);
if (new_precision >= TYPE_PRECISION (type))
return NULL;
restores vectorization.