From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 96FDD3857C71; Thu, 1 Apr 2021 07:21:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96FDD3857C71 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99856] [9/10/11 Regression] Alpha Compositing auto vectorization regression Date: Thu, 01 Apr 2021 07:21:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: version priority bug_status target_milestone assigned_to cf_gcctarget Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2021 07:21:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99856 Richard Biener 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 --- t.c:16:14: note: op template: patt_266 =3D () _8; t.c:16:14: note: stmt 0 patt_266 =3D () _8; t.c:16:14: note: stmt 1 patt_243 =3D () _28; t.c:16:14: note: stmt 2 patt_220 =3D () _46; t.c:16:14: note: stmt 3 patt_198 =3D () _60; t.c:16:14: note: children 0x38267e0 WTF t.c:16:14: note: =3D=3D> examining pattern def stmt: patt_266 =3D () _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 clea= rly this causes t.c:16:14: note: =3D=3D> examining statement: patt_266 =3D () _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 = =3D () _8; t.c:16:14: note: removing SLP instance operations starting from: *_20 =3D= _21; t.c:16:14: missed: unsupported SLP instances t.c:16:14: note: re-trying with SLP disabled ... t.c:16:14: note: =3D=3D> examining statement: patt_266 =3D () _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 ch= ar 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 ch= ar t.c:11:1: missed: not vectorized: relevant stmt not supported: patt_266 = =3D () _8; t.c:16:14: missed: bad operation or unsupported loop bound. Breakpoint 6, build_nonstandard_integer_type (precision=3D17, unsignedp=3D1) at /home/rguenther/src/gcc3/gcc/tree.c:8090 8090 if (unsignedp) (gdb) bt #0 build_nonstandard_integer_type (precision=3D17, unsignedp=3D1) at /home/rguenther/src/gcc3/gcc/tree.c:8090 #1 0x00000000024461ab in vect_recog_over_widening_pattern (vinfo=3D0x385bf= 60,=20 last_stmt_info=3D0x38d1130, type_out=3D0x7fffffffc7d0) at /home/rguenther/src/gcc3/gcc/tree-vect-patterns.c:1719 #2 0x0000000002453c10 in vect_pattern_recog_1 (vinfo=3D0x385bf60,=20 recog_func=3D0x359bf80 , stmt_info=3D0x38d11= 30) at /home/rguenther/src/gcc3/gcc/tree-vect-patterns.c:5463 #3 0x0000000002453fee in vect_pattern_recog (vinfo=3D0x385bf60) at /home/rguenther/src/gcc3/gcc/tree-vect-patterns.c:5603 where (gdb) p last_stmt_info->min_output_precision $9 =3D 17 (gdb) p last_stmt_info->operation_precision $10 =3D 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 =3D min_precision; + new_precision =3D vect_element_precision (new_precision); if (new_precision >=3D TYPE_PRECISION (type)) return NULL; restores vectorization.=