From patchwork Fri Nov 3 16:20:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 117943 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3655871qgn; Fri, 3 Nov 2017 09:21:23 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SFs84WXfWwRcP8cbiRK1aRIBKf4KLLXmZHbyfrmXNkMIvM3//rtD5uBu/DMHn5pGqgX30D X-Received: by 10.159.233.202 with SMTP id b10mr7065879plr.50.1509726083560; Fri, 03 Nov 2017 09:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509726083; cv=none; d=google.com; s=arc-20160816; b=1G7TeNRWPf60yybVE8tgTgxQSczSpzTZs2vOWU+ZxXWnqKCjhp/gvAkSDw3onJ0R63 s10ty7vYadRp+RV3ptZO/TmPtcoM7Dmp+WwERfcxEtBlw8NFJ/5MHocy72oka5Kg20CT 6YCp4UyujDBNspY02X/tJrwl+kKlOwvQD7/TJA+vP+A+waFBxyhAWB6wK7BBBL758MOn zx90yaUwrJk13oH99C1q3UsknrX7s/PHhs4FNU5g/eMmx+TPCIWFIFJHtx0NAs1VIeXe TGbMW0OpjCwYztW2wEt1GRtRaNwFUli6KRywq25HzNBdeQrsbKUzCdXUGr1+nEODr3DR fKPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:mail-followup-to:to:from:delivered-to:sender:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=h10a1xTvEDGwDOkViYzP0yGWVkcPFFLXLWYGDulRuYw=; b=fhq8UtSTKPMPekTcxHgP0X0QvxvPNPjchMr4ubDxeAAThcQtGQqFFY7vxaD2q0DTba 85vlNLqn1qTV2mg/oAmWQNhjcX9OinmUWaNfHBkPtal/m2aQsOZ0XBK65AGB1NYxt9VW XSPkSI2UVm4CNp+CUMO2eO5H5khBn+Xhg+9W51y8JWV3MgqPrgaIHujJr96uB854tZir iCbrguPpPOIGQyHx53OLBaLjNoM47Bsq2Fbm1001Utgk0qPC7+1CJpzVkOj/yh6G70a7 ywwIztYdCvgtGZzbnVXMfckJbQISC7jGQX0Z/SEnoWzZ/7NWqKeKCRPZeDIyQH8Fx8it sn5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=KG59XdJ3; spf=pass (google.com: domain of gcc-patches-return-465878-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-465878-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id p27si6435026pgn.758.2017.11.03.09.21.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Nov 2017 09:21:23 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-465878-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=KG59XdJ3; spf=pass (google.com: domain of gcc-patches-return-465878-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-465878-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=default; b=BiufZddn08zt+VNkK1Rp0q+odw/b4 xfGZ16VcVLCxxpK7lBzChGbGz1cT5bvPNi23yxYPFTI1/L6A170ohs9YXi/hFVnu q0ZYS/lH6kdM+GroIsjGrBWJoHplVe+pf1fZlFoV8Lrbvf9/gzeqTVjrpVx9lKAX WK6Icelrvx/TsA= 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:references:date:in-reply-to:message-id:mime-version :content-type; s=default; bh=M2i8BEHDgljzvXgqBb0hJmODxpA=; b=KG5 9XdJ3fVE5X4KoTPNXA9NkkSnm46CpFi7PvlRbEdKaKr3CzuamyHHaxopdJkxbJyF TDelrBg/ca30AxkjP854Igl2C6jREnlMCsRm69DJ8K4GaYcDt9SWGVFYicK8ybWz bVgg7UW8gIM5mQezWjbWysteGa4dvj7IK5GEhXNo= Received: (qmail 42445 invoked by alias); 3 Nov 2017 16:21:08 -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 42432 invoked by uid 89); 3 Nov 2017 16:21:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wr0-f179.google.com Received: from mail-wr0-f179.google.com (HELO mail-wr0-f179.google.com) (209.85.128.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Nov 2017 16:21:04 +0000 Received: by mail-wr0-f179.google.com with SMTP id r79so2956404wrb.13 for ; Fri, 03 Nov 2017 09:21:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=h10a1xTvEDGwDOkViYzP0yGWVkcPFFLXLWYGDulRuYw=; b=OEhKS7jskx/WRFnsza2+QCTduEz7cYNAprLa5s/sC+WTrK9TYxIQYfUwQWvbM7KEm8 ttA+JXphuSYsv3uN80ixmTAMnguOF6IBsGSmo6OY2r7M5IvWnBzlIoFGZCjTEh8YRjQ2 4JgcZHy+wKvafYfXNuTITwkuZ0EleVQZSvK4YalxGw5yFvx2ACd/FJD7+dIEONGrIEOu ziMU2LYudf2zuVp2BTKQfATavzyZHIQROD19ZjHWYGQXO4u1b9yDyEfXaXZG0FZOVBZx 86N2ENw3NDDg7pk0nZtonAZz3CafWcKTjMoYFdIgeOIAM5r2gEeEcgktT6bF/iru1QUn FAWg== X-Gm-Message-State: AMCzsaXxDXaSyQSFVrpCUUP/yxGLlE8s03dqUPajnW7mg+miXToUazyU GzkxhXOLZLcQ7SuKgWTLaJ+E8hEv1d8= X-Received: by 10.223.186.20 with SMTP id o20mr7206266wrg.3.1509726061059; Fri, 03 Nov 2017 09:21:01 -0700 (PDT) Received: from localhost (188.29.164.162.threembb.co.uk. [188.29.164.162]) by smtp.gmail.com with ESMTPSA id n129sm1605115wmn.33.2017.11.03.09.20.59 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Nov 2017 09:21:00 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [7/10] Add a vect_unaligned_possible target selector References: <87inerqqyz.fsf@linaro.org> Date: Fri, 03 Nov 2017 16:20:58 +0000 In-Reply-To: <87inerqqyz.fsf@linaro.org> (Richard Sandiford's message of "Fri, 03 Nov 2017 16:14:44 +0000") Message-ID: <87mv43pc45.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 This patch adds a target selector that says whether we can ever generate an "unaligned" accesses, where "unaligned" is relative to the target's preferred vector alignment. This is already true if: vect_no_align && { ! vect_hw_misalign } i.e. if the target doesn't have any alignment mechanism and also doesn't allow unaligned accesses. It is also true (for the things tested by gcc.dg/vect) if the target only wants things to be aligned to an element; in that case every normal scalar access is "vector aligned". 2017-11-03 Richard Sandiford Alan Hayward David Sherwood gcc/ * doc/sourcebuild.texi (vect_unaligned_possible): Document. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_vect_unaligned_possible): New proc. * gcc.dg/vect/slp-25.c: Extend XFAIL of peeling for alignment from vect_no_align && { ! vect_hw_misalign } to ! vect_unaligned_possible. * gcc.dg/vect/vect-multitypes-1.c: Likewise. * gcc.dg/vect/vect-109.c: XFAIL vectorisation of an unaligned access to ! vect_unaligned_possible. * gcc.dg/vect/vect-33.c: Likewise. * gcc.dg/vect/vect-42.c: Likewise. * gcc.dg/vect/vect-56.c: Likewise. * gcc.dg/vect/vect-60.c: Likewise. * gcc.dg/vect/vect-96.c: Likewise. * gcc.dg/vect/vect-peel-1.c: Likewise. * gcc.dg/vect/vect-27.c: Extend XFAIL of unaligned vectorization from vect_no_align && { ! vect_hw_misalign } to ! vect_unaligned_possible. * gcc.dg/vect/vect-29.c: Likewise. * gcc.dg/vect/vect-44.c: Likewise. * gcc.dg/vect/vect-48.c: Likewise. * gcc.dg/vect/vect-50.c: Likewise. * gcc.dg/vect/vect-52.c: Likewise. * gcc.dg/vect/vect-72.c: Likewise. * gcc.dg/vect/vect-75-big-array.c: Likewise. * gcc.dg/vect/vect-75.c: Likewise. * gcc.dg/vect/vect-77-alignchecks.c: Likewise. * gcc.dg/vect/vect-77-global.c: Likewise. * gcc.dg/vect/vect-78-alignchecks.c: Likewise. * gcc.dg/vect/vect-78-global.c: Likewise. * gcc.dg/vect/vect-multitypes-3.c: Likewise. * gcc.dg/vect/vect-multitypes-4.c: Likewise. * gcc.dg/vect/vect-multitypes-6.c: Likewise. * gcc.dg/vect/vect-peel-4.c: Likewise. * gcc.dg/vect/vect-peel-3.c: Likewise, and also for peeling for alignment. Index: gcc/doc/sourcebuild.texi =================================================================== --- gcc/doc/sourcebuild.texi 2017-11-03 16:06:22.561036988 +0000 +++ gcc/doc/sourcebuild.texi 2017-11-03 16:06:26.237889385 +0000 @@ -1481,6 +1481,11 @@ Like @code{vect_perm3_byte}, but for 16- @item vect_shift Target supports a hardware vector shift operation. +@item vect_unaligned_possible +Target prefers vectors to have an alignment greater than element +alignment, but also allows unaligned vector accesses in some +circumstances. + @item vect_widen_sum_hi_to_si Target supports a vector widening summation of @code{short} operands into @code{int} results, or can promote (unpack) from @code{short} Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp 2017-11-03 16:06:22.564036053 +0000 +++ gcc/testsuite/lib/target-supports.exp 2017-11-03 16:06:26.241888136 +0000 @@ -6399,6 +6399,15 @@ proc check_effective_target_vect_element return $et_vect_element_align($et_index) } +# Return 1 if we expect to see unaligned accesses in at least some +# vector dumps. + +proc check_effective_target_vect_unaligned_possible { } { + return [expr { ![check_effective_target_vect_element_align_preferred] + && (![check_effective_target_vect_no_align] + || [check_effective_target_vect_hw_misalign]) }] +} + # Return 1 if the target supports vector LOAD_LANES operations, 0 otherwise. proc check_effective_target_vect_load_lanes { } { Index: gcc/testsuite/gcc.dg/vect/slp-25.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-25.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-25.c 2017-11-03 16:06:26.237889385 +0000 @@ -57,4 +57,4 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */ /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vect_natural_alignment } } } } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { ! vect_unaligned_possible } || { ! vect_natural_alignment } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c 2017-11-03 16:06:08.014090402 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c 2017-11-03 16:06:26.239888760 +0000 @@ -89,6 +89,6 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {{ vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B }}} } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { ! vect_unaligned_possible } || vect_sizes_32B_16B } } } } */ /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target { vect_no_align && { { ! vect_hw_misalign } && vect_sizes_32B_16B } } }} } */ Index: gcc/testsuite/gcc.dg/vect/vect-109.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-109.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-109.c 2017-11-03 16:06:26.237889385 +0000 @@ -76,5 +76,5 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_element_align } } } */ /* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 2 "vect" { xfail vect_element_align } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target vect_element_align } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target vect_element_align xfail { ! vect_unaligned_possible } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-33.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-33.c 2015-06-02 23:53:35.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-33.c 2017-11-03 16:06:26.237889385 +0000 @@ -37,6 +37,6 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump "Vectorizing an unaligned access" "vect" { target { { { ! powerpc*-*-* } && vect_hw_misalign } && { { ! vect64 } || vect_multiple_sizes } } } } } */ +/* { dg-final { scan-tree-dump "Vectorizing an unaligned access" "vect" { target { { { ! powerpc*-*-* } && vect_hw_misalign } && { { ! vect64 } || vect_multiple_sizes } } xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump "Alignment of access forced using peeling" "vect" { target { vector_alignment_reachable && { vect64 && {! vect_multiple_sizes} } } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { { {! vector_alignment_reachable} || {! vect64} } && {! vect_hw_misalign} } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-42.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-42.c 2015-06-02 23:53:35.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-42.c 2017-11-03 16:06:26.237889385 +0000 @@ -67,5 +67,5 @@ int main (void) /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { { ! vector_alignment_reachable } && { ! vect_element_align } } } } } */ /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail { vect_no_align || { { ! vector_alignment_reachable } || vect_element_align } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target vect_element_align } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target vect_element_align xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || { { ! vector_alignment_reachable } || vect_element_align } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-56.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-56.c 2017-11-03 16:06:22.562036677 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-56.c 2017-11-03 16:06:26.238889073 +0000 @@ -68,7 +68,7 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { vect_element_align } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { ! vect_element_align } xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { vect_element_align } xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { target { { ! vect_element_align } || vect_element_align_preferred} } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { vect_element_align && { ! vect_element_align_preferred } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-60.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-60.c 2017-11-03 16:06:22.562036677 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-60.c 2017-11-03 16:06:26.238889073 +0000 @@ -69,7 +69,7 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { vect_element_align } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { ! vect_element_align } xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { vect_element_align } xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { target { { ! vect_element_align } || vect_element_align_preferred } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { vect_element_align && { ! vect_element_align_preferred } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-96.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-96.c 2017-11-03 16:06:08.013090240 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-96.c 2017-11-03 16:06:26.239888760 +0000 @@ -48,6 +48,6 @@ int main (void) For targets that don't support unaligned loads, version for the store. */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_no_align} && vector_alignment_reachable } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_no_align} && vector_alignment_reachable } xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || { { ! vector_alignment_reachable} || vect_element_align } } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { vect_no_align && { ! vect_hw_misalign } } || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-peel-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-peel-1.c 2017-11-03 16:06:22.563036365 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-peel-1.c 2017-11-03 16:06:26.240888448 +0000 @@ -48,5 +48,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_element_align_preferred } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-27.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-27.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-27.c 2017-11-03 16:06:26.237889385 +0000 @@ -46,5 +46,5 @@ int main (void) /* The initialization induction loop (with aligned access) is also vectorized. */ /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-29.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-29.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-29.c 2017-11-03 16:06:26.237889385 +0000 @@ -51,6 +51,6 @@ int main (void) /* The initialization induction loop (with aligned access) is also vectorized. */ /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" {target { vect_no_align && { ! vect_hw_misalign } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-44.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-44.c 2017-05-18 07:51:07.308258294 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-44.c 2017-11-03 16:06:26.238889073 +0000 @@ -65,7 +65,7 @@ int main (void) two loads to be aligned). */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {{! vect_no_align} && {! vect_hw_misalign} } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-48.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-48.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-48.c 2017-11-03 16:06:26.238889073 +0000 @@ -55,6 +55,6 @@ int main (void) (The store is aligned). */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-50.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-50.c 2017-05-18 07:51:07.308258294 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-50.c 2017-11-03 16:06:26.238889073 +0000 @@ -61,8 +61,7 @@ int main (void) align the store will not force the two loads to be aligned). */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target vect_hw_misalign } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && { {! vect_no_align } && {! vect_hw_misalign } } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-52.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-52.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-52.c 2017-11-03 16:06:26.238889073 +0000 @@ -56,6 +56,6 @@ int main (void) (The store is aligned). */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-72.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-72.c 2015-12-18 10:17:16.000000000 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-72.c 2017-11-03 16:06:26.238889073 +0000 @@ -48,5 +48,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-75-big-array.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-75-big-array.c 2017-11-03 16:06:03.055282663 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-75-big-array.c 2017-11-03 16:06:26.238889073 +0000 @@ -50,4 +50,4 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-75.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-75.c 2017-11-03 16:06:08.013090240 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-75.c 2017-11-03 16:06:26.239888760 +0000 @@ -50,4 +50,4 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c 2017-11-03 16:06:08.013090240 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c 2017-11-03 16:06:26.239888760 +0000 @@ -54,7 +54,7 @@ int main (void) both for the load and the store. */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vect_no_align} && { unaligned_stack && vector_alignment_reachable } } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && { vect_no_align && { ! vect_hw_misalign } } } || {unaligned_stack && { {! vector_alignment_reachable} && {! vect_no_align } } } } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { { unaligned_stack && { vector_alignment_reachable && vect_no_align } } || {unaligned_stack && { {! vector_alignment_reachable} && vect_no_align } } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-77-global.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-77-global.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-77-global.c 2017-11-03 16:06:26.239888760 +0000 @@ -48,6 +48,6 @@ int main (void) /* Requires versioning for aliasing. */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c 2017-11-03 16:06:08.013090240 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c 2017-11-03 16:06:26.239888760 +0000 @@ -55,7 +55,7 @@ int main (void) both for the load and the store. */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vect_no_align} && { unaligned_stack && vector_alignment_reachable } } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && { vect_no_align && { ! vect_hw_misalign } } } || {unaligned_stack && { {! vector_alignment_reachable} && { ! vect_no_align } } } } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { { unaligned_stack && { vector_alignment_reachable && vect_no_align } } || {unaligned_stack && { {! vector_alignment_reachable} && vect_no_align } } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-78-global.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-78-global.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-78-global.c 2017-11-03 16:06:26.239888760 +0000 @@ -48,6 +48,6 @@ int main (void) (The store is aligned). */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c 2017-11-03 16:06:08.014090402 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c 2017-11-03 16:06:26.239888760 +0000 @@ -59,5 +59,5 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { xfail { ! vect_unaligned_possible } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c 2017-11-03 16:06:26.239888760 +0000 @@ -95,6 +95,6 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { target { vect_element_align} } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 8 "vect" { xfail { vect_no_align || vect_element_align } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target { vect_element_align } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 8 "vect" { target { ! vect_element_align } xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target { vect_element_align } xfail { ! vect_unaligned_possible } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c 2017-11-03 16:06:08.014090402 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c 2017-11-03 16:06:26.240888448 +0000 @@ -66,5 +66,5 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { sparc*-*-* && ilp32 } }} } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" { xfail { ! vect_unaligned_possible } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-peel-4.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-peel-4.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-peel-4.c 2017-11-03 16:06:26.240888448 +0000 @@ -46,5 +46,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-peel-3.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-peel-3.c 2017-11-03 16:06:08.014090402 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-peel-3.c 2017-11-03 16:06:26.240888448 +0000 @@ -61,5 +61,5 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B } } } } } */ -/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B } } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { ! vect_unaligned_possible } || vect_sizes_32B_16B } } } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { ! vect_unaligned_possible } || vect_sizes_32B_16B } } } } */