From patchwork Fri Dec 29 04:00:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 183845 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp2369808dyb; Thu, 28 Dec 2023 20:01:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFleHagQvWWNagWdUXqzNdFrTddtwzOwrMTfd1ZxXeDQG7iFZA/KgavIhFeXmeWsv7Urwq1 X-Received: by 2002:a05:6358:41a1:b0:174:f665:20e1 with SMTP id w33-20020a05635841a100b00174f66520e1mr1777789rwc.35.1703822478016; Thu, 28 Dec 2023 20:01:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703822477; cv=pass; d=google.com; s=arc-20160816; b=08bFpxzEvKby9pxr8DdY0FtszEhuB2CAFEzWDjUOXmEZl0sMpuW4mmftJpdAQMASGo sQs8jeyWgt4M7Ac8qTuELJ3R6NDXjY/TM4sAGNzGnr9oebdvN4qG0IA7jNNwJI+rsRnH synfKqNq/J09AoYvhLEtJRDU/EgPeJ9llWM2bP+bMEhqcb0yWvOf3jl2QJlpBFFaaSIQ 2yl9q1dj+91Xg4X/M330tYIGXMkcGffi9J1akbjuLdjCpRUjgBIKEvSmsHXgQwYwW3sO xgvbRXf9YCbwZilUlIdubTWaTeOl39apOi4a4eIWLwX6tcTWD657Cmsvq6onsY9IyvZS rlgg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:arc-filter :dmarc-filter:delivered-to; bh=sAlpLhTfftujwbJV9bg5VzOwVROpq4BJVHOUrMXXSDE=; fh=07/xOk1UKKqrHVgsP0kGDmgQ1XpCe9p2pXNV2MAWrOk=; b=sAq3sdwAaOv9wLsUsAadri43C1og6Hmo5XiegC9pOzYGyttZb7n6Kv2bCkl848pZ3D xBsWCwjD8m1xYBs1MJG+M8nC+HQEO65/RWdVcDfdKsT09SUmlSGD1ZkbkfViKIkKcbxw 3WepghEY/g5hnzMm3PIJubirgQqFCyWA0p8Tc/duuTUpDDNZyJIT0EQyAv1f1Fyfh5HT oRReIu6ziZYw+OT6lkgjrDqHxjILvRu/r1HpfGcbcphoXHUg4Y2faRmxFmyRRJhT/For PNFwyBNxfPjiOIp5XSOf1xY6V68R3PqIOOm7R7ovSiLxTO51l3BqvjMlaJtQdp+wuaTG PmTA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); 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" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id gu15-20020a056214260f00b006801adc03a3si9403810qvb.342.2023.12.28.20.01.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 20:01:17 -0800 (PST) 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; arc=pass (i=1); 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B281A3858C52 for ; Fri, 29 Dec 2023 04:01:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id EC8DD3858D28 for ; Fri, 29 Dec 2023 04:00:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC8DD3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EC8DD3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703822438; cv=none; b=cUaTfrnGSMrywvJV0N/UA+vNr15vYd4aNJW6lZagYf1XPcmXyMZU8EXoHJYfC2seb4lXSfUzfVyQKIpxyLfxaWWzZe1BOsUEjPAD8dZf5hFbU4fDDotImDnvQZczvdgG8vM9I+mNEYuoYhtMSGVHYUmrs/mXYogou9Z5gLdjB14= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703822438; c=relaxed/simple; bh=g1kfXC3Pv+75P+Ev57D7G5uIqq68cg2K4gGzhg7JAp0=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=SMvDLbtBC20YY+ptUDTTljqHiR0HxcfClft0ONcHLJnW9Akh/dcFPl8biazhosu4FgBiCM9k5A1V+qsTfu8n6l8cCV8DTnz5NYpkgJFXphis0s8L0FPHc86q1f/O1TIUFC8R4oWZYyzrxzh+meW1rGjhMhSh2VslGIhiR3XmB10= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail.loongson.cn ([114.242.206.163]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJ430-0007ZS-3B for gcc-patches@gcc.gnu.org; Thu, 28 Dec 2023 23:00:36 -0500 Received: from loongson.cn (unknown [10.10.130.252]) by gateway (Coremail) with SMTP id _____8CxrutZRI5l0FMAAA--.1551S3; Fri, 29 Dec 2023 12:00:26 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxmb1XRI5lYS8PAA--.22588S4; Fri, 29 Dec 2023 12:00:23 +0800 (CST) From: chenxiaolong To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn, richard.sandiford@arm.com, chenxiaolong Subject: [PATCH v1] LoongArch: testsuite:Add the "-ffast-math" compilation option for the file vect-fmin-3.c. Date: Fri, 29 Dec 2023 12:00:15 +0800 Message-Id: <20231229040015.6275-1-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cxmb1XRI5lYS8PAA--.22588S4 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQAABWWOLK8CFQAAs7 X-Coremail-Antispam: 1Uk129KBj93XoWrZw47ury5GFyxtFyUWw1Dtwc_yoW8JF4Upw 13CF93Cr4kWF1xW3Z7uFZ5XF1ruw4IgFZ8ur1Ig3yI93WUtr1qvw45tr4xJ343JFWF9Fy3 Zw48u34UZ3sIkrbCm3ZEXasCq-sJn29KB7ZKAUJUUUUr529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUU9Ib4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07 AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWU XVWUAwAv7VC2z280aVAFwI0_Cr0_Gr1UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x 0EwIxGrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AK xVWUXVWUAwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67 AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI 42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMI IF0xvEx4A2jsIE14v26F4j6r4UJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnI WIevJa73UjIFyTuYvjxU7SdyUUUUU Received-SPF: pass client-ip=114.242.206.163; envelope-from=chenxiaolong@loongson.cn; helo=mail.loongson.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_FAIL, SPF_HELO_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786587358869892829 X-GMAIL-MSGID: 1786587358869892829 After the detection of maximum reduction is enabled on LoongArch architecture, the regression test of GCC finds that vect-fmin-3.c fails. Currently, in the target-supports.exp file, only aarch64,arm,riscv, and LoongArch architectures are supported. Through analysis, the "-ffast-math" compilation option needs to be added to the test case in order to successfully reduce using vectorization. The original patch was submitted by author Richard Sandiford. The initial patch information submitted is as follows: commit e32b9eb32d7cd2d39bf9c70497890ac61b9ee14c gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-fmin-3.c:Adding an extra "-ffast-math" to the compilation option ensures that the loop can be reduced to maximum success. --- gcc/testsuite/gcc.dg/vect/vect-fmin-3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c b/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c index 2e282ba6878..edef57925c1 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c +++ b/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target vect_float } */ +/* { dg-additional-options "-ffast-math" } */ #include "tree-vect.h"