From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D94013858D35; Mon, 22 May 2023 15:11:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D94013858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684768292; bh=xvwneExFnDm1G5hkaH/vH4LD9Q8tNp9O2wrhsmUEvDU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Jf8DkIEQ3AdzdLGeLGYgmwyy+FM/AYIbTQVFaaTkTjYrw1UM3iTBG9wWp7/ihUCf/ C3I/Ch3ZBtK8JeKDDExE6lv+qvpaZnYQZktxkiylOZLpZsPvKeIJ+TkMWy7AqqfkAi A17ge1BEYOGc2scEIEpm/7uwPf8RrV/CS0/3XntQ= From: "ktkachov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109855] [14 Regression] ICE: in curr_insn_transform, at lra-constraints.cc:4231 unable to generate reloads for {aarch64_mlav4hi_vec_concatz_le} at -O1 Date: Mon, 22 May 2023 15:11:32 +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 X-Bugzilla-Severity: normal X-Bugzilla-Who: ktkachov 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: 14.0 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=3D109855 --- Comment #6 from ktkachov at gcc dot gnu.org --- (In reply to ktkachov from comment #5) > (In reply to rsandifo@gcc.gnu.org from comment #4) > > I guess the problem is that the define_subst output template has: > >=20 > > (match_operand: 0) > >=20 > > which creates a new operand 0 with an empty predicate and constraint, > > as opposed to a (match_dup 0), which would be substituted with the > > original operand 0. Unfortunately > >=20 > > (match_dup: 0) > >=20 > > doesn't work as a way of inserting the original destination with > > a different mode, since the : is ignored. Perhaps we should > > =E2=80=9Cfix=E2=80=9D that. Alternatively: > >=20 > > (match_operand: 0 "register_operand" "=3Dw") > >=20 > > should work, but probably locks us into using patterns that have one > > alternative only. >=20 > I think this approach is the most promising and probably okay for the vast > majority of cases we want to handle with these substs. Interestingly, it does seem to do the right thing for multi-alternative patterns too. For example: (define_insn ("aarch64_cmltv4hf_vec_concatz_le") [ (set (match_operand:V8HI 0 ("register_operand") ("=3Dw,w")) (vec_concat:V8HI (neg:V4HI (lt:V4HI (match_operand:V4HF 1 ("register_operand") ("w,w")) (match_operand:V4HF 2 ("aarch64_simd_reg_or_zero") ("w,YDz")))) (match_operand:V4HI 3 ("aarch64_simd_or_scalar_imm_zero") ("")))) ] ("(!BYTES_BIG_ENDIAN) && ((TARGET_SIMD) && (TARGET_SIMD_F16INST))") (= "@ fcmgt\t%0.4h, %2.4h, %1.4h fcmlt\t%0.4h, %1.4h, 0") [ (set_attr ("type") ("neon_fp_compare_s")) (set_attr ("add_vec_concat_subst_le") ("no")) ])=