From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ED80E3858D28; Sat, 28 May 2022 02:55:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED80E3858D28 From: "filip.hejsek at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105753] [avr] ICE: in add_clobbers, at config/avr/avr-dimode.md:2705 Date: Sat, 28 May 2022 02:55:39 +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: filip.hejsek at gmail dot com 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: Sat, 28 May 2022 02:55:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105753 --- Comment #1 from Filip Hejsek --- Not that i would really understand the machine description files, but the problem seems to be caused by this instruction definition: (define_insn_and_split "udivmodsi4" [(parallel [(set (match_operand:SI 0 "pseudo_register_operand" "") (udiv:SI (match_operand:SI 1 "pseudo_register_operand" "= ") (match_operand:SI 2 "pseudo_register_operand" ""= ))) (set (match_operand:SI 3 "pseudo_register_operand" "") (umod:SI (match_dup 1) (match_dup 2))) (clobber (reg:SI 18)) (clobber (reg:SI 22)) (clobber (reg:HI 26)) (clobber (reg:HI 30))])] "" "this udivmodsi4 pattern should have been splitted;" "" [(set (reg:SI 22) (match_dup 1)) (set (reg:SI 18) (match_dup 2)) (parallel [(set (reg:SI 18) (udiv:SI (reg:SI 22) (reg:SI 18))) (set (reg:SI 22) (umod:SI (reg:SI 22) (reg:SI 18))) (clobber (reg:HI 26)) (clobber (reg:HI 30))]) (set (match_dup 0) (reg:SI 18)) (set (match_dup 3) (reg:SI 22))]) Just as in bug 88051, the instruction is missing from the generated switch = in add_clobbers and removing pararllel from the definition fixes the problem. = (I don't understand enough to know if it's the correct fix though.) There are 4 instructions with parallel in the definition: divmodpsi4, udivmodpsi4, divmodsi4, udivmodsi4.=