From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D7DED3858C2F; Wed, 31 May 2023 21:54:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D7DED3858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685570083; bh=K7GRqavDpwHjoNsgREyMQ5G3wJzwlQ8qvCkL6+Nmjes=; h=From:To:Subject:Date:In-Reply-To:References:From; b=frybcvfAitG236/2dWDjWmDo8x6VrCHzppCwE/iufYTjaAtvRU2YVvGLjOdNeo2s2 zmqwN7WB0PGBZdEgkhTSyiXeq2sK0yEgcwYl0Mo3hXMl71dMNalwlq+QRt/LwXCUe5 Snfn9J63ppn661DZ7rMrjR9q1gtneP20v8fPoz8c= From: "vmakarov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108703] insn does not satisfy its constraints: movhi_insn at -O1 Date: Wed, 31 May 2023 21:54:43 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: vmakarov 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: cc 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=3D108703 Vladimir Makarov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at gcc dot gnu.org --- Comment #3 from Vladimir Makarov --- Here is my analysis of the problem/ Before IRA we already have: (insn 10 7 11 2 (set (reg:HI 33 %f1) (reg:HI 35 %f3)) "/home/vmakarov/testcase.c":8:3 114 {*movhi_insn} (expr_list:REG_EQUAL (const_int 13107 [0x3333]) (nil))) LRA considers the insn is correct and does not check constraints as it is simple move and its cost is 2. This is standard convention for ignoring constraints since the very early versions of reload pass. And as I remembe= r, it is described somewhere in GCC documentation. I think we should avoid to generate such insn from the start because ignoring the reload convention will result in many unexpected consequences where LRA speed slowdown probably would be a minor negative consequence.=