From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 751993858C2F; Wed, 17 May 2023 07:40:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 751993858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684309219; bh=4zTLnSHnbozacLy7efsUYByhityLGZ7jXDUkl9d8M/w=; h=From:To:Subject:Date:From; b=XnNckzVFBBuX4IaXYBGQXtBQ/6BZCvq/or2mTBHKfm5tFjM+kd0uiiOBufQyZjM5z jalPVJ4J6gOwujquDMGcur8FOt/lUwPTMvYPU9Q2EAWbEwM/ov7bTctUU6xEFs3mEF rjEAfmdGY6pPoXIrIEpzdZ93KSzTPCQpciEblaew= From: "vincenzo.innocente at cern dot ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109885] New: gcc does not generate movmskps and testps instructions (clang does) Date: Wed, 17 May 2023 07:40:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vincenzo.innocente at cern dot ch X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D109885 Bug ID: 109885 Summary: gcc does not generate movmskps and testps instructions (clang does) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vincenzo.innocente at cern dot ch Target Milestone: --- in this simple code (on avx2) int sum(float const * x) { int ret =3D 0; for (int i=3D0; i<8; ++i) ret +=3D(0=3D=3Dx[i]); return ret; } int one(float const * x) { int ret =3D 0; for (int i=3D0; i<8; ++i) ret |=3D(0=3D=3Dx[i]); return ret; } int all(float const * x) { int ret =3D 1; for (int i=3D0; i<8; ++i) ret &=3D(0=3D=3Dx[i]); return ret; } clang uses movmskps and testps instructions, gcc does not see for instance https://godbolt.org/z/r11r8xoYz=