From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0D72E3857412; Mon, 31 Oct 2022 03:29:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D72E3857412 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667186943; bh=0kLQ4MkHd+AGvo38+77Ba3hmDet+OcIxGAPzoI6fsCo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Y2DT1oQUUrAtB2nkDg3oa7S3RGPc2wuEYykvl/NWsTUVVdaW91jvnA0SdwSYj+Uq4 uYtm2Xsl6r0jkvCqdg0lEWOPFbDUGDxT0LLY9ZGLP4lQ1LPNOZd/rfa2qKBAqrp+Vr XXZKtJVKKz2AcXllggZdAmFog5FB5DqE6L8gpUJs= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107451] [11/12/13 Regression] Segmentation fault with vectorized code. Date: Mon, 31 Oct 2022 03:29:01 +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: 11.3.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107451 --- Comment #4 from Hongtao.liu --- (In reply to bartoldeman from comment #3) > Created attachment 53786 [details] > Corrected test case >=20 > In my eagerness to make it as short as possible I made it too short indee= d! 35 [local count: 105119324]: 36 bnd.12_91 =3D (unsigned int) n_29(D); 37 _90 =3D (long unsigned int) inc_x_33(D); 38 _89 =3D _90 * 8; 39 ivtmp.24_45 =3D (unsigned long) x_31(D); 40 ivtmp.26_3 =3D (unsigned long) y_32(D); 41 42 [local count: 955630225]: 43 # vect_dot_3_55.16_71 =3D PHI 44 # ivtmp.19_55 =3D PHI 45 # ivtmp.24_49 =3D PHI 46 # ivtmp.26_1 =3D PHI 47 _75 =3D (void *) ivtmp.24_49; 48 _78 =3D MEM [(const double *)_75]; 49 _76 =3D MEM [(const double *)_75 + _89 * 1]; 50 vect_cst__74 =3D {_78, _76}; --------------- here 51 vect__4.14_73 =3D VEC_PERM_EXPR ; 52 _5 =3D (void *) ivtmp.26_1; 53 _86 =3D MEM [(const double *)_5]; 54 _84 =3D MEM [(const double *)_5 + _89 * 1]; 55 vect_cst__82 =3D {_86, _84}; -------------- here 56 vect__6.13_81 =3D VEC_PERM_EXPR ; 57 vect__20.17_70 =3D .FMA (vect__4.14_73, vect__6.13_81, vect_dot_3_55.1= 6_71); 58 ivtmp.19_92 =3D ivtmp.19_55 + 1; 59 ivtmp.24_46 =3D ivtmp.24_49 + _89; 60 ivtmp.26_2 =3D ivtmp.26_1 + _89; 61 if (bnd.12_91 !=3D ivtmp.19_92) 62 goto ; [90.00%] 63 else 64 goto ; [10.00%] 65 66 [local count: 105119324]: 67 _51 =3D .REDUC_PLUS (vect__20.17_70); [tail call] It looks like it should be vect_cst__82 =3D {_84, _86} not {_86, _84}, simi= lar for vect_cst__74 =3D {_76, _78} not {_78, _76}.=