From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D5425385840D; Sun, 31 Dec 2023 21:39:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5425385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704058783; bh=UCy5i0+kNf0FDAMFlQQC6XY+uJN+6xDgFQQ8MOE8G98=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Hgft3bNeQTW8VO0lhsb5MtK8ongLLnywgBS6HnJtkxtoo7HFi1WTWekAdcKHvQTd3 Rxt/5dRqYozWGFWoo/Z1zV2fKFOgUwe0Dd3+OCy3aKHr2HbMEIV+bABlFbZGr0xUWK MNvHUrCqcG+THulryagTLyrbHF6bxF6hsbNKP3/o= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/43644] __uint128_t missed optimizations. Date: Sun, 31 Dec 2023 21:39:41 +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: 4.5.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit 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=3D43644 --- Comment #5 from GCC Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:79e1b23b91477b29deccf2cae92a7e8dd816c54a commit r14-6874-g79e1b23b91477b29deccf2cae92a7e8dd816c54a Author: Roger Sayle Date: Sun Dec 31 21:37:24 2023 +0000 i386: Tweak define_insn_and_split to fix FAIL of gcc.target/i386/pr43644-2.c This patch resolves the failure of pr43644-2.c in the testsuite, a code quality test I added back in July, that started failing as the code GCC generates for 128-bit values (and their parameter passing) has been in flux. The function: unsigned __int128 foo(unsigned __int128 x, unsigned long long y) { return x+y; } currently generates: foo: movq %rdx, %rcx movq %rdi, %rax movq %rsi, %rdx addq %rcx, %rax adcq $0, %rdx ret and with this patch, we now generate: foo: movq %rdi, %rax addq %rdx, %rax movq %rsi, %rdx adcq $0, %rdx which is optimal. 2023-12-31 Uros Bizjak Roger Sayle gcc/ChangeLog PR target/43644 * config/i386/i386.md (*add3_doubleword_concat_zext): Tweak order of instructions after split, to minimize number of moves. gcc/testsuite/ChangeLog PR target/43644 * gcc.target/i386/pr43644-2.c: Expect 2 movq instructions.=