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: 1857190 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=MZmgtp0Y; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SJzT14ZJJz1yQ4 for ; Tue, 31 Oct 2023 03:37:25 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AA7163857806 for ; Mon, 30 Oct 2023 16:37:23 +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-Google-Smtp-Source: AGHT+IFghmvhoZGL/GBYRnjlZ5AiGyuyPtYabCHcGuknll5VKDQP9Z0ZrB2Pz3KT2XCb6c6PNDHBLg== 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+incoming=patchwork.ozlabs.org@gcc.gnu.org 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