From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 969BF3858C52; Thu, 19 Jan 2023 23:23:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 969BF3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674170624; bh=tI2c9iIafQncwDn5jQjWwz6Afj8D6LAYPGKpbJ8/8s4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=F1VQIp5NQWkmOgvjNAtKCi8K0tkh0CDzMUSgZvBP9rVC9ePHtzywnEFtrsWfRRpPC JpQbS5qcQX7nnp043l8GtcA3n4i1O9yWFlcWr3ih+jJZBWAMRfbOPHcGQ4b7CUiTG1 HLJMQNsQ7Yxh7YJHUDiVDXd43/egZP+a1usa9Los= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/97961] unnecessary moves with __builtin_{add,sub}_overflow_p and __int128 Date: Thu, 19 Jan 2023 23:23:44 +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: 11.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE 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 resolution 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=3D97961 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from Andrew Pinski --- Dup of bug 94804. The problem is arguments. If we do: ``` bool f1(unsigned __int128 *a,unsigned __int128 *b) { return __builtin_add_overflow_p(*a, *b, (unsigned __int128)0); } bool f2(__int128 *a,__int128 *b) { return __builtin_add_overflow_p(*a, *b, (__int128)0); } bool f3(unsigned __int128 *a,unsigned __int128 *b) { return __builtin_sub_overflow_p(*a, *b, (unsigned __int128)0); } bool f4(__int128 *a,__int128 *b) { return __builtin_sub_overflow_p(*a, *b, (__int128)0); } ``` We don't get extra mov's. *** This bug has been marked as a duplicate of bug 94804 ***=