From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from t03.bc.larksuite.com (t03.bc.larksuite.com [209.127.231.39]) by sourceware.org (Postfix) with UTF8SMTPS id B02033858D20 for ; Tue, 21 Feb 2023 03:16:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B02033858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=oss.cipunited.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oss.cipunited.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=s1; d=oss-cipunited-com.20200927.dkim.feishu.cn; t=1676949364; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=2kdJUnG/aFUJ0EO3Jis2zy6VEtXzUyL6/okYJh1wonI=; b=PoZJlAR0X7IGCYncJIhLMSnN7noZGaDClJ2P+2UdxE1Fyxnsg4iE1pM579PwdVA3fXx6dy +Gsy8Kelulh2ZWuRryKXTPg9yPjDCPO6zqj8jyydrVtIsKgr/Uf8LUA1yRS2746NUZpiGs s1/4KGUBLSQ5sJRL+31yccoA5sRu/arkjdxeHhcEq7Lc7O5S2qJATPh7HqMBb7od4aAhcb On27I5TMIGdvy4qrglUfwQ3cEvL27apIXVuh2OjStPkRlZorY7WNLOVlvUaXJN9KIt592j Uu0d1zA7LzHmbLJGK/WTUjzUSqkS+3+M74eCYHpTRKo1NslcJBGHT55LUdCTrQ== Subject: [PATCH] MIPS: Account for LWL/LWR in store_by_pieces_p. Content-Transfer-Encoding: 8bit Message-Id: <20230221031524.220339-1-xin.liu@oss.cipunited.com> To: Date: Tue, 21 Feb 2023 11:16:04 +0800 Mime-Version: 1.0 X-Mailer: git-send-email 2.30.2 Content-Type: multipart/alternative; boundary=a9e10261aa802dbc02d35bd7dc2f0ea1d263a2ab5ec2393000689d307c9d Cc: "Matthew Fortune" From: "Xin Liu" X-Lms-Return-Path: X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,HTML_MESSAGE,HTML_NONELEMENT_30_40,SPF_HELO_NONE,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 List-Id: --a9e10261aa802dbc02d35bd7dc2f0ea1d263a2ab5ec2393000689d307c9d Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 From: Matthew Fortune --- gcc/config/mips/mips.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index 590c311e98c..bb9f4e19c22 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -8853,7 +8853,7 @@ mips_store_by_pieces_p (unsigned HOST_WIDE_INT size, = unsigned int align) LW/SWL/SWR sequence. This is often better than the 4 LIs and 4 SBs that we would generate when storing by pieces. */ if (align <=3D BITS_PER_UNIT) - return size < 4; + return size < 4 || !ISA_HAS_LWL_LWR; =20 /* If the data is 2-byte aligned, then: =20 @@ -8888,7 +8888,9 @@ mips_store_by_pieces_p (unsigned HOST_WIDE_INT size, = unsigned int align) (c4) A block move of 8 bytes can use two LW/SW sequences or a single LD/SD sequence, and in these cases we've traditionally preferred the memory copy over the more bulky constant moves. */ - return size < 8; + return (size < 8 + || (align < 4 * BITS_PER_UNIT + && !ISA_HAS_LWL_LWR)); } =20 /* Emit straight-line code to move LENGTH bytes from SRC to DEST. --=20 2.30.2= --a9e10261aa802dbc02d35bd7dc2f0ea1d263a2ab5ec2393000689d307c9d--