From patchwork Tue Nov 7 03:36:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "juzhe.zhong@rivai.ai" X-Patchwork-Id: 162255 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp3077301vqu; Mon, 6 Nov 2023 19:37:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWMg0Gpzt0QK6r1KW7m+oDyjNmvBIiCm/QvXQdPsowbhNe8B3alsn320vnS3DsUsuNbCft X-Received: by 2002:a05:620a:28d2:b0:779:d9ee:d35f with SMTP id l18-20020a05620a28d200b00779d9eed35fmr35477628qkp.32.1699328241587; Mon, 06 Nov 2023 19:37:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699328241; cv=pass; d=google.com; s=arc-20160816; b=hi5bhseruEWQKQhUvwXAl8Z203YLZS2+JJPcAPB+NQ6Q1HqBmfT/jOih42A2IIB34b h7aFZFnop2sLt1x87BkkTmtpqdxg1Cn02+CipH9lWd9erP8SmOjvFHYqi2vz/eHOYaKm 3Omhl0nDysjp43NNfZH+xJz442HUU06kHPNl0AqrWk3PLOCA+NsqtNZbDoy+rF+CDC/5 ZaVslzGmsXgznIb/ryeyvqSZm2s0WJM3mQCiTWJ75hpsnBfgh7Nx7t2vpf19czS/ZVzh 4gsh2I+zzjFh5Iip+Gi8b4G7rslCWDTBurQkG0eiQu1ev/9FDqVJtC7mLNYA3bTPbkYI CA3Q== 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:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:arc-filter:dmarc-filter:delivered-to; bh=Qom0PuqLbzCeIC2ERDpgWz3yKq58bsvG93OvO/p9MGo=; fh=Ytz0BgUryGxSKnlvo5iIYZYov/AuWMbdn9WUJJDE2rE=; b=diysG9haemxW8EZxTq6aDQUmghw09prJxe/Ecdw6XsAjTIvmzLZmnxvwn9pQe06aBP tqOnKkY9F3dd7h5yXd0fUEBvA/6BD7ti0kN0r3F2jkMIOjyPyH3BwUL5GT3fvShjF1kF m1vIuCidIKDJAW6Bu/YDGfBbDZd04h6N5Eq18czYVTRpHP+b7PfiV8lb84cbXokFKIhp cWQaXegtKfamiACZuQaLIEn80A2MzM1XrrFt/33NDOx1rOhXK2bxlY2rI37mQexohaVv F5mpS8Oly3tYUphnmvDdyYr4ATngPME1cn2zUtIUE0HD7yAB+Av+Skdd1xjB5tIEySlP hKAg== 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 17-20020a05620a049100b0077a739bbb99si5337143qkr.108.2023.11.06.19.37.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 19:37:21 -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 5A2B33858C52 for ; Tue, 7 Nov 2023 03:37:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) by sourceware.org (Postfix) with ESMTPS id 75B343858D1E for ; Tue, 7 Nov 2023 03:36:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 75B343858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 75B343858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=54.204.34.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699328218; cv=none; b=wDUg7VAFzrl/Gu/QJGFWxuVbJuR7tnif+QEknSvfM78rqFYm+EnKmMOfs6h1BnVds3MxCgC2/QQ2p/OqrKr41Bp185UvochH8QMze4VKO7mRf3XE8K7qL8Ipi2Pv4F6gjCLZmuSoe/HLtzHceZx1nnafI3cBaiSxR/GDT4TW+9w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699328218; c=relaxed/simple; bh=ewf4jeIKSb2SbwfanIYTSBqOoFl+6lzcYEzjxYO3whc=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=p93QtMDHX8q4r/S2d24Ivq6wTrftmVL9FCq0/q6IKseYv91B9XeGV1keHdffRmn8k6zdBIBT539cI2f2wLLl7Df3obKzJXLEQHKoxKgaaBomejpL0kNsg1tkX4Cjnbox/pmXaGRVyCXd0ToE+yDUEUncZhzukEJM1qFRoEVqt1Y= ARC-Authentication-Results: i=1; server2.sourceware.org X-QQ-mid: bizesmtp87t1699328207t7v05f7x Received: from rios-cad122.hadoop.rioslab.org ( [58.60.1.26]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 07 Nov 2023 11:36:45 +0800 (CST) X-QQ-SSF: 01400000000000G0V000000A0000000 X-QQ-FEAT: +ynUkgUhZJlogAnuJaWFgyhPmpG/q+CE7aV2Y+NOXPpBNyps0Pu5hJ0p7CfBY rEDA+KYt5rQu8tM3pSJVFCdPcvVL58lHqQ6OYYWnBH1lW7mV3womqI3lmmXU9XWt6/duzq8 sb1ks6bMuzaUM7QBYTzIGYjLn0ostSyCBXQH9P1o/u7EnZhdQDPTeEAFA7bYM9KNUWhrLW6 KvQ2Oc73KbfmnAZ5HUFOeKVrcEIN9QiHkEzTNg2nRP3lTyMXgKO/cH53wmjYNZ4FmJHg0ti BzfXbPByaqkv/AUxunJka9H1trLutmqQI0Cddkue8zDcsa6E/PpP+8OijIDyPJPjgueG7XI eteXN9dyTVCPjhKaSQvMXdc8KKf3z0LHs5iAMtE+khIkJLQQ7m32/8+5c6byc+2fHd3nD9M DnTkT9+6FTQ= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 3707023366426960296 From: Juzhe-Zhong To: gcc-patches@gcc.gnu.org Cc: rguenther@suse.de, jeffreyalaw@gmail.com, Juzhe-Zhong Subject: [PATCH] test: Fix FAIL of SAD tests for RVV Date: Tue, 7 Nov 2023 11:36:44 +0800 Message-Id: <20231107033644.3733354-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz7a-one-0 X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_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: 1781874810207751972 X-GMAIL-MSGID: 1781874810207751972 RVV didn't explicitly enable SAD optab but we can vectorize it since loop vectorizer is able to recognize SAD pattern for RVV during analysis. Current scan check of explicit SAD pattern looks odd, it should be more reasonable to check recognition of SAD pattern during Loop vectorize analysis. Other SAD tests like slp-reduc-sad-2.c are checking pattern recognition instead of explicit pattern enable. Fix SAD dump check to fix the FAILS for RVV. gcc/testsuite/ChangeLog: * gcc.dg/vect/slp-reduc-sad.c: Fix check. * gcc.dg/vect/vect-reduc-sad.c: Ditto. --- gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c index faa1c16d1a7..977cfabde11 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c +++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c @@ -57,6 +57,6 @@ main () return 0; } -/* { dg-final { scan-tree-dump "sad pattern recognized" "vect" } } */ +/* { dg-final { scan-tree-dump "vect_recog_sad_pattern: detected" "vect" } } */ /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c index 2f0bb692564..08f79874e9c 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c @@ -51,6 +51,6 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "sad pattern recognized" 1 "vect" } } */ +/* { dg-final { scan-tree-dump "vect_recog_sad_pattern: detected" "vect" } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */