From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9CDFE3861829; Wed, 20 Dec 2023 12:02:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CDFE3861829 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703073778; bh=inPtwdUJsppu8IYmEZb0cXhiD+TEYUGlwxMiI7+Kgx4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vhSMyPKLMymx8yhiyo+C4uLr1feCTtPSjtlFTO5aueb+SZECRWUOqvCT2nAso6ArS Rl8nKTSBbmpok/S2LOVBU6NCkQFPqwpyBvG6xI7L9OBFT75s7WrQuxOH6wnE3/PB5r fPmRWV9Zg9fGt4+syzZNrJsJso2sFfRJ94pKJN8s= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113033] GCC 14 (20231203 snapshot) ICE when building LSX vector rotate code on LoongArch Date: Wed, 20 Dec 2023 12:02:58 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code, missed-optimization, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113033 --- Comment #10 from GCC Commits --- The master branch has been updated by Xi Ruoyao : https://gcc.gnu.org/g:c7eefea622e70bd63b0e00e896f67cf9ee9916bc commit r14-6746-gc7eefea622e70bd63b0e00e896f67cf9ee9916bc Author: Xi Ruoyao Date: Tue Dec 19 04:48:03 2023 +0800 LoongArch: Use force_reg instead of gen_reg_rtx + emit_move_insn in vec_init expander [PR113033] Jakub says: Then that seems like a bug in the loongarch vec_init pattern(s). Those really don't have a predicate in any of the backends on the input operand, so they need to force_reg it if it is something it can't handle. I've looked e.g. at i386 vec_init and that is exactly what it does, see the various tests + force_reg calls in ix86_expand_vector_init*. So replace gen_reg_rtx + emit_move_insn with force_reg to fix PR 113033. gcc/ChangeLog: PR target/113033 * config/loongarch/loongarch.cc (loongarch_expand_vector_init_same): Replace gen_reg_rtx + emit_move_insn with force_reg. (loongarch_expand_vector_init): Likewise. gcc/testsuite/ChangeLog: PR target/113033 * gcc.target/loongarch/pr113033.c: New test.=