From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A2DC93858D33; Thu, 16 Feb 2023 18:09:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2DC93858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676570966; bh=M2Y0dWLE5IydGNuyZCoUqB0/KymGpaN7qiR4XbxN6iE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eQT4pRPfR01KBqQH+Z0PGpWQo0KaeApicJnPnvbYJ/wSQwkc2ogrcixBpO/hqPTw6 RgV0hBBzAtQ04Bxl+VjYPhfiSb3r+ryew8deIbfRnVVL0SnNNVGLEsKNCcfbFMUTg4 3cvg5PHlXK2Jvdvp/QiIQWqpTQIRukD6Gwjyis3Q= 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:09:26 +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: keywords cf_reconfirmed_on bug_status everconfirmed 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 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Last reconfirmed| |2023-02-16 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #4 from Andrew Pinski --- Trying 13, 14, 15 -> 16: 13: r84:DI=3Dr83:DI+0xc8 REG_DEAD r83:DI 14: r85:DI=3Dr84:DI<<0x2 REG_DEAD r84:DI 15: r86:DI=3Dr72:DI+r85:DI REG_DEAD r85:DI 16: r76:DI=3Dsign_extend([r86:DI]) REG_DEAD r86:DI Failed to match this instruction: (set (reg:DI 76 [ _5 ]) (sign_extend:DI (mem:SI (plus:DI (plus:DI (mult:DI (reg:DI 83) (const_int 4 [0x4])) (reg/f:DI 72 [ _nettle_aes_decrypt_T.0_1 ])) (const_int 800 [0x320])) [2 _nettle_aes_decrypt_T.0_1->table[2][_4]+0 S4 A32]))) Failed to match this instruction: (set (reg/f:DI 86) (plus:DI (ashift:DI (reg:DI 83) (const_int 2 [0x2])) (reg/f:DI 72 [ _nettle_aes_decrypt_T.0_1 ]))) So combine does know how to combine all 4 instructions and produce the plus= 800 there. But then it goes and splits it up and fails. I can't remember if the= re is 4->3 splitting or just 4->2 .=