From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by sourceware.org (Postfix) with ESMTPS id 9C2A53858D20 for ; Tue, 1 Mar 2022 03:43:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C2A53858D20 Received: by mail-yb1-xb2d.google.com with SMTP id u3so24703300ybh.5 for ; Mon, 28 Feb 2022 19:43:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=udDQRj89TRIvICFUoYKkOMTRsp3kosovp4xuHR6JOHQ=; b=O4G2BQ0s4vZ+fJS4N87WxOQqpCPGZoun4DfjWPmXIxgaZxZRzC1LgjKxl+YQLJGLKJ 2gWIav40Ugfuzl93i2FqoQiWWvVzfHPKOqYYzlPCEPoR2l3HY3UtAaNxjuW5AZoalEPm +aAgZucLD59kYKVIkIcRBAM72UMQ2BkpcG1yYJLLj6ms6rLT+uo/QYEqkRTlIjF3U9+D IX4izgpN2CU1vjRz50UupAyP2TVLJqQdPbX4UriYdLaLIqTSt7CRUGF9qYCsPrA0tkT9 Kk4AGGoLVKvwArk020vr5chYOYHmNt/OsVqM/YI4eMwqYf4KIZk3kp8ZmfQs+2ovrP9M DfMA== X-Gm-Message-State: AOAM530U4zPzwHd56EooCYsnOVENsbArhQMjSyYjmxq+E5owah8/xv4+ e0TM4i4TLdgbJ0D+8MLfL+88XRC+oJmtDm0LG/k= X-Google-Smtp-Source: ABdhPJyeGRJKki2q6XfRrHMK904EytYVFJWLBOMAIuqD+TOHsgGWkuZc9IR9sjmL8cVUfa/TZzaeP2FvWuv3mYZ9eew= X-Received: by 2002:a25:6911:0:b0:624:5f4b:2a01 with SMTP id e17-20020a256911000000b006245f4b2a01mr22211557ybc.303.1646106238221; Mon, 28 Feb 2022 19:43:58 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jim Wilson Date: Mon, 28 Feb 2022 19:43:47 -0800 Message-ID: Subject: Re: [PATCH v4][GCC13] RISC-V: Provide `fmin'/`fmax' RTL patterns To: "Maciej W. Rozycki" Cc: gcc-patches@gcc.gnu.org, Kito Cheng , Palmer Dabbelt , Andrew Waterman , Joseph Myers X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2022 03:43:59 -0000 On Tue, Feb 8, 2022 at 4:35 AM Maciej W. Rozycki wrote: > gcc/ > * config/riscv/riscv.md (UNSPEC_FMIN, UNSPEC_FMAX): New > constants. > (fmin3, fmax3): New insns. > ... I tried testing on some of the hardware I have. Both the HiFive Unleashed (2018) and HiFive Unmatched (2021) implement the current definition of fmin/fmax. But the Allwinner Nezha (2021) implements the previous definition of fmin/fmax. SiFive was involved with the fmin/fmax change, so it isn't surprising that they implemented the new semantics before other companies. The Nezha board with the T-Head C906 is a popular one, so we do need to continue to support the 2017 spec, which your patch does with the HONORS_SNAN checks. I agree that we don't need to worry about spec versions older than that. This looks OK to me. I've got builds running in parallel on the Unleashed and Unmatched to test but that will take a couple of days and I don't expect any problems since you already tested it. I could do a build on the Nezha if I had to, but that would take at least a week as it is a much slower board and I'd rather not do that unless I have to. This is hardware implementing the older spec that you probably haven't tested though. Jim