From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3F3653858D1E; Wed, 6 Apr 2022 08:17:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F3653858D1E From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105175] [12 Regression] Pointless warning about missed vector optimization Date: Wed, 06 Apr 2022 08:17:21 +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: 12.0 X-Bugzilla-Keywords: diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: component cf_reconfirmed_on target_milestone cf_gcctarget bug_status keywords everconfirmed 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: Wed, 06 Apr 2022 08:17:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105175 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Component|rtl-optimization |tree-optimization Last reconfirmed| |2022-04-06 Target Milestone|--- |12.0 Target| |x86_64-*-* Status|UNCONFIRMED |ASSIGNED Keywords| |diagnostic, | |missed-optimization Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- I think the issue is that the vectorizer generates [local count: 1073741824]: + vect__1.5_8 =3D MEM [(unsigned int *)&qemuMigrationCookieGetPersistent_mig]; + vect__2.6_9 =3D vect__1.5_8 & { 1, 1 }; _1 =3D qemuMigrationCookieGetPersistent_mig.flags; _2 =3D _1 & 1; - qemuMigrationCookieGetPersistent_mig.flags =3D _2; _3 =3D qemuMigrationCookieGetPersistent_mig.flagsMandatory; _4 =3D _3 & 1; - qemuMigrationCookieGetPersistent_mig.flagsMandatory =3D _4; + MEM [(unsigned int *)&qemuMigrationCookieGetPersistent_mig] =3D vect__2.6_9; but appearantly it does not check availability of the bitwise AND V2SImode operation. vector lowering recognizes this missing operation and lowers it to + long unsigned int _6; + long unsigned int _7; + vector(2) unsigned int _11; [local count: 1073741824]: vect__1.5_8 =3D MEM [(unsigned int *)&qemuMigrationCookieGetPersistent_mig]; - vect__2.6_9 =3D vect__1.5_8 & { 1, 1 }; + _7 =3D VIEW_CONVERT_EXPR(vect__1.5_8); + _6 =3D _7 & 4294967297; + _11 =3D VIEW_CONVERT_EXPR(_6); + vect__2.6_9 =3D _11; _maybe_ V2SImode is also a real thing now even with -mno-sse, but the AND is cut out (or not implemented). That is, this is probably a vectorizer missed target check.=