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: 1849536 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=xtccX6uU; 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 4S8SMr3Cdlz20Vq for ; Tue, 17 Oct 2023 06:48:23 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ABAF23857713 for ; Mon, 16 Oct 2023 19:48:20 +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-Google-Smtp-Source: AGHT+IHvRSc0u8zS9kekzZ1aEQhPn88JRNmREvMmOpNjQgguhn+aOZ3/ydL2Ckbi5JO77r3FWxHefQ== 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+incoming=patchwork.ozlabs.org@gcc.gnu.org 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)