From patchwork Wed Nov 20 12:38:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 1198096 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-514143-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="PTt1qMRa"; 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 47J2Lp2T1wz9s7T for ; Wed, 20 Nov 2019 23:39:12 +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:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=PJT7owyIMriEWmQ5IVBH++tWOJOuup/MJ5ZSegPGETadc7ot5v5bv fYcAzupde3uMlUmBDC0557nP8GgLVn++Btk5SiWHsNpHe+k/+4ejosG4DLcZNfiU ohmhAUNuGMhA76G5sqmKudoFBEvAIMJj+gFTU7uUE7Zld5OHKxGEf4= 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:subject:date:message-id:mime-version:content-type; s= default; bh=WzVAnBVz6dOX5rTXo53QF70Y7Xs=; b=PTt1qMRabaHE+jvNQmsA 0A9hcSNJgDZQPkWEyh4dMHqP3vFv4lCnt0GreLG7jZOqlzVHgN3+WD+5HU2onp0o +2/oCMuGJKZ6ehgjSt/xyH1pwmCAJN6WnhrWgNmf+31o4yLdcKzO5XF72T8kJffg V6Z16MilLeuZZ3KDU+FM9bQ= Received: (qmail 28854 invoked by alias); 20 Nov 2019 12:39:04 -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 28843 invoked by uid 89); 20 Nov 2019 12:39:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Nov 2019 12:39:03 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C41C4328 for ; Wed, 20 Nov 2019 04:39:00 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6CB8D3F703 for ; Wed, 20 Nov 2019 04:39:00 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: Add more markup to vect-alias-check-{1,18}.c (PR 92543) Date: Wed, 20 Nov 2019 12:38:59 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes In vect-alias-check-1.c we unroll the inner loop and then vectorise the stores at a[c + 1][b]. Since the access has no guaranteed alignemnt, we need a realignment mechanism or support for unaligned accesses in order to vectorise. In vect-alias-check-18.c we use a reverse access and so need permute support in order to vectorise. I'm not really sure when this part of the testsuite prefers { xfail { ! foo } } and when it prefers { target foo }. xfail seems like the most common choice for the alignment restriction, whereas vect_int and vect_perm are mostly dg-require-effective-target style features, so I went with that combination. Tested on aarch64-linux-gnu, x86_64-linux-gnu, powerpc64-linux-gnu (Power 7) and sparc-sun-solaris2.11. OK to install? Richard 2019-11-20 Richard Sandiford gcc/testsuite/ PR testsuite/92543 * gcc.dg/vect/vect-alias-check-1.c: XFAIL the alias check message if there is no realignment support and no support for unaligned accesses. * gcc.dg/vect/vect-alias-check-18.c: Restrict the test for the alias message to targets that have permute support. Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-1.c 2019-11-19 16:25:49.000000000 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-1.c 2019-11-20 12:35:16.140748524 +0000 @@ -15,5 +15,5 @@ fn1 () } /* { dg-final { scan-tree-dump "improved number of alias checks from \[0-9\]* to 1" "vect" } } */ -/* { dg-final { scan-tree-dump "using an address-based overlap test" "vect" } } */ +/* { dg-final { scan-tree-dump "using an address-based overlap test" "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ /* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-18.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-18.c 2019-11-19 16:25:49.000000000 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-18.c 2019-11-20 12:35:16.140748524 +0000 @@ -60,5 +60,5 @@ main (void) } /* { dg-final { scan-tree-dump {flags: *WAR\n} "vect" { target vect_int } } } */ -/* { dg-final { scan-tree-dump "using an index-based WAR/WAW test" "vect" } } */ +/* { dg-final { scan-tree-dump "using an index-based WAR/WAW test" "vect" { target { vect_int && vect_perm } } } } */ /* { dg-final { scan-tree-dump-not "using an address-based" "vect" } } */