From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A4DE53857401; Sun, 30 May 2021 22:31:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4DE53857401 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/95685] Loop invariants can't be moved out of the loop Date: Sun, 30 May 2021 22:31:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: 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: Sun, 30 May 2021 22:31:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95685 --- Comment #4 from Andrew Pinski --- With -funroll-loops on the trunk for the aarch64 target, I get no loop any more: bar and seems like good code: .LFB0: .cfi_startproc and w1, w1, 65535 mov w2, 8193 tst w0, 2 eor w3, w1, w2 csel w4, w1, w3, eq tst w0, 4 eor w5, w4, w2 and w6, w5, 65535 csel w7, w6, w4, ne tst w0, 8 eor w0, w7, w2 and w8, w0, 65535 csel w0, w8, w7, ne ret Oh I recongize this loop too, it is from coremark.=