From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F302E3858C2F; Mon, 15 Aug 2022 22:20:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F302E3858C2F From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106586] riscv32 still broke with zba_zbb_zbc_zbs, ICE in do_SUBST in C++ code Date: Mon, 15 Aug 2022 22:20: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: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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: Mon, 15 Aug 2022 22:20:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106586 --- Comment #12 from Andrew Pinski --- Created attachment 53463 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53463&action=3Dedit Patch (which might depend on other patches) I have a full fix now. The problem I mentioned is a few different issues. First is SINGLE_BIT_MASK_OPERAND is not correct for 32bit for INT_MAX. single_bit_mask_operand and not_single_bit_mask_operand should be using SINGLE_BIT_MASK_OPERAND now too to correct for that also. Next issue is riscv_build_integer_1 should not special case SImode for !TARAGET_64BIT, it is already correct. The next issue is riscv_build_integer_1 needs to do trunc_int_for_mode. And then riscv_move_integer should do that also. Last but not least riscv_emit_int_compare forgot to do trunc_int_for_mode a= lso.=