public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jiajie Chen <c@jia.je>
To: gcc-patches@gcc.gnu.org
Cc: xry111@xry111.site, xuchenghua@loongson.cn, Jiajie Chen <c@jia.je>
Subject: [PATCH v2 03/14] LoongArch: Fix SI division for loongarch32 target
Date: Wed,  9 Aug 2023 19:46:10 +0800	[thread overview]
Message-ID: <20230809115325.3716347-4-c@jia.je> (raw)
In-Reply-To: <20230809115325.3716347-1-c@jia.je>

Add TARGET_64BIT check for loongarch64-only handling of SI division. It
shall not promote SI to DI before division in loongarch32 target.

gcc/ChangeLog:

	* config/loongarch/loongarch.md: Add TARGET_64BIT check for
	loongarch64-only handling of SI division.
---
 gcc/config/loongarch/loongarch.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md
index b37e070660f..95c5b25d22a 100644
--- a/gcc/config/loongarch/loongarch.md
+++ b/gcc/config/loongarch/loongarch.md
@@ -851,7 +851,7 @@
 		     (match_operand:GPR 2 "register_operand")))]
   ""
 {
- if (GET_MODE (operands[0]) == SImode)
+ if (GET_MODE (operands[0]) == SImode && TARGET_64BIT)
   {
     rtx reg1 = gen_reg_rtx (DImode);
     rtx reg2 = gen_reg_rtx (DImode);
-- 
2.41.0


  parent reply	other threads:[~2023-08-09 11:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09 11:46 [PATCH v2 00/14] LoongArch: Add loongarch32 and ilp32 abi Jiajie Chen
2023-08-09 11:46 ` [PATCH v2 01/14] LoongArch: Introduce loongarch32 target Jiajie Chen
2023-08-09 14:03   ` Xi Ruoyao
2023-08-09 11:46 ` [PATCH v2 02/14] LoongArch: Fix default ISA setting Jiajie Chen
2023-08-09 11:46 ` Jiajie Chen [this message]
2023-08-09 11:46 ` [PATCH v2 04/14] LoongArch: Fix movgr2frh.w operand order Jiajie Chen
2023-08-09 11:46 ` [PATCH v2 05/14] LoongArch: Fix 64-bit move for loongarch32 target Jiajie Chen
2023-08-09 11:46 ` [PATCH v2 06/14] LoongArch: Fix 64-bit immediate " Jiajie Chen
2023-08-09 11:46 ` [PATCH v2 07/14] LoongArch: Fix signed 32-bit overflow " Jiajie Chen
2023-08-09 11:46 ` [PATCH v2 08/14] LoongArch: Disable SF/DF -> unsigned DI expand in loongarch32 Jiajie Chen
2023-08-09 11:46 ` [PATCH v2 09/14] LoongArch: Add -march=loongarch64 to tests with -mabi=lp64d Jiajie Chen
2023-08-09 11:46 ` [PATCH v2 10/14] LoongArch: Forbid ADDRESS_REG_REG in loongarch32 Jiajie Chen
2023-08-09 11:46 ` [PATCH v2 11/14] LoongArch: Mark am* instructions as LA64-only Jiajie Chen
2023-08-09 14:08   ` Xi Ruoyao
2023-08-09 11:46 ` [PATCH v2 12/14] LoongArch: Set long double width to 128 in la32 Jiajie Chen
2023-08-09 11:46 ` [PATCH v2 13/14] LoongArch: Fix ilp32 detection Jiajie Chen
2023-08-09 11:46 ` [PATCH v2 14/14] LoongArch: Allow ftintrz for DF->DI in loongarch32 Jiajie Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230809115325.3716347-4-c@jia.je \
    --to=c@jia.je \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).