From patchwork Mon Oct 30 16:37:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick O'Neill X-Patchwork-Id: 159809 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp2346212vqb; Mon, 30 Oct 2023 09:37:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+Rm7Fb38NyzYcXQIQl6Ro74Q7DStAhcSHU8b9tUXQVF04S5AfEHAB0qH9BeZ1mqGH0K+k X-Received: by 2002:a0c:f1d2:0:b0:66d:1ffe:bcd4 with SMTP id u18-20020a0cf1d2000000b0066d1ffebcd4mr8629730qvl.44.1698683855952; Mon, 30 Oct 2023 09:37:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698683855; cv=pass; d=google.com; s=arc-20160816; b=IkYyX7q5Ge2Jgfzc9q1F617Zfe4tyVHXiK3ooIh9a6ocC+I/iumPXvLBxeXEJRclWn u7gPQWe/h15hqoBR/wt4SRC/CYhNJ8zfVtzbkY90I/BIBbpf7B4MTj4w9hlRSEgj0BQ5 2FTAlvxAexFQhOG8Ajx57V+bGxqmRsDxc9X/K/yjnnpjbV6YBvY/lgi/3itYzqIJ4jeK SMvTalGPa8v0Y+usiyWiT/8BDsPAcahw/7yEwHVpVqjSYjinRmisAEaE8oToxKSyGyFm S6vBZglh29AZHGTigU/zHHCrSQDYB9nOsn7WPsUkB8dGQFsyyDoEwLuN7yZenNR6pvZn VYKQ== 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:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=bBGV8KxooshB/KBfjjbw083+sX13yXAog/nkaIAzj/o=; fh=WiPf1awJzjuGkBbYgPR7pMBUHXNOX3zrt/srsqHlTk0=; b=xwHxydoRLjvZbgtlQcu6JH3ReAhwg8oKctPsEd95WdkfkLiXtZwZLD4TTHoXOnUEUI 7wLJSRB2pKDcBV+rVXqsFEMKZuxDa8ZZK8TeFGBNl61pPRQGseQaYUW/BR5genXYpF0I EfkMib16JoVfs+CJMqWpa2z0Sllrr4+ZlDMdof1OjAs8FUFv+1xD/zyS2+hNtJb8ME1o 4y5COm9fhFw4RUPkiaXXm9V4AYKte3ArCCMWUNkROwpxlz9zaTjLpVwemHJ6cIdqJHoA T0f+2/b+sXqGzd6bzzU7/KOhm20rAauVVWSNEQqm6Gr+E0+yleJxRuQ4xsXjOObgxWTk chew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=MZmgtp0Y; arc=pass (i=1); 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" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id z14-20020a0ce60e000000b0065afd8e073asi4459107qvm.588.2023.10.30.09.37.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 09:37:35 -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=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=MZmgtp0Y; arc=pass (i=1); 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AEFDC385770B for ; Mon, 30 Oct 2023 16:37:35 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id D96CC3858D20 for ; Mon, 30 Oct 2023 16:37:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D96CC3858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D96CC3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698683834; cv=none; b=o/qTy1EyvnBBMWWBLlpJAHOAlRg6hhCCKdE60pEwd40z3rdHP8XIzg7NXNdZJ2TqaBv9Vap0EFwt0jrHsXTZP5qMEol4y/MybLkzuTHEQkqd0N7I6UwWGOzm+Z90K+EFtbs26qbHLXlkMf3h8TRVvRphBz38ahQLxBJy1ATaAks= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698683834; c=relaxed/simple; bh=VxUSbKC/Ohkk0B8zyNh0oyyEgtZQKsRK2cCWJhevMVo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=M8+H8uFEtC7YXxNUuEuJ0myCg9xbIq6anUxscegqbIrOoyPNayUJh2SdbVV41Q/tAaYjedBsL6VeP0HzCRCzOJjLWVUpkFaKbc97yLtYmCAIxWYlyMHZ0504FENLXW1Lr6ISVCmiNdcROcKkNCGOQVihRYtW756o5svG8pSDdrM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1cc58219376so6134745ad.1 for ; Mon, 30 Oct 2023 09:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1698683831; x=1699288631; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bBGV8KxooshB/KBfjjbw083+sX13yXAog/nkaIAzj/o=; b=MZmgtp0YkzZNNKyUge+RYydbuBhv5UYismBvLq6uodOPM6E7bJ5C7mFicZu5Nomiwx jsqYfHD15ZVdFfzKevTuB7jGAJ+JE1EyL4I+B7ci4TM9CFC75AA80BqJPr39l/sWEjGd yUWB9p2ygx1LwOpyyQ0XR195ekacgY3cQPqG2aucv5PKKoicdEz9kHRnONPAhufDA2YY 2qF5bDQLewA2Otv5IwOJhsrJJaFgQZchPyuS8qIWKYI2UzGoOr392XkkG74MKUOg29DB xmKN/+OSJXBFldQXKA2NI4rzmtlsU6K37CUY+JaPzKq0fI7Rz2E7bAzYzgpSxOSvcFb7 6VKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698683831; x=1699288631; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bBGV8KxooshB/KBfjjbw083+sX13yXAog/nkaIAzj/o=; b=JCYMQLjrK92QRmiufsR5oZ/i6BT0awotTllXC5yq7Z71NrZuarLoJEj2VcawHiyOeT tUrc4/QeSz/ZRaBOWgSqZ2dENOcTkvsytX5/VjToolu+5uwzhYvdnAz0q0sggL2iuWul ByuJpEx9oA7ppG06VO63unsdPb54eiWtzVaqqAYnxJxItzLUQ/Wlb/n1R3o4huiRNcA8 TqwYvJhKgtI44s7Kt+8hGgX/cvmW6/hbi3XVI+AnqfB1y+zVjNVRn222mbYXddFsz5uc zWUiSc8j3JIq+OnIHaW8J1dU4Gfx/kGUmT6jBpbm+wcNUCI+WcRrtV8vjs/LkE70LSbM ey6Q== X-Gm-Message-State: AOJu0YxJlnwl5u2ZFgG/bGZJd3OCLIVuJtCdtn15kUd+qBIvRZvhsawb aT1hjofzCV8QVp6QRb05aKQEOoYCLmkErPaRdYo= X-Received: by 2002:a17:903:5cb:b0:1cc:43d3:a323 with SMTP id kf11-20020a17090305cb00b001cc43d3a323mr3695541plb.25.1698683831437; Mon, 30 Oct 2023 09:37:11 -0700 (PDT) Received: from patrick-ThinkPad-X1-Carbon-Gen-8.hq.rivosinc.com ([12.44.203.122]) by smtp.gmail.com with ESMTPSA id je20-20020a170903265400b001c444106bcasm6539816plb.46.2023.10.30.09.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 09:37:11 -0700 (PDT) From: Patrick O'Neill To: gcc-patches@gcc.gnu.org Cc: jeffreyalaw@gmail.com, gaofei@eswincomputing.com, Patrick O'Neill Subject: [PATCH] RISC-V: Make rv32i_zcmp testcase more robust Date: Mon, 30 Oct 2023 09:37:01 -0700 Message-ID: <20231030163701.1412946-1-patrick@rivosinc.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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.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: 1781199122910151051 X-GMAIL-MSGID: 1781199122910151051 GCC recently changed its register allocator which causes this testcase to fail. This patch updates the regex to be more robust to change by accepting any s register in the range of 1-9 for cm.push and cm.popret insns. gcc/testsuite/ChangeLog: * gcc.target/riscv/rv32i_zcmp.c: Accept any register in the range of 1-9 for cm.push and cm.popret insns. Signed-off-by: Patrick O'Neill --- Tested using glibc rv64gc on r14-4980-g2672c60917d. --- gcc/testsuite/gcc.target/riscv/rv32i_zcmp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/gcc.target/riscv/rv32i_zcmp.c b/gcc/testsuite/gcc.target/riscv/rv32i_zcmp.c index ea562b7a233..1e1a8be8705 100644 --- a/gcc/testsuite/gcc.target/riscv/rv32i_zcmp.c +++ b/gcc/testsuite/gcc.target/riscv/rv32i_zcmp.c @@ -26,9 +26,9 @@ f2 (void); /* **test1: ** ... -** cm.push {ra, s0-s4}, -80 +** cm.push {ra, s0-s[1-9]}, -80 ** ... -** cm.popret {ra, s0-s4}, 80 +** cm.popret {ra, s0-s[1-9]}, 80 ** ... */ int @@ -50,9 +50,9 @@ test1 () /* **test2_step1_0_size: ** ... -** cm.push {ra, s0-s1}, -64 +** cm.push {ra, s0-s[1-9]}, -64 ** ... -** cm.popret {ra, s0-s1}, 64 +** cm.popret {ra, s0-s[1-9]}, 64 ** ... */ int @@ -70,9 +70,9 @@ test2_step1_0_size () /* **test3: ** ... -** cm.push {ra, s0-s4}, -80 +** cm.push {ra, s0-s[1-9]}, -80 ** ... -** cm.popret {ra, s0-s4}, 80 +** cm.popret {ra, s0-s[1-9]}, 80 ** ... */ float