From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D8DBC38582BC; Wed, 12 Oct 2022 13:36:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8DBC38582BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665581819; bh=LIX9cGEUo+/E4ZFVCWXeHC1I/izPDnPSZsxaZlk3tF8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AModxFZxwCBTjRIu0CozUHZe50uSGgqPcuxtpZLcV6n23Bh0M6RJz/TfuNj97VkJP l3rQh7xAm8y8cHoxiXGHEMg1fp37koXd/4JnLRdBF0jyGlkrh3Qpw7WhywRd0OJVZp NX1Jw0FydyKFdQubbiDiJmaa+fJpyA+79J97Cb0g= From: "zhongyunde at huawei dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107090] [aarch64] sequence logic should be combined with mul and umulh Date: Wed, 12 Oct 2022 13:36:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: zhongyunde at huawei dot com 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=3D107090 --- Comment #8 from vfdff --- hi @Andrew Pinski For the 2nd issue, I also matched the huge pattern, but it need return two value, it seems don't work with current framework? so should I have to spli= t it into two simples to match the high and low values of ResHi and ResLo separately? ``` (i64 ResLo, i64 ResHi) =3D Mul64(i64 In0, i64 In1) { In0Hi =3D In0(D) & 4294967295; In0Lo =3D In0(D) >> 32; In1Hi =3D In1(D) & 4294967295; In1Lo =3D In1(D) >> 32; Mull_01 =3D In0Lo * In1Hi; Addc =3D In0Hi * In1Lo + Mull_01; addc32 =3D Addc << 32; ResLo =3D In0Hi * In1Hi + addc32; ResHi =3D ((long unsigned int) (addc32 > ResLo)) + In0Lo * In1Lo + (((long unsigned int) (Mull_01 > Addc)) << 32) + (Addc >> 32); } ```=