From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1F22A3858D33; Thu, 16 Feb 2023 18:25:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F22A3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676571921; bh=RNI+5t9KXL3z807UcMqXliPfDYreFXB6jF2l1B83N+4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mi3U/uaETUTO+86PiBDD0tnsRke8fVwbjrBs7lRqLznikAZ1ywTazAf1I3dph87XH hxdP1iBGyUCpMQQ+Z2JthKVQ8RHshS3f8D8c49WPgaBWSMKGpp536qnHqg+PPwmt64 QfknBNeQXnY2E+v/mIxKn5FmKZOoa24PwHzPfIMw= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/108826] Inefficient address generation on POWER and RISC-V Date: Thu, 16 Feb 2023 18:25:20 +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: unknown X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement 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: 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=3D108826 --- Comment #6 from Andrew Pinski --- (In reply to palmer from comment #5) > We've run into a handful of things that look like this before, I'm not su= re > if it's a backend issue or something more general. There's two patterns > here that are frequently bad on RISC-V: "unsigned int" array indices and > unsigned int shifting. I think they might both boil down to some problems > we have tracking the high parts of registers around ABI boundaries. That seems unrelated to the issue here. In this case the shift is in DI (ptrmode) mode already so the shift is fine. See comment # 4 for the RTL (t= his was the RTL even for RV64).=