From patchwork Wed Oct 16 19:07:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 1178081 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-511149-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="wtP08FWU"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46thdt0mq2z9sNx for ; Thu, 17 Oct 2019 06:08:17 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; q=dns; s=default; b=yCT V41MdM0vuIFrW+OCfO5MGPgV56M3UbEcFIuLXqd23anAI/6tEU9rFHQdhj8Kw2Yb bEPodi/xF9rz3UaugusI15/p2PBm9C7cw2KTRvOHlCy39S6E9vG4+K47XqvjSmgb 1hvmmol4Mv09Yl1Zxcl96muvfUGiSw/1ua9Lwkzo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=default; bh=LGwsRuzsI 4xmp8xQEWeTSFtvbT8=; b=wtP08FWUzzIfxTvq1YyOPvgLPu566XbWa0GFgZbGp DD716xjs/H+hkqy+WcX4dRqqgFZHQNvauT1exLqfRTx+Z/rBGTYLC7Ew6NJHWK19 CqO0GJoho9lbshSUum0AkL5IUgda0rr0SRqb8rRcmPuorDqW1SneMap8btJKXOFl 7Q= Received: (qmail 124187 invoked by alias); 16 Oct 2019 19:08:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 124179 invoked by uid 89); 16 Oct 2019 19:08:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=gang, HContent-Transfer-Encoding:8bit X-HELO: esa3.mentor.iphmx.com Received: from esa3.mentor.iphmx.com (HELO esa3.mentor.iphmx.com) (68.232.137.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 Oct 2019 19:08:10 +0000 IronPort-SDR: sHzqBbYwE8OVUAN7U6zyqBOY2iF6KdzdhLlEOC+CbUcH7s/dCHmG3pzZiQEPJbrGpXYk776pkP dk9nshDfkKIhvMH2ErKlgjILuWGwJ+d92fwUjLfbffdmrUabil56UHw5l0EzQPVGe0UgePkouX jSE7pNxp0eZcNiQ8jX/UCwGH8M+Iy4lLxayaiQe4SqXJ7YIIdwcdoFOSnss3zt+l7XmBxKaw3R ADClKdMoUVsG2w7Wsed9J0ihbRrdb598QZvX6SjbPa1GFqjBcvSjeojkBi9UFbhWIkhK0LdpTi J/Q= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 16 Oct 2019 11:08:08 -0800 IronPort-SDR: l4mS6yggLFxV5dBhrsvaAPplhkmkDaJG7vse0qkXDOkFIfNH5x9+wtjGOrSsJFqj1pgsS3iq0a zSDz4TgZ/3VAcDPeQqtfR37Z3lP6JdFdy0DhfkTgS7SJ6XIYOkTBnOCFzX6++vbqgIIMEEaeqh Qbtl+rlDT16Woi8DfLsyfEoRW1nW5o05LrgNxf7pZRsYpCjpCzgGRGcbGGSLnGk/nLDOGLWX9d FQPDF5myUlRTLYgN7FgHFnO9HiGGUX7yxrdqQBVXN4vqo06Dh7VMrAZ1S4oU/g7PKl2L1BH1Hr ODk= From: Julian Brown To: CC: Thomas Schwinge Subject: [PATCH] [og9] Fix libgomp serial-dims.c test for AMD GCN Date: Wed, 16 Oct 2019 12:07:51 -0700 Message-ID: <20191016190751.70236-1-julian@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes This patch adds support for AMD GCN offloading to the libgomp.oacc-c-c++-common/serial-dims.c test case. I will apply to the og9 branch shortly. Thanks, Julian ChangeLog libgomp/ * testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Support AMD GCN. --- libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c index 3895405b2cf..e373ebd37b7 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/serial-dims.c @@ -69,6 +69,13 @@ int main () /* The GCC nvptx back end enforces vector_length (32). */ vectors_actual = 32; } + else if (acc_on_device (acc_device_gcn)) + { + /* AMD GCN relies on the autovectorizer for the vector dimension: + the loop below isn't likely to be vectorized, so vectors_actual + is effectively 1. */ + vectors_actual = 1; + } else if (!acc_on_device (acc_device_host)) __builtin_abort (); #pragma acc loop gang \