From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C3E093858C42; Sun, 24 Dec 2023 23:04:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3E093858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703459082; bh=nR13daN9iXW+kpCHyp+q4bpsEUULr4DPNM55zkYvTuE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eLvYssmXDWPmKhBmDgtYPTO1ezh4ASLhr0vg3FuAidei3agyEZ/hrbAT4N6AFQmpT com/uB3gYlNh0hfnJ7o89SUwcBvYhlf6HZc+uUDd3sY+tS4V2ab3JOn6GISKExj3Rh jyLCr1qP75/arVj2TT04QU0C+uVw9oiPS3FuzFZ8= From: "syq at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/104914] [MIPS] wrong comparison with scrabbled int value Date: Sun, 24 Dec 2023 23:04:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: syq 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=3D104914 --- Comment #20 from YunQiang Su --- This patch has 2 problems: 1. We may need some more steps to add gcc_assert (outprec < inprec) Now, I met some ICE with it. 2. It doesn't solve the this problem: In combine.cc, jump_insn eats truncate and sign_extend. In fact that is the real problem: How to tell combine.cc: don't eat it; this truncate/sign_extend is really needed by us.=