From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3515139518AF; Thu, 13 Jan 2022 15:52:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3515139518AF From: "clyon at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/104010] New: [12 regression] short loop no longer vectorized with Neon after r12-6513 Date: Thu, 13 Jan 2022 15:52:23 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: clyon at gcc dot gnu.org 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 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, 13 Jan 2022 15:52:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104010 Bug ID: 104010 Summary: [12 regression] short loop no longer vectorized with Neon after r12-6513 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: clyon at gcc dot gnu.org Target Milestone: --- This short loop: void test_vcmpeq_s32x2 (int32_t * __restrict__ dest, int32_t *a, int32_t *b) { int i; for (i=3D0; i<4; i++) { dest[i] =3D a[i] =3D=3D b[i]; } } used to be vectorized as: test_vcmpeq_s32x2: vld1.32 {d16}, [r1] vmov.i32 d17, #0x1 @ v2si vld1.32 {d19}, [r2] vmov.i32 d18, #0 @ v2si vceq.i32 d16, d16, d19 vbsl d16, d17, d18 vst1.32 {d16}, [r0] bx lr After r12-6513, we get: test_vcmpeq_s32x2: ldr ip, [r1] ldr r3, [r1, #4] str lr, [sp, #-4]! ldr lr, [r2] ldr r2, [r2, #4] sub ip, ip, lr clz ip, ip sub r3, r3, r2 lsr ip, ip, #5 clz r3, r3 lsr r3, r3, #5 str ip, [r0] str r3, [r0, #4] ldr pc, [sp], #4 when compiling for arm-none-linux-gnueabihf with -mcpu=3Dcortex-a9 -mfpu=3D= neon=