From patchwork Fri Nov 3 16:22:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 117945 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3657371qgn; Fri, 3 Nov 2017 09:22:59 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Q53lrCeThhsmih2YJhjfkL2zgHGecrOOjwVSLRlWWTL2iNxhfSGmeuIf3Qo9T4Cy4W2coU X-Received: by 10.98.35.194 with SMTP id q63mr8176775pfj.15.1509726179682; Fri, 03 Nov 2017 09:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509726179; cv=none; d=google.com; s=arc-20160816; b=pRVLVp3/xs9i16j8oQwOs3Cyysj3Lg1Cjg7yH1psVplu1cZHaHZ7OW7fgpY9MQ00wY Ca3Wc+D8lxnKnhkiZGeYcmqaF/tKXAX/K+Idj+UlGM1N1Ez9OFdDNWzPvcR8501tXKrL PB4kBIpHgzSRjQ306MqCdknOw5/K3sZVa+RS7Fj/SHavNrVa9lonOBs/RwxsuoTnNQkv 0V3uhCXdl5QxsoSdzdzcTEZjML4W6szL2jl6jI0US8VsD18L1SRLT71VedvmArwL6Bt9 r8jRuFfRXELXEtdK3k+zj3aI+FFwGKUjLz7X3Sz1D/UqdTsxXGPIajI4+Rh7DfvJXCmE tlxA== 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=/dP7Z1sp3j7ISkdcobBPKVOqG0cSAFaAKWiBAkHAKIU=; b=lx5rB3JprXYFNSCor1W6SKkwDMx0ivh1ExvolRKf8pggmr6T7YTw6OdQQJZaUsnjrF czXbsO6UKJlvF/pdniFqiV5YbUlpJBoY7n4Y1JxFAXSj0Wbl0w+FSzZzRCkhHygTrQcu m1gHu1infX6nsiyePiL17cSoAC2Ut+mzabwzqHJ5f4OUioNz+xL3ESwDFajCfWnnSUlb RDPs6/vOnNZB/YRreMUuu9zvGkPHijTGFrY2yZ7OfRNhfRgvlrwWzcGla7XXSRmLFBKV pn8yYLJmO1dd+Y3YzGQ9OPFed59P8s/rVpSwoc6fY9oC1VQAdZXHK8hBZTBG1np0pA7s WbEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=YX0m6tTj; spf=pass (google.com: domain of gcc-patches-return-465880-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-465880-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 e4si4758671plt.137.2017.11.03.09.22.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Nov 2017 09:22:59 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-465880-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=YX0m6tTj; spf=pass (google.com: domain of gcc-patches-return-465880-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-465880-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=jzkz0kyqky2Y+H4SAlGwo6PX+gItK PWnBAK7NvfDwOFLiU8V0c6FbkiZeoURCUagKAuKK4ooGlR5M9VEo3ILiFzwfXRrY qwOQE3BKRYnlQeEzCHYmpXboN+9BW62+GMXXyrYrwnXwaomKOyKPMcVf05p3Khq2 VWf2pbVcLJ6PlM= 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=PGvVPlQ5bgbbNikPIdQWGsHrfAM=; b=YX0 m6tTjznhqgXUYqSCdMnn/XfcjaibWBKKXrmFFC+058htBYOSO4kaUlHqztDetcff 8b8lj4J7Ws1BPqUU0oy9Pgw1wQMxiHqEdv55Vb/1+bODw9UcDTIHfrvg8RY7WVyE /L5RubGpe4dXDSG/J3ec4N2QdcWS+bxm2Y3ainso= Received: (qmail 45908 invoked by alias); 3 Nov 2017 16:22:43 -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 45893 invoked by uid 89); 3 Nov 2017 16:22:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 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-wm0-f51.google.com Received: from mail-wm0-f51.google.com (HELO mail-wm0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Nov 2017 16:22:39 +0000 Received: by mail-wm0-f51.google.com with SMTP id r196so2598521wmf.2 for ; Fri, 03 Nov 2017 09:22:38 -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=/dP7Z1sp3j7ISkdcobBPKVOqG0cSAFaAKWiBAkHAKIU=; b=OnLNcDjTqTJAwvYoFq6/w2vHuy6L2swsc8aLZ6HeI42Y1xD+snkseQsph3LQYpwu1w ga+OKHCoSCbgCP6gcju2eBGDeZ6divCZoI/dS7+gpOCuEjID5TOrsgy1KapZu2h+N21r oSkosMz4Dw965aQHa6SlsfEoTlINCNBGGpG8wctUwMuc9Uf2xXxgjOFyZPz6ztqRUe4A Lo+BHDKGBRBP4OBjvxlJ3PdUnpF9LBnu2VWXSu0KWP5b0kf3VLV8CrmUqhmCMTg9s0ym qWssrfJeOMQk0gMVcpUFod7Z7tuo51CT1ehxaFte7HqvGFyHIsXwVx0dLTQE883J3ePN oc8A== X-Gm-Message-State: AJaThX6gX2M4t2Qh7p7jkKx6XNG6sZMdHWPbPM6Yo2jBAwTRyiqvxLnk CZcRv3BVxkKfmQdwhhV50aCrpgSW/qI= X-Received: by 10.28.32.216 with SMTP id g207mr249929wmg.138.1509726156498; Fri, 03 Nov 2017 09:22:36 -0700 (PDT) Received: from localhost (188.29.164.162.threembb.co.uk. [188.29.164.162]) by smtp.gmail.com with ESMTPSA id 65sm2661429wrn.27.2017.11.03.09.22.35 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Nov 2017 09:22:35 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [9/10] Add a vect_align_stack_vars target selector References: <87inerqqyz.fsf@linaro.org> Date: Fri, 03 Nov 2017 16:22:33 +0000 In-Reply-To: <87inerqqyz.fsf@linaro.org> (Richard Sandiford's message of "Fri, 03 Nov 2017 16:14:44 +0000") Message-ID: <87efpfpc1i.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 to say whether it's possible to align a local variable to the target's preferred vector alignment. This can be false for large vectors if the alignment is only a preference and not a hard requirement (and thus if there is no need to support a stack realignment mechanism). 2017-11-03 Richard Sandiford Alan Hayward David Sherwood gcc/ * doc/sourcebuild.texi (vect_align_stack_vars): Document. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_vect_align_stack_vars): New proc. * gcc.dg/vect/vect-23.c: Only expect the array to be aligned if vect_align_stack_vars. * gcc.dg/vect/vect-24.c: Likewise. * gcc.dg/vect/vect-25.c: Likewise. * gcc.dg/vect/vect-26.c: Likewise. * gcc.dg/vect/vect-32-big-array.c: Likewise. * gcc.dg/vect/vect-32.c: Likewise. * gcc.dg/vect/vect-40.c: Likewise. * gcc.dg/vect/vect-42.c: Likewise. * gcc.dg/vect/vect-46.c: Likewise. * gcc.dg/vect/vect-48.c: Likewise. * gcc.dg/vect/vect-52.c: Likewise. * gcc.dg/vect/vect-54.c: Likewise. * gcc.dg/vect/vect-62.c: Likewise. * gcc.dg/vect/vect-67.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-78-alignchecks.c: Likewise. * gcc.dg/vect/vect-89-big-array.c: Likewise. * gcc.dg/vect/vect-89.c: Likewise. * gcc.dg/vect/vect-96.c: Likewise. * gcc.dg/vect/vect-multitypes-3.c: Likewise. * gcc.dg/vect/vect-multitypes-6.c: Likewise. Index: gcc/doc/sourcebuild.texi =================================================================== --- gcc/doc/sourcebuild.texi 2017-11-03 16:06:52.929591350 +0000 +++ gcc/doc/sourcebuild.texi 2017-11-03 16:06:56.516976666 +0000 @@ -1373,6 +1373,10 @@ Target supports Fortran @code{real} kind @subsubsection Vector-specific attributes @table @code +@item vect_align_stack_vars +The target's ABI allows stack variables to be aligned to the preferred +vector alignment. + @item vect_condition Target supports vector conditional operations. Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp 2017-11-03 16:06:52.930591737 +0000 +++ gcc/testsuite/lib/target-supports.exp 2017-11-03 16:06:56.519977825 +0000 @@ -6350,6 +6350,12 @@ proc check_effective_target_vect_element return [check_effective_target_vect_variable_length] } +# Return 1 if we can align stack data to the preferred vector alignment. + +proc check_effective_target_vect_align_stack_vars { } { + return 1 +} + # Return 1 if vector alignment (for types of size 32 bit or less) is reachable, 0 otherwise. proc check_effective_target_vector_alignment_reachable { } { Index: gcc/testsuite/gcc.dg/vect/vect-23.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-23.c 2016-11-22 21:16:10.000000000 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-23.c 2017-11-03 16:06:56.516976666 +0000 @@ -125,4 +125,4 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-24.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-24.c 2017-02-23 19:54:09.000000000 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-24.c 2017-11-03 16:06:56.516976666 +0000 @@ -123,4 +123,4 @@ int main (void) return main1 (); } /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { { ! aarch64*-*-* } && { ! arm-*-* } } } } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-25.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-25.c 2015-06-02 23:53:35.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-25.c 2017-11-03 16:06:56.516976666 +0000 @@ -51,4 +51,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 "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-26.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-26.c 2017-11-03 16:06:22.562036677 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-26.c 2017-11-03 16:06:56.516976666 +0000 @@ -36,5 +36,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" 0 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_element_align_preferred } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-32-big-array.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-32-big-array.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-32-big-array.c 2017-11-03 16:06:56.516976666 +0000 @@ -36,4 +36,4 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-32.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-32.c 2017-11-03 16:06:08.012090077 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-32.c 2017-11-03 16:06:56.516976666 +0000 @@ -40,4 +40,4 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-40.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-40.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-40.c 2017-11-03 16:06:56.516976666 +0000 @@ -59,4 +59,4 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"} } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-42.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-42.c 2017-11-03 16:06:26.237889385 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-42.c 2017-11-03 16:06:56.516976666 +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 xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target vect_element_align xfail { ! { vect_unaligned_possible && vect_align_stack_vars } } } } } */ /* { 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-46.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-46.c 2015-06-02 23:53:38.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-46.c 2017-11-03 16:06:56.517977052 +0000 @@ -61,4 +61,4 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-48.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-48.c 2017-11-03 16:06:26.238889073 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-48.c 2017-11-03 16:06:56.517977052 +0000 @@ -55,6 +55,7 @@ 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_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target vect_align_stack_vars 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-52.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-52.c 2017-11-03 16:06:26.238889073 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-52.c 2017-11-03 16:06:56.517977052 +0000 @@ -56,6 +56,7 @@ 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_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target vect_align_stack_vars 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-54.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-54.c 2017-11-03 16:06:22.562036677 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-54.c 2017-11-03 16:06:56.517977052 +0000 @@ -60,5 +60,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" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ /* { 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-62.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-62.c 2015-11-11 15:40:09.000000000 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-62.c 2017-11-03 16:06:56.517977052 +0000 @@ -65,4 +65,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 "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-67.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-67.c 2017-11-03 16:06:08.013090240 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-67.c 2017-11-03 16:06:56.517977052 +0000 @@ -49,4 +49,4 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ 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:26.238889073 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-75-big-array.c 2017-11-03 16:06:56.517977052 +0000 @@ -50,4 +50,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" 1 "vect" { target { 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 "Vectorizing an unaligned access" 2 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_align_stack_vars 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:26.239888760 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-75.c 2017-11-03 16:06:56.517977052 +0000 @@ -50,4 +50,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" 1 "vect" { target { 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 "Vectorizing an unaligned access" 2 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_align_stack_vars 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:26.239888760 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c 2017-11-03 16:06:56.518977438 +0000 @@ -54,7 +54,8 @@ 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_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_align_stack_vars 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-alignchecks.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c 2017-11-03 16:06:26.239888760 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c 2017-11-03 16:06:56.518977438 +0000 @@ -55,7 +55,8 @@ 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_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { ! vect_align_stack_vars } 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-89-big-array.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-89-big-array.c 2017-11-03 16:06:22.562036677 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-89-big-array.c 2017-11-03 16:06:56.518977438 +0000 @@ -45,5 +45,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" 0 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_element_align_preferred } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-89.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-89.c 2017-11-03 16:06:22.562036677 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-89.c 2017-11-03 16:06:56.518977438 +0000 @@ -49,5 +49,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" 0 "vect" } } */ -/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_element_align_preferred } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */ +/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-96.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-96.c 2017-11-03 16:06:26.239888760 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-96.c 2017-11-03 16:06:56.518977438 +0000 @@ -48,6 +48,7 @@ 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 } xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { { {! vect_no_align} && vector_alignment_reachable } && { ! vect_align_stack_vars } } xfail { ! vect_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { {! vect_no_align} && vector_alignment_reachable } && vect_align_stack_vars } 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-multitypes-3.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c 2017-11-03 16:06:26.239888760 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c 2017-11-03 16:06:56.518977438 +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_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { xfail { ! { vect_unaligned_possible && vect_align_stack_vars } } } } } */ Index: gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c 2017-11-03 16:06:26.240888448 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c 2017-11-03 16:06:56.518977438 +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_unaligned_possible } } } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" { xfail { ! { vect_unaligned_possible && vect_align_stack_vars } } } } } */