From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D1DB13858D35; Tue, 14 Feb 2023 19:19:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1DB13858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676402378; bh=YlNG1UOBsqR20qKhHp+k7eMMCztD+xExVj8E4HXXPGU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=H5mvbiQ0PpqaoMK/3WDx3m7OFxtDe+qFct5p8g9YukwEinwnvO1u3yuT87NPLInGT An7lOV7Mt28Dauo5/VyzMWXwGoWz97/DtwVmgxXFIizbcRYxh4ulm2BJTCl1c+RJ3J CzGprI/EOW3z+h4kLUhkcjUbdOiJGRQRz+ZleFts= From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108787] [13 Regression] libsodium miscompilation on power9 starting with r13-2107 Date: Tue, 14 Feb 2023 19:19:38 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on everconfirmed bug_status 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=3D108787 Segher Boessenkool changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-02-14 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #5 from Segher Boessenkool --- The maddhd insn does a sign-extend of the addend as well, so simply adding the high part of it is not enough. I don't see how to solve this with any machine code using the new madd* ins= ns that is at least as good code as the mulld;mulhd;addc;adde we would otherwi= se generate. We should still have machine patterns for the insn we have (it can be used if operands[3] here is only one machine word for example), but we shouldn't have a define_expand for maddditi4? (For umaddditi4 we can of course, and that is even useful if it results in better generated code).=