From patchwork Fri Jan 20 14:16:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 46365 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp222760wrn; Fri, 20 Jan 2023 06:17:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXvW/t+4lCmgFoccx1oYgsC/TqMSalZzraxOTjN+xjmwXzNVA1pfQA2qIp3UPcHxP4JqKy3T X-Received: by 2002:a05:6402:4d5:b0:49d:a60f:7827 with SMTP id n21-20020a05640204d500b0049da60f7827mr15057230edw.6.1674224236948; Fri, 20 Jan 2023 06:17:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674224236; cv=none; d=google.com; s=arc-20160816; b=rtHYENXNRc9t+VC1WXDxhg2jRF/fLLNCnHhIJJlQTBcE8WWzInbZhpJkKTT194UHjl +iUbgNpuFe5if7aaFfk/xJa4HGhcAW9vu3uEcY5hbyrvyTbcTnQYehWN3VVgBD6daoa9 uVXyonXmtxXdw9u3uN8za2thHc7K/4IE6ZG14NneFKjIr5/DXFTLiTTKXF8Nnp1heRYp CoTp3fwTZq5O95mkfi6LBYcCXY3df0KTcJGa+xlSEsVJqGsggqFMUeQwYQBKFJfp2gXg LOI9NH+SjRzM7ExIQuzdXz/Cb7TWOhONf96pfdWsmrRwuXsdQG9dH2a/KGJ6sOlC+m/G /qJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:ironport-sdr :dmarc-filter:delivered-to; bh=A763JCY3297TOJaD4t9FBpnE6Udzq2bLer4e9V4N49U=; b=uLUBNOz6D3usV5CL1Rrx5OH7M+Uc8rUn8fMSGgevXQXmTEFGdODg3u0UZtaVAnybeq UpHgrP5vMS3rOcDXRYWFdX+k/RR7sWRdZmygvdCOeHceHqM+PxBAFcRvlgjHHcRz5Ix0 NPKP01o1iPRzJLLXZXpQRDG0itSBtHWhGXtPhvu9RZnQyl3d9W3W48WbhX8mdc1lLUeG vsW4hielbiSui6ES2+B5aOiJuAa3M+bfYXPsisdLpW+SZxwKhHdUpi0PrQ6K10U/yR62 PKoDkYzf/o43TtR0T5qZDbOjFzM7W4L6M8473tnJyHmdmtc9mFsVj9BTQ75VQN6OyLbR K/yA== ARC-Authentication-Results: i=1; mx.google.com; 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 sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id r27-20020a50d69b000000b0047ed405b4a7si1213690edi.224.2023.01.20.06.17.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 06:17:16 -0800 (PST) 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; 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 BCEC7385B502 for ; Fri, 20 Jan 2023 14:17:04 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 9CCDB3858D1E for ; Fri, 20 Jan 2023 14:16:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9CCDB3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.97,232,1669104000"; d="scan'208,223";a="97791227" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 20 Jan 2023 06:16:37 -0800 IronPort-SDR: gmKZa7XHYDDmpadUIwNktwtH98cyjDLTc1VMQ6LyI/iSgCLEElgnllAXhWEMuJq2JcCpxwdGrk YROHW3q2v2BxRwihQ8JXDLIJin1l5nTXq1oEUi98Y3LT2id+ToQENCO+x/KiZlt/d16cwYFRH/ S/d47syu/yPJCt7kF/7/mhoxqarackPBjvGAduqT3VXRFkCe7j6ucutMiSwslx8oZOHnl5nvmy FfYnMGMfE2ziSe3x1mC5eZODnXd0TlUnA5E50UXDTw2s/ZkdCwdlhYRiME4+5i6jRFjHfaBwr8 wrI= From: Thomas Schwinge To: Kwok Cheung Yeung , CC: Andrew Stubbs Subject: [og12] Fix 'libgomp.c/simd-math-1.c' configuration (was: [OG12] [committed] amdgcn: Enable SIMD vectorization of math library functions) In-Reply-To: References: User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Fri, 20 Jan 2023 15:16:26 +0100 Message-ID: <87wn5h5m11.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, 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.29 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 Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755551353403878819?= X-GMAIL-MSGID: =?utf-8?q?1755551353403878819?= Hi! On 2022-11-02T00:50:40+0000, Kwok Cheung Yeung wrote: > I have committed the following patches onto the devel/omp/gcc-12 > development branch: > > 863579c4e30 amdgcn: Enable SIMD vectorization of math functions I've pushed to devel/omp/gcc-12 commit e7d4bcb974915bfe95be6c385641fc66a4201581 "Fix 'libgomp.c/simd-math-1.c' configuration", see attached. Grüße Thomas > bd9a6106b95 amdgcn: Add SIMD versions of math routines to libgcc > d3a2a1cc424 amdgcn: Add builtins for vector floor/floorf > a3c04a367a9 amdgcn: Fix expansion of builtin for vector fabs operation > > These patches implement a vectorized version of most of the C math > library for AMD GCN. These routines will be used when math functions are > used in auto-vectorized code. > > Note that -fno-math-errno must be specified on the command line in most > cases before the compiler will consider using these functions. > > Vectors smaller than the native 64 element ones are also supported (by > masking off the unused lanes), which can be useful for SLP vectorized code. > > Kwok Yeung ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From e7d4bcb974915bfe95be6c385641fc66a4201581 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sat, 14 Jan 2023 10:28:09 +0100 Subject: [PATCH] Fix 'libgomp.c/simd-math-1.c' configuration If nvptx offloading is configured in addition to GCN, we see: FAIL: libgomp.c/simd-math-1.c (test for excess errors) UNRESOLVED: libgomp.c/simd-math-1.c compilation failed to produce executable x86_64-pc-linux-gnu-accel-nvptx-none-gcc: error: unrecognized command-line option '-mstack-size=3000000' Thus, restrict that ooption to GCN offloading compilation, and on the other hand, there's no reason to skip this test for non-GCN offloading execution: even if not SIMD-vectorized there, we still benefit from correctness testing. libgomp/ * testsuite/libgomp.c/simd-math-1.c: Fix configuration. --- libgomp/ChangeLog.omp | 4 ++++ libgomp/testsuite/libgomp.c/simd-math-1.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 629efbc5832..23e93495b62 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,3 +1,7 @@ +2023-01-20 Thomas Schwinge + + * testsuite/libgomp.c/simd-math-1.c: Fix configuration. + 2023-01-19 Tobias Burnus Backported from master: diff --git a/libgomp/testsuite/libgomp.c/simd-math-1.c b/libgomp/testsuite/libgomp.c/simd-math-1.c index caf032a77ae..1ebdccccfeb 100644 --- a/libgomp/testsuite/libgomp.c/simd-math-1.c +++ b/libgomp/testsuite/libgomp.c/simd-math-1.c @@ -2,9 +2,9 @@ sufficiently close) results as their scalar equivalents. */ /* { dg-do run } */ -/* { dg-skip-if "AMD GCN only" { ! amdgcn_offloading_enabled } } */ /* { dg-options "-O2 -ftree-vectorize -fno-math-errno" } */ -/* { dg-additional-options "-foffload=-mstack-size=3000000 -foffload=-lm" } */ +/* { dg-additional-options -foffload-options=amdgcn-amdhsa=-mstack-size=3000000 } */ +/* { dg-additional-options -foffload-options=-lm } */ #undef PRINT_RESULT #define VERBOSE 0 -- 2.25.1