From patchwork Sun Aug 6 12:50:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiajie Chen X-Patchwork-Id: 131587 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp911379vqr; Sun, 6 Aug 2023 05:55:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHbZ99onnCdNJnz9dZKz8aOEE/mI1Sf+SXHCBEKV/0OZDuz3CsLV1YxpLIdznNP5ujkLWY9 X-Received: by 2002:a17:906:156:b0:99b:5ba6:f2cf with SMTP id 22-20020a170906015600b0099b5ba6f2cfmr5204072ejh.26.1691326521794; Sun, 06 Aug 2023 05:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691326521; cv=none; d=google.com; s=arc-20160816; b=M2knGVMx1foflriw5a2PEQc4lBBv5l4z6SsWuGb0fd6+ZAI6env3AGoxIKd6/mZvUs +IMkSsStOuJVqr5lYk+jTD+xdIcbLhRieRJIDmkcuR5h6Hf1u2Zr19tTOKSeq3XdQlNh ST6pUFXIE2clYejaqDwANy6Uwa+hTBZL/Ifxhd4KfyoCB5WNZdhkS9OunbbgFDRCoX1I 42KzxREU+HVupf545F5cohU6EomnYAVml5ZTbpZ8vdeKNnq72Vu88sZduD5aEOjb9XJb 2xXtuvP8cBlPeEiPfLoCmksaj2yLgPFEJ6TLpmWUD3SFC4n9oATGVu2GVN/zTijFd6xO Lv3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=tFO0fWd/9kr0f4oG8SGclzU3htv6Mlbv/ptQ3rQnUnE=; fh=cE5jVtj7gUY33yQFQBuNLHSg4tYpKtHOPxV+JSFpEWE=; b=x4qvdj5KlwKcbdPuPFQZQ4YT7kjOvLmLeuC8YAJ/MAf31uU3bsSJ55cpkRT2muueZD GfDXEkzJXHFuVDuCYGkmcFqzTdW117QXCbEqR9A3jeMd6H7VI/weORta3YwVAOEWt2y6 mFtMoYO8h8C0WbBa12CdGC3tDlAmAOO8n3+hOpXCcZKWX1m+6j1FnhHD+xmreS1AoNZq gC8Imu7w/MHbREIsaA++SQSYZOqrOKVcqzDu20dEEwJk9CGkn7zgFN/x2qPTqYR/R2aC hpgnVKv84TR4N2H2fFAaOQzDlx0OQAwaL2Wr7CWkMha5E3k4qouW+a+QfVmf8dN68nM1 bLgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="c/rXj4O8"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id u4-20020a1709060b0400b0098cda9c19f0si2485944ejg.762.2023.08.06.05.55.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Aug 2023 05:55:21 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="c/rXj4O8"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 65BA6385E00D for ; Sun, 6 Aug 2023 12:52:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65BA6385E00D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691326379; bh=tFO0fWd/9kr0f4oG8SGclzU3htv6Mlbv/ptQ3rQnUnE=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=c/rXj4O8lSqtKV2UB1kx80gYyrdAcs7Ydn0wNGGC8dGvFvhZhl+YoOSc8d0wLHqxn 9yRhiDfm+b+jsq6Nj5C4YXqI3bXD6vpzzMzXT4VgrFy6BdcPBY7R5jUS5SdELwaWnz Pb7MlxiZ+ZTAfmjdehfH3ovI4yCEtG6sH1A+/koA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from hognose1.porkbun.com (hognose1.porkbun.com [35.82.102.206]) by sourceware.org (Postfix) with ESMTPS id D7895385840F for ; Sun, 6 Aug 2023 12:51:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D7895385840F Received: from cslab-alder.. (unknown [166.111.226.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: c@jia.je) by hognose1.porkbun.com (Postfix) with ESMTPSA id 4D77943168; Sun, 6 Aug 2023 12:51:13 +0000 (UTC) To: gcc-patches@gcc.gnu.org Cc: Jiajie Chen Subject: [PATCH 5/9] LoongArch: Fix 64-bit move for loongarch32 target Date: Sun, 6 Aug 2023 20:50:02 +0800 Message-ID: <20230806125010.283900-5-c@jia.je> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230806125010.283900-1-c@jia.je> References: <20230806125010.283900-1-c@jia.je> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jiajie Chen via Gcc-patches From: Jiajie Chen Reply-To: Jiajie Chen Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773484398451007743 X-GMAIL-MSGID: 1773484398451007743 Bring back 64-bit move splitting for loongarch32. The code was removed in commit 16fc26d4e7a (`LoongArch: Support split symbol.`) for unknown reason. gcc/ChangeLog: * config/loongarch/loongarch.md: Handle move splitting for 64-bit operands. --- gcc/config/loongarch/loongarch.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md index 93d8bf5bcca..9eb6bb75c35 100644 --- a/gcc/config/loongarch/loongarch.md +++ b/gcc/config/loongarch/loongarch.md @@ -1965,6 +1965,16 @@ [(set_attr "move_type" "move,load,store") (set_attr "mode" "DF")]) +(define_split + [(set (match_operand:MOVE64 0 "nonimmediate_operand") + (match_operand:MOVE64 1 "move_operand"))] + "reload_completed && loongarch_split_move_p (operands[0], operands[1])" + [(const_int 0)] +{ + loongarch_split_move (operands[0], operands[1], curr_insn); + DONE; +}) + ;; Emit a doubleword move in which exactly one of the operands is ;; a floating-point register. We can't just emit two normal moves ;; because of the constraints imposed by the FPU register model;