From patchwork Wed Aug 9 11:46:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiajie Chen X-Patchwork-Id: 133177 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2744940vqr; Wed, 9 Aug 2023 04:59:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvQEc3LFpEp4AN6uCssOnfck3BzewAYPfBiBlQm/u7VrQYpZekwmwhJ7d0MN7+eHftazub X-Received: by 2002:a2e:924c:0:b0:2ba:18e5:106f with SMTP id v12-20020a2e924c000000b002ba18e5106fmr1799037ljg.30.1691582368484; Wed, 09 Aug 2023 04:59:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691582368; cv=none; d=google.com; s=arc-20160816; b=orGQptnv9VTLqBWmIeOAcQcmy/iVEjdN03r0Kii2zg1OSZbIKY+t9BE7lR5sORPMZE eDR26X94qHqzKybTGJMNqzlfDwkgHskzTwPAcETdwNPP6+GfIYs2As/XL8gOy8dwtQRZ qErCs3K2SMG5GFWg2nkWLukuVwSGNOKrpJSlFIZ6bh+rdZ8SLz6kDq4C/cAnSrcxMrFt JBRrqnVkPg0/JcQDXa0zRux9mKYvfgF8m7QgIaE/7sES3vNrdkarjx/MiPipnq/NyzN5 xUbeXTN0MP1eVC/uTAkuapYjwZxtg78BZ3Q4FtoCaRVWWv8atHw/gKB/qw1OBbVDe1uj jl4A== 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=W+149kOXLVPnKYuIdTbqRu1++L9UxRWTIRLBI73cstg=; fh=nBdY3vW/mgwv3C0AxagIWVpWoiWSUh4TsWT+uiKUcFM=; b=sHH5SOYiywbv289biSNiBMDDle2EsQ4eOKHgcAAp9v/1RKGUNrTRt0+B85724ae/c7 yMID3o+kSCTYVKcQOQ8f4tiEzjD4C8zxFS6wbjT7SiPLn9ok0AuW51lp/zhwAVssi0+f 2g0xqmnWaoKzET91SD+2XzKWiUY84uS4/NTyY4T0X7HxjRJ4QAzTBZIoRmEYspM+p+zF 1GEHZuaDQyhmn70+qTbeln1MquXc16C8N2zuQ38PQM+xHLMsQMmQXTsqt3FWLP355AvJ HLH6ZICJMcMed4tGExizvVNSBwx6OHniWEnH4VtvTP0/2sL3Ivt3WwtkNbygxmukoxjl CXtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hOrPBu9W; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g2-20020a17090670c200b0099325564b77si8608111ejk.548.2023.08.09.04.59.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 04:59:28 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hOrPBu9W; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 0F4BE385B51F for ; Wed, 9 Aug 2023 11:57:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F4BE385B51F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691582252; bh=W+149kOXLVPnKYuIdTbqRu1++L9UxRWTIRLBI73cstg=; 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=hOrPBu9WHijPAPKTqmW1zOfva5mS3b7I45K9xdU/lInokbagth29NZ/VttKqCGeZc zROUOtC8L48IxfaUZBNXO+acAtLUYrFsMBa7OGmk9s9YeFDqXo4X+ryawTsB41R+Qz Alg+9J/CUaV20RISb0jXJO8fxw7FG332hOU+1fEY= 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 401CA385735E for ; Wed, 9 Aug 2023 11:54:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 401CA385735E Received: from cslab-raptor.. (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 1EB9E43FAD; Wed, 9 Aug 2023 11:54:01 +0000 (UTC) To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, xuchenghua@loongson.cn, Jiajie Chen Subject: [PATCH v2 08/14] LoongArch: Disable SF/DF -> unsigned DI expand in loongarch32 Date: Wed, 9 Aug 2023 19:46:15 +0800 Message-ID: <20230809115325.3716347-9-c@jia.je> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809115325.3716347-1-c@jia.je> References: <20230809115325.3716347-1-c@jia.je> MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, 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: 1773752673774795350 X-GMAIL-MSGID: 1773752673774795350 The current SF/DF -> unsigned DI expand rules require iordi3 insn which is not available in loongarch32. gcc/ChangeLog: * config/loongarch/loongarch.md (fixuns_truncdfdi2): Add TARGET_64BIT to condition. (fixuns_truncsfdi2): Add TARGET_64BIT to condition. --- gcc/config/loongarch/loongarch.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md index c611a8a822a..31bdf3388f6 100644 --- a/gcc/config/loongarch/loongarch.md +++ b/gcc/config/loongarch/loongarch.md @@ -1576,7 +1576,7 @@ (define_expand "fixuns_truncdfdi2" [(set (match_operand:DI 0 "register_operand") (unsigned_fix:DI (match_operand:DF 1 "register_operand")))] - "TARGET_DOUBLE_FLOAT" + "TARGET_DOUBLE_FLOAT && TARGET_64BIT" { rtx reg1 = gen_reg_rtx (DFmode); rtx reg2 = gen_reg_rtx (DFmode); @@ -1658,7 +1658,7 @@ (define_expand "fixuns_truncsfdi2" [(set (match_operand:DI 0 "register_operand") (unsigned_fix:DI (match_operand:SF 1 "register_operand")))] - "TARGET_DOUBLE_FLOAT" + "TARGET_DOUBLE_FLOAT && TARGET_64BIT" { rtx reg1 = gen_reg_rtx (SFmode); rtx reg2 = gen_reg_rtx (SFmode);