From patchwork Mon Sep 9 14:27:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 1982610 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X2Tj05yZ8z1y1D for ; Tue, 10 Sep 2024 00:28:36 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE7DF3858282 for ; Mon, 9 Sep 2024 14:28:30 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from dellerweb.de (unknown [IPv6:2a02:c207:3003:236::1]) by sourceware.org (Postfix) with ESMTPS id 87D723858C53 for ; Mon, 9 Sep 2024 14:28:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87D723858C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=parisc-linux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=parisc-linux.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 87D723858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a02:c207:3003:236::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725892092; cv=none; b=kQ4d7aX0HeBTtn7V79eM2qjCgq379nfTJrQEH2TKZB88ts6iM0OoVhgEjTE60xAyiL/MeSc0wpbSO5qxP6tfWYzi7NbIjOu72FUB6HdB/vIShUPJafGpZcAmIju/DhdkDtJzIB+a8KzdkJQKR0+gMmi0t1aUqs0xiZbwpRckCr4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725892092; c=relaxed/simple; bh=8i+uE8TnxOISZUapt4RNPzLwGfDwZiW8Oo8YchScATw=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=F/CtFj2BjjAtAnM8g2ti1XoMYUu2ZuehtRly+am1rV0VjHQgNRFV6AO86FNkKey+6C3od82LiWbw3AzxE0KAfgy8jMhI7Q7VPqn2S7BdX8zWurWpS1LoQQ6uMPZDILfcFvCvgh7ktMp2GQwZeo3uym6Rh+txLPTYCxgh//nYt48= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mx3210.localdomain (unknown [142.126.146.130]) by dellerweb.de (Postfix) with ESMTPSA id 534181600241; Mon, 9 Sep 2024 16:28:08 +0200 (CEST) Received: by mx3210.localdomain (Postfix, from userid 1000) id 96342D6011B; Mon, 9 Sep 2024 10:27:56 -0400 (EDT) Date: Mon, 9 Sep 2024 10:27:56 -0400 From: John David Anglin To: GCC Patches Subject: [committed] hppa: Don't canonicalize operand order of scaled index addresses Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Tested on hppa64-hp-hpux11.11 and hppa-unknown-linux-gnu. Committed to trunk. Dave --- hppa: Don't canonicalize operand order of scaled index addresses pa_print_operand handles both operand orders for scaled index addresses, so it isn't necessary to canonicalize the order of operands. 2024-09-09 John David Anglin gcc/ChangeLog: * config/pa/pa.cc (pa_legitimate_address_p): Don't canonicalize operand order of scaled index addresses. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 631f18a0ef5..84aa4f1b1f2 100644 --- a/gcc/config/pa/pa.cc +++ b/gcc/config/pa/pa.cc @@ -11022,14 +11022,13 @@ pa_legitimate_address_p (machine_mode mode, rtx x, bool strict, code_helper) return true; if (!TARGET_DISABLE_INDEXING - && GET_CODE (index) == MULT /* Only accept base operands with the REG_POINTER flag prior to reload on targets with non-equivalent space registers. */ && (TARGET_NO_SPACE_REGS - || (base == XEXP (x, 1) - && (reload_completed - || (reload_in_progress && HARD_REGISTER_P (base)) - || REG_POINTER (base)))) + || reload_completed + || (reload_in_progress && HARD_REGISTER_P (base)) + || REG_POINTER (base)) + && GET_CODE (index) == MULT && REG_P (XEXP (index, 0)) && GET_MODE (XEXP (index, 0)) == Pmode && MODE_OK_FOR_SCALED_INDEXING_P (mode)