From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D44D03858287; Tue, 5 Mar 2024 23:29:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D44D03858287 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709681349; bh=2iqQCy5JKZBwELAsC9KI7ZLF+krU8sprcHpzqeYbtBQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GnMUf+gJ5lUmWMbQKY8wbRKJAvuSfo6Scj/Xr5nqqGTu5zV3XV0F8DpKkL7s9iXQt ebb+fVxBLNDgeg/yya8eYAS2A6DWmhJbcs5qT27oZVGi4U1v/APZJyVJo1uYkI3KHG 5O2MgOA0NZwW7Rq9t9pdkUZtHRyeqJV54VV4xFNA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/114247] RISC-V: miscompile at -O3 and IPA SRA Date: Tue, 05 Mar 2024 23:29:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: bug_status keywords cf_reconfirmed_on component everconfirmed short_desc 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=3D114247 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |ABI Last reconfirmed| |2024-03-05 Component|target |ipa Ever confirmed|0 |1 Summary|RISC-V: miscompile at -O3 |RISC-V: miscompile at -O3 | |and IPA SRA --- Comment #1 from Andrew Pinski --- I think this is an IPA SRA issue. The IR looks like: j.constprop.isra (65535); That is wrong for signed short ... If I try manually I get: j12 (-1); ``` void j.constprop.isra (short int ISRA.10) { ... } ``` IS there another target where the upper bits of the register are defined?=