From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 57583395200F; Wed, 22 Apr 2020 17:25:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57583395200F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587576324; bh=3DV5n/FLN/gGYHAIsZSgDyGo2YncU+cNzMpSdWlu5Os=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rDkZPCRbLr0REHJeGZZf+1F49NolWc4ZzgXbkdPHUbu+Douo//fcNVmcD37jxsVBL 780+BJjVZGrCsMwjPFiLpl1S7csi6mKj8OVCYx/ZZRURJHgzosmLKFfYIyZnfqE2Sj /bYuudAVyzplmNLUpRE82P3lmXtulmWxaY6gSU/w= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94678] aarch64: unexpected result with -mgeneral-regs-only and sve Date: Wed, 22 Apr 2020 17:25:24 +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: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: Wed, 22 Apr 2020 17:25:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94678 --- Comment #2 from CVS Commits --- The master branch has been updated by Richard Sandiford : https://gcc.gnu.org/g:154ae7d4e921d704118d6a16ee5cc2a10b9047da commit r10-7891-g154ae7d4e921d704118d6a16ee5cc2a10b9047da Author: Fei Yang Date: Wed Apr 22 18:24:59 2020 +0100 aarch64: unexpected result with -mgeneral-regs-only and sve [PR94678] As the two testcases for PR94678 show, -mgeneral-regs-only is handled properly with SVE. We should issue an error message instead of expandi= ng SVE builtin funtions when -mgeneral-regs-only option is specified. The middle end should never try to use vector patterns when the vector modes have been disabled by !have_regs_of_mode. But it's still wrong for the target to provide patterns that would inevitably lead to spill failure due to lack of registers. So we should also add check for !TARGET_GENERAL_REGS_ONLY in TARGET_SVE and other SVE related macros. 2020-04-22 Felix Yang gcc/ PR target/94678 * config/aarch64/aarch64.h (TARGET_SVE): Add && !TARGET_GENERAL_REGS_ONLY. (TARGET_SVE2): Add && TARGET_SVE. (TARGET_SVE2_AES, TARGET_SVE2_BITPERM, TARGET_SVE2_SHA3, TARGET_SVE2_SM4): Add && TARGET_SVE2. * config/aarch64/aarch64-sve-builtins.h (sve_switcher::m_old_general_regs_only): New member. * config/aarch64/aarch64-sve-builtins.cc (check_required_registers): New function. (reported_missing_registers_p): New variable. (check_required_extensions): Call check_required_registers befo= re return if all required extenstions are present. (sve_switcher::sve_switcher): Save TARGET_GENERAL_REGS_ONLY in m_old_general_regs_only and clear MASK_GENERAL_REGS_ONLY in global_options.x_target_flags. (sve_switcher::~sve_switcher): Set MASK_GENERAL_REGS_ONLY in global_options.x_target_flags if m_old_general_regs_only is tru= e. gcc/testsuite/ PR target/94678 * gcc.target/aarch64/sve/acle/general/nosve_6.c: New test.=