From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 17B3B3857BB5; Thu, 13 Oct 2022 13:56:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 17B3B3857BB5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665669402; bh=qsNamQeKmfg00KwxswkF2OqYxo5LX4z5riFzCAh0+Oc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BZl/QhbAtF8TlluVHux4t63+kn3D3fib3wpxG8XMRP7/b69/QwjWlkOZaAtslqg04 EE6Lkx44Bge0lU/dO0En1J5oPstrwQFvb2ZQF0/SRpIy2JFHrjyUOLpYpOYpM9F+1/ FBHNNkIULEde91kqtqk+ms8qFx+pfXFbFoZUYQDw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105773] [Aarch64] Failure to optimize and+cmp to tst Date: Thu, 13 Oct 2022 13:56:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: wilco 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105773 --- Comment #2 from CVS Commits --- The master branch has been updated by Wilco Dijkstra : https://gcc.gnu.org/g:1cccf644ff92ac1145abdbf255d1862dd787875b commit r13-3274-g1cccf644ff92ac1145abdbf255d1862dd787875b Author: Wilco Dijkstra Date: Thu Oct 13 14:41:55 2022 +0100 [AArch64] Improve bit tests [PR105773] Since AArch64 sets all flags on logical operations, comparisons with ze= ro can be combined into an AND even if the condition is LE or GT. Add a new CC_NZV mode used by ANDS/BICS/TST instructions. gcc/ PR target/105773 * config/aarch64/aarch64.cc (aarch64_select_cc_mode): Allow GT/LE for merging compare with zero into AND. (aarch64_get_condition_code_1): Add CC_NZVmode support. * config/aarch64/aarch64-modes.def: Add CC_NZV. * config/aarch64/aarch64.md: Use CC_NZV in cmp+and patterns. gcc/testsuite/ PR target/105773 * gcc.target/aarch64/ands_2.c: Test for ANDS. * gcc.target/aarch64/bics_2.c: Test for BICS. * gcc.target/aarch64/tst_2.c: Test for TST. * gcc.target/aarch64/tst_imm_split_1.c: Fix test.=