From patchwork Mon Oct 16 19:48:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 153723 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3688555vqb; Mon, 16 Oct 2023 12:48:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1WWAqSbSc0qLasBZ3cJEvbkUczCwpqZOMPeCZhGRWbN+xs/jh0y5fXB2g9+7x0mVtAJJm X-Received: by 2002:a05:622a:191e:b0:418:17c0:e0c9 with SMTP id w30-20020a05622a191e00b0041817c0e0c9mr466270qtc.34.1697485713275; Mon, 16 Oct 2023 12:48:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697485713; cv=pass; d=google.com; s=arc-20160816; b=lGJG2DoEjf2ZRQIbHwPSE9cGzW19fXq2HDBrMnCvR29h2YghkU/ohdHdjl0bEQEB2n TYNVoe1X0RzUc5pO4TZG9h9HN/hleXKLHwNDgVNsthM6np+ad41CGreAVAK5MyJdvJxn 6l9sjertgp15ZTApP7gt2WInKOVa0mT2rl77GPkIz2IXYr0Q9C5sAucykIrbwJXpi9zb cVMOwLWcOo0oXW4A8JdjbhB7sEZm8bqdekt9sEjTOKnzZY5l04miF60LTzorhcKP9XCV 68b7Q8eDDYWP7zZGomYBU2Kk94b6Ovk6xw8jvHwnFTEGzmqodt0oW0GTeut1bvDQgeag XW9g== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=Flys9/iXQZmEwSeR4hlRJOZQUHxguPr/DQ7KkyV3Np8=; fh=GOP6tJTCef4of3cWsf7nG/W1wT2NBFJC2ZRK0Lpi5V4=; b=eq2Yj7xYCY6jq/97XjVPzOOb0XsXvcK0hDyN5bXGMvwGGRD/qKAN9RYn09k+yFUPM0 H6fZiaCZIK5SmdU2Zlw7a6XH9DK1QGKuWWggIso6VM+9c+5id9Z8ivbiUUHf0gKiH/nL c5p/6ZbqWW/+Ym0uyFm9GcCfAIAH8JnPBGLPi3Lrmv/RKErntG+WaQ/MCNbuBNFRfwgd +c1NSA9n/4nxvWPOXF+PibMkaku3spAwKW0Y/k3e6ySDOfWvcGS6sLpeRp8955pnHsRM w3JA00h76kIQ7dbZ7GRn5jXS+EEALVcjGBNBb4pcZoynZCOeqaUNYOgz8vqSCfdX5cZu /Z9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=xtccX6uU; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id m16-20020a05622a119000b004197a8630casi2194qtk.772.2023.10.16.12.48.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 12:48:33 -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=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=xtccX6uU; 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 089D1385842C for ; Mon, 16 Oct 2023 19:48:33 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by sourceware.org (Postfix) with ESMTPS id BF8173858C66 for ; Mon, 16 Oct 2023 19:48:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BF8173858C66 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 BF8173858C66 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::235 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697485690; cv=none; b=QAvOFcvUOj8DiNCu5ELGETYusOjvnKWpBwrxTEOEvdYGMQ/MdhsABpkZoa4GKmK4cBugbsyE6i/lozJSYeFuhy7TjWhQyEaV9AR0avJscAEmFjA/EERoxeQwxNnBrwDF7e8jy+gOvX3OP5+Va7ngxpfMkH5pxBu1k0znb9LLOco= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697485690; c=relaxed/simple; bh=hnNhleJAf2DzUsFCQEaFnHkdN4QZK8giJplc2yNAwJM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=AMHWCcbQTrJt2UxSTlqhbkL4NQ4vLuIj3YqLixTdVJq+0OKgrDLjoaJuPcrlIzxx7lBoGzTvJgWA6t2YNJZ9RTH8qNugYdrqmVsNyU52wO1EHxQp36JnOvqtCRejWiZOj8EN3K5fc5EYzq6INZRga6ekgd+t8xdaBAYKbwUtzM0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3af65455e7cso3292897b6e.1 for ; Mon, 16 Oct 2023 12:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1697485687; x=1698090487; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Flys9/iXQZmEwSeR4hlRJOZQUHxguPr/DQ7KkyV3Np8=; b=xtccX6uUt0M97JZHnPGo3ayg/MSZHibXpTIHyrrs6EgPdd1ixyjeRYqz6JvzDzBtDy nUXiTGf+Km+xX0Lc/Pa3WFZF1sbl1iMmmBBeAP7uCCwcnU/EiD06rymGNBDmADkRymsy o7yOV7pX9/5KeK4ExUVS5TcxWrkqF/WA1OtVy4kfT5SM3EzPPlnvsumXWgVN59V9aLAH QM2rTmLgFevAFuphhKxIHpxN1RA/AsTeYdIJOSAoOoFZneQFLKU/C2ANoGcoVwDx/HtJ PKiQaCl3Jd/OYt3kG6hW8/pUEYRPCVsFP16lQEsflzYAzabTdpAYEqLYO/VaBaXh5vt9 sC8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697485687; x=1698090487; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Flys9/iXQZmEwSeR4hlRJOZQUHxguPr/DQ7KkyV3Np8=; b=CLTvBMIWsSl2qD4Igp6lfjyDe5rMgUWqutYY/dD1lNmpHlW/KK+tYFgce222A7nhro mp/g12TsijWwVIMPbA6+7JHG/2dOUnOKbyWRGzGBonmXvUAXImMivSnjDiYIFy07zkUU fhhFJVTkacFzu4lN1k4qOL2uXGj+PG618zjAdKb+9A7Q3dTWH4L7BfpofihVBelDriej 00i9u5cjdJ7+SHpTOMtWozut8chfibHrh5nh1SkgB+TwOnOVMDTU3UuZ8uzGByH+vQFI zGg6Kgag1zKNrvPCOuX76SYIsFwjhJhJVrbf2f6Onrv7KSsZcpVDPyrFjbWack2jQyEm fDAg== X-Gm-Message-State: AOJu0Yw98kQ3rqLsN7eEv/PH7C4NVHsRyinUEFYjoMFCJ3ErFprfeq4e RJv/VVJ7EDUEjhUu96B7Jctw0JViebd2YcfBJyY= X-Received: by 2002:a05:6808:3a8a:b0:3ae:18c0:dd8e with SMTP id fb10-20020a0568083a8a00b003ae18c0dd8emr283577oib.27.1697485686847; Mon, 16 Oct 2023 12:48:06 -0700 (PDT) Received: from vineet-framework.ba.rivosinc.com (c-98-210-197-24.hsd1.ca.comcast.net. [98.210.197.24]) by smtp.gmail.com with ESMTPSA id s32-20020a05680820a000b003ae0e57874fsm1980619oiw.21.2023.10.16.12.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 12:48:06 -0700 (PDT) From: Vineet Gupta To: gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, Vineet Gupta Subject: [COMMITTED] RISC-V/testsuite: add a default march (lacking zfa) to some fp tests Date: Mon, 16 Oct 2023 12:48:00 -0700 Message-Id: <20231016194800.936405-1-vineetg@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 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: 1779846440261117787 X-GMAIL-MSGID: 1779942778951494538 A bunch of FP tests expecting specific FP asm output fail when built with zfa because different insns are generated. And this happens because those tests don't have an explicit -march and the default used to configure gcc could end up with zfa causing the false fails. Fix that by adding the -march explicitly which doesn't have zfa. BTW it seems we have some duplication in tests for zfa and non-zfa and it would have been better if they were consolidated, but oh well. gcc/testsuite: * gcc.target/riscv/fle-ieee.c: Updates dg-options with explicit -march=rv64gc and -march=rv32gc. * gcc.target/riscv/fle-snan.c: Ditto. * gcc.target/riscv/fle.c: Ditto. * gcc.target/riscv/flef-ieee.c: Ditto. * gcc.target/riscv/flef.c: Ditto. * gcc.target/riscv/flef-snan.c: Ditto. * gcc.target/riscv/flt-ieee.c: Ditto. * gcc.target/riscv/flt-snan.c: Ditto. * gcc.target/riscv/fltf-ieee.c: Ditto. * gcc.target/riscv/fltf-snan.c: Ditto. Signed-off-by: Vineet Gupta --- gcc/testsuite/gcc.target/riscv/fle-ieee.c | 3 ++- gcc/testsuite/gcc.target/riscv/fle-snan.c | 3 ++- gcc/testsuite/gcc.target/riscv/fle.c | 3 ++- gcc/testsuite/gcc.target/riscv/flef-ieee.c | 3 ++- gcc/testsuite/gcc.target/riscv/flef-snan.c | 3 ++- gcc/testsuite/gcc.target/riscv/flef.c | 3 ++- gcc/testsuite/gcc.target/riscv/flt-ieee.c | 3 ++- gcc/testsuite/gcc.target/riscv/flt-snan.c | 3 ++- gcc/testsuite/gcc.target/riscv/fltf-ieee.c | 3 ++- gcc/testsuite/gcc.target/riscv/fltf-snan.c | 3 ++- 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/gcc/testsuite/gcc.target/riscv/fle-ieee.c b/gcc/testsuite/gcc.target/riscv/fle-ieee.c index e55331f925d6..12d04514ca29 100644 --- a/gcc/testsuite/gcc.target/riscv/fle-ieee.c +++ b/gcc/testsuite/gcc.target/riscv/fle-ieee.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target hard_float } */ -/* { dg-options "-fno-finite-math-only -ftrapping-math -fno-signaling-nans" } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv64 } } } */ +/* { dg-options "-march=rv32gc -mabi=ilp32d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv32 } } } */ long fle (double x, double y) diff --git a/gcc/testsuite/gcc.target/riscv/fle-snan.c b/gcc/testsuite/gcc.target/riscv/fle-snan.c index f40bb2cbf662..146b7866e888 100644 --- a/gcc/testsuite/gcc.target/riscv/fle-snan.c +++ b/gcc/testsuite/gcc.target/riscv/fle-snan.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target hard_float } */ -/* { dg-options "-fno-finite-math-only -ftrapping-math -fsignaling-nans" } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv64 } } } */ +/* { dg-options "-march=rv32gc -mabi=ilp32d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv32 } } } */ long fle (double x, double y) diff --git a/gcc/testsuite/gcc.target/riscv/fle.c b/gcc/testsuite/gcc.target/riscv/fle.c index 97c8ab9ad864..2379e22d5062 100644 --- a/gcc/testsuite/gcc.target/riscv/fle.c +++ b/gcc/testsuite/gcc.target/riscv/fle.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target hard_float } */ -/* { dg-options "-fno-finite-math-only -fno-trapping-math -fno-signaling-nans" } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -fno-trapping-math -fno-signaling-nans" { target { rv64 } } } */ +/* { dg-options "-march=rv32gc -mabi=ilp32d -fno-finite-math-only -fno-trapping-math -fno-signaling-nans" { target { rv32 } } } */ long fle (double x, double y) diff --git a/gcc/testsuite/gcc.target/riscv/flef-ieee.c b/gcc/testsuite/gcc.target/riscv/flef-ieee.c index f3e7e7d75d6c..b6ee6ed08a4d 100644 --- a/gcc/testsuite/gcc.target/riscv/flef-ieee.c +++ b/gcc/testsuite/gcc.target/riscv/flef-ieee.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target hard_float } */ -/* { dg-options "-fno-finite-math-only -ftrapping-math -fno-signaling-nans" } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv64 } } } */ +/* { dg-options "-march=rv32gc -mabi=ilp32f -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv32 } } } */ long flef (float x, float y) diff --git a/gcc/testsuite/gcc.target/riscv/flef-snan.c b/gcc/testsuite/gcc.target/riscv/flef-snan.c index ef75b3523057..e8611e8c0215 100644 --- a/gcc/testsuite/gcc.target/riscv/flef-snan.c +++ b/gcc/testsuite/gcc.target/riscv/flef-snan.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target hard_float } */ -/* { dg-options "-fno-finite-math-only -ftrapping-math -fsignaling-nans" } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv64 } } } */ +/* { dg-options "-march=rv32gc -mabi=ilp32f -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv32 } } } */ long flef (float x, float y) diff --git a/gcc/testsuite/gcc.target/riscv/flef.c b/gcc/testsuite/gcc.target/riscv/flef.c index 379f5119caa8..ce5420b46b79 100644 --- a/gcc/testsuite/gcc.target/riscv/flef.c +++ b/gcc/testsuite/gcc.target/riscv/flef.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target hard_float } */ -/* { dg-options "-fno-finite-math-only -fno-trapping-math -fno-signaling-nans" } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -fno-trapping-math -fno-signaling-nans" { target { rv64 } } } */ +/* { dg-options "-march=rv32gc -mabi=ilp32f -fno-finite-math-only -fno-trapping-math -fno-signaling-nans" { target { rv32 } } } */ long flef (float x, float y) diff --git a/gcc/testsuite/gcc.target/riscv/flt-ieee.c b/gcc/testsuite/gcc.target/riscv/flt-ieee.c index c40a0fc11806..cff30c6f1bb1 100644 --- a/gcc/testsuite/gcc.target/riscv/flt-ieee.c +++ b/gcc/testsuite/gcc.target/riscv/flt-ieee.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target hard_float } */ -/* { dg-options "-fno-finite-math-only -ftrapping-math -fno-signaling-nans" } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv64 } } } */ +/* { dg-options "-march=rv32gc -mabi=ilp32d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv32 } } } */ long flt (double x, double y) diff --git a/gcc/testsuite/gcc.target/riscv/flt-snan.c b/gcc/testsuite/gcc.target/riscv/flt-snan.c index c958ec018422..238748ae2a6b 100644 --- a/gcc/testsuite/gcc.target/riscv/flt-snan.c +++ b/gcc/testsuite/gcc.target/riscv/flt-snan.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target hard_float } */ -/* { dg-options "-fno-finite-math-only -ftrapping-math -fsignaling-nans" } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv64 } } } */ +/* { dg-options "-march=rv32gc -mabi=ilp32d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv32 } } } */ long flt (double x, double y) diff --git a/gcc/testsuite/gcc.target/riscv/fltf-ieee.c b/gcc/testsuite/gcc.target/riscv/fltf-ieee.c index a9c0805037e6..024d5301413a 100644 --- a/gcc/testsuite/gcc.target/riscv/fltf-ieee.c +++ b/gcc/testsuite/gcc.target/riscv/fltf-ieee.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target hard_float } */ -/* { dg-options "-fno-finite-math-only -ftrapping-math -fno-signaling-nans" } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv64 } } } */ +/* { dg-options "-march=rv32gc -mabi=ilp32f -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv32 } } } */ long fltf (float x, float y) diff --git a/gcc/testsuite/gcc.target/riscv/fltf-snan.c b/gcc/testsuite/gcc.target/riscv/fltf-snan.c index 34a51e3e800a..9e12f3732b38 100644 --- a/gcc/testsuite/gcc.target/riscv/fltf-snan.c +++ b/gcc/testsuite/gcc.target/riscv/fltf-snan.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target hard_float } */ -/* { dg-options "-fno-finite-math-only -ftrapping-math -fsignaling-nans" } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv64 } } } */ +/* { dg-options "-march=rv32gc -mabi=ilp32f -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv32 } } } */ long fltf (float x, float y)