From patchwork Fri Nov 3 16:19:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 117941 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3654527qgn; Fri, 3 Nov 2017 09:20:02 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TRvLH9bZZYgMls7bREI3F4qjEeRLSYY0NXAxCl410W69D/I5AdS/JQ1XzTmYCT7vgNSH2k X-Received: by 10.99.137.72 with SMTP id v69mr7780662pgd.130.1509726002610; Fri, 03 Nov 2017 09:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509726002; cv=none; d=google.com; s=arc-20160816; b=dojyvWVEKUaiToSTyQDHto9mD2Igqfim+QPP2JHwuD+jFqMmxqQb4OI7UP87yk08OS eNJstGT96TwkNA3vXMv3kf9LsWZE2O4Pnvik3h2z8lr2nr+P8PDRonT/Nh5xzMJNtTWN osg9Kj95BsGu5h9Jc4iVBaZgGpez7zAlOMhbxoQki/5bR3n0b2NT03laSTnLNRqu5DVr 3u6oWF2brdq6UWzw/KYgNuoavYpwdt49tNpsMXYyshgkr0rEGzCXANJi/zQdJ0ISCzuz KwKatqeS3YIuqbNYijZ39l/oA+4AN2TlQPyDmPNIkjC4+M/FIXLm5L1CpTbrkaYORSZ6 vnwA== 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=mAL/+rmD3iIWDPrO+bTME3Ac808Xm7qpD7vhAm05wsM=; b=u0805Ae+TblNoNa47ajveys3CWWsSM7LGHj1QaLYqXeO8n9u71RmD8wSoT9S62bJku 3vWGbNXlkVuGwL4FU8j+XUhNy6fAT1ECICrU+Mm0MOpUO+Tpa/7LiPjlTaVZnH5afyjk jMlG0cTz3Kfyq4ZGkC7shKElKPLdwPm+oXuqTzGuYKbb/N3FlGrHSrq5D+3dPfjXwqQl Bi+9z2rFkyk0qBUN0I0/tyCekDOsOqjYdxF5hPalNym8pgd7uD88xBQdkF7z/+2w67Xr DSz1sN146Rr1cVkxgrMSQt2GohH5ayfDh5Wu9aEUpIJK7s4uPebRVYduClQBmKwZeoUJ /MGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=o7/KGvSG; spf=pass (google.com: domain of gcc-patches-return-465876-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-465876-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 98si5409115plt.495.2017.11.03.09.20.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Nov 2017 09:20:02 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-465876-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=o7/KGvSG; spf=pass (google.com: domain of gcc-patches-return-465876-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-465876-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=hhIAsDQytO18q2OalxCnnkiXGKvJE GRepAx3K2ZqcM4ei4w93kfkwuoBYr+3Ueo2J5YS1JAES5cW9yo05mBWm/vcttXw4 qIxw1v0OJ4V+3drlT+A+SyG8ChIlVVhSsFcPeZlrFGkVcb/Zok1W7OJu4Rw8Cn4O b5IKuxHTpOQ98M= 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=GdrVwK5F9BKZy9VoWXpsFaoUNb4=; b=o7/ KGvSGNBPPFmloZvPd9OCu1Hh9wRHPZHBHXMaZb0Nh1DKQNuKeVBwziUpOt6x1+S9 UvBNyypqvhNuwSUXbbLOU6VTM7ZcUi2sJ3U0RtFPt95XnxsGByQhv9QdgphwE9xT R0C+5fITWwjn1weczi4qR6uCeTIVOlUSIvxxCVjo= Received: (qmail 38659 invoked by alias); 3 Nov 2017 16:19:45 -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 38616 invoked by uid 89); 3 Nov 2017 16:19:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-15.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=dots X-HELO: mail-wm0-f54.google.com Received: from mail-wm0-f54.google.com (HELO mail-wm0-f54.google.com) (74.125.82.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Nov 2017 16:19:41 +0000 Received: by mail-wm0-f54.google.com with SMTP id r68so2638729wmr.3 for ; Fri, 03 Nov 2017 09:19:41 -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=mAL/+rmD3iIWDPrO+bTME3Ac808Xm7qpD7vhAm05wsM=; b=I0J8DXJL+1W3s0Rb2LpRYCENjynXK4xF+Zo/hP1Lc4zs3bnUslTNpGSQVs1uKQPSiG POOUvjEbZxTRfpbiRBr+gCPynqM+I9fOAhrI9/h25OJRjcYJxsH9tVcV1dcRfsI7/IYP 2pm+3okL/8RAyzEcWmZlFjrn1/SJzD6pHRUYVtRlURIZLiBt0sK7LNImGyaisJgBmbGA PlMArwmOxV4IWL2QpPnxHiagTdTno0qmQCeyLJRtVS1RV6wO0WVefuRTLqKRjxVlU3lF V1lxIei+7HiL8rU6RtDQd3tyyw8njSfWqyxSwrD2YFctkFx2B9SqI9GET0MgmjUj/eis bDlg== X-Gm-Message-State: AJaThX5bHVNk2/ed+ugt2wyQP179IRWTWgFPrzUknZ7pJIKyEpaqlVc1 4mV76a2cZPX576pEb17slO16R71BSSw= X-Received: by 10.28.55.197 with SMTP id e188mr291951wma.60.1509725979329; Fri, 03 Nov 2017 09:19:39 -0700 (PDT) Received: from localhost (188.29.164.162.threembb.co.uk. [188.29.164.162]) by smtp.gmail.com with ESMTPSA id h185sm2488948wma.19.2017.11.03.09.19.38 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Nov 2017 09:19:38 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [5/10] Add vect_perm3_* target selectors References: <87inerqqyz.fsf@linaro.org> Date: Fri, 03 Nov 2017 16:19:36 +0000 In-Reply-To: <87inerqqyz.fsf@linaro.org> (Richard Sandiford's message of "Fri, 03 Nov 2017 16:14:44 +0000") Message-ID: <87vairpc6f.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 SLP load permutation fails if any individual permutation requires more than two vector inputs. For 128-bit vectors, it's possible to permute 3 contiguous loads of 32-bit and 8-bit elements, but not 16-bit elements or 64-bit elements. The results are reversed for 256-bit vectors, and so on for wider vectors. This patch adds a routine that tests whether a permute will require three vectors for a given vector count and element size, then adds vect_perm3_* target selectors for the cases that we currently use. 2017-11-03 Richard Sandiford Alan Hayward David Sherwood gcc/ * doc/sourcebuild.texi (vect_perm_short, vect_perm_byte): Document previously undocumented selectors. (vect_perm3_byte, vect_perm3_short, vect_perm3_int): Document. gcc/testsuite/ * lib/target-supports.exp (vect_perm_supported): New proc. (check_effective_target_vect_perm3_int): Likewise. (check_effective_target_vect_perm3_short): Likewise. (check_effective_target_vect_perm3_byte): Likewise. * gcc.dg/vect/slp-perm-1.c: Expect SLP load permutation to succeed if vect_perm3_int. * gcc.dg/vect/slp-perm-5.c: Likewise. * gcc.dg/vect/slp-perm-6.c: Likewise. * gcc.dg/vect/slp-perm-7.c: Likewise. * gcc.dg/vect/slp-perm-8.c: Likewise vect_perm3_byte. * gcc.dg/vect/slp-perm-9.c: Likewise vect_perm3_short. Use vect_perm_short instead of vect_perm. Add a scan-tree-dump-not test for vect_perm3_short targets. Index: gcc/doc/sourcebuild.texi =================================================================== --- gcc/doc/sourcebuild.texi 2017-10-26 12:27:58.124235242 +0100 +++ gcc/doc/sourcebuild.texi 2017-11-03 16:06:19.377029536 +0000 @@ -1448,6 +1448,32 @@ element types. @item vect_perm Target supports vector permutation. +@item vect_perm_byte +Target supports permutation of vectors with 8-bit elements. + +@item vect_perm_short +Target supports permutation of vectors with 16-bit elements. + +@item vect_perm3_byte +Target supports permutation of vectors with 8-bit elements, and for the +default vector length it is possible to permute: +@example +@{ a0, a1, a2, b0, b1, b2, @dots{} @} +@end example +to: +@example +@{ a0, a0, a0, b0, b0, b0, @dots{} @} +@{ a1, a1, a1, b1, b1, b1, @dots{} @} +@{ a2, a2, a2, b2, b2, b2, @dots{} @} +@end example +using only two-vector permutes, regardless of how long the sequence is. + +@item vect_perm3_int +Like @code{vect_perm3_byte}, but for 32-bit elements. + +@item vect_perm3_short +Like @code{vect_perm3_byte}, but for 16-bit elements. + @item vect_shift Target supports a hardware vector shift operation. Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp 2017-11-03 16:06:12.625838683 +0000 +++ gcc/testsuite/lib/target-supports.exp 2017-11-03 16:06:19.378029224 +0000 @@ -5547,6 +5547,78 @@ proc check_effective_target_vect_perm { return $et_vect_perm_saved($et_index) } +# Return 1 if, for some VF: +# +# - the target's default vector size is VF * ELEMENT_BITS bits +# +# - it is possible to implement the equivalent of: +# +# int_t s1[COUNT][COUNT * VF], s2[COUNT * VF]; +# for (int i = 0; i < COUNT; ++i) +# for (int j = 0; j < COUNT * VF; ++j) +# s1[i][j] = s2[j - j % COUNT + i] +# +# using only a single 2-vector permute for each vector in s1. +# +# E.g. for COUNT == 3 and vector length 4, the two arrays would be: +# +# s2 | a0 a1 a2 a3 | b0 b1 b2 b3 | c0 c1 c2 c3 +# ------+-------------+-------------+------------ +# s1[0] | a0 a0 a0 a3 | a3 a3 b2 b2 | b2 c1 c1 c1 +# s1[1] | a1 a1 a1 b0 | b0 b0 b3 b3 | b3 c2 c2 c2 +# s1[2] | a2 a2 a2 b1 | b1 b1 c0 c0 | c0 c3 c3 c3 +# +# Each s1 permute requires only two of a, b and c. +# +# The distance between the start of vector n in s1[0] and the start +# of vector n in s2 is: +# +# A = (n * VF) % COUNT +# +# The corresponding value for the end of vector n is: +# +# B = (n * VF + VF - 1) % COUNT +# +# Subtracting i from each value gives the corresponding difference +# for s1[i]. The condition being tested by this function is false +# iff A - i > 0 and B - i < 0 for some i and n, such that the first +# element for s1[i] comes from vector n - 1 of s2 and the last element +# comes from vector n + 1 of s2. The condition is therefore true iff +# A <= B for all n. This is turn means the condition is true iff: +# +# (n * VF) % COUNT + (VF - 1) % COUNT < COUNT +# +# for all n. COUNT - (n * VF) % COUNT is bounded by gcd (VF, COUNT), +# and will be that value for at least one n in [0, COUNT), so we want: +# +# (VF - 1) % COUNT < gcd (VF, COUNT) + +proc vect_perm_supported { count element_bits } { + set vector_bits [lindex [available_vector_sizes] 0] + if { $vector_bits <= 0 } { + return 0 + } + set vf [expr { $vector_bits / $element_bits }] + + # Compute gcd (VF, COUNT). + set gcd $vf + set temp1 $count + while { $temp1 > 0 } { + set temp2 [expr { $gcd % $temp1 }] + set gcd $temp1 + set temp1 $temp2 + } + return [expr { ($vf - 1) % $count < $gcd }] +} + +# Return 1 if the target supports SLP permutation of 3 vectors when each +# element has 32 bits. + +proc check_effective_target_vect_perm3_int { } { + return [expr { [check_effective_target_vect_perm] + && [vect_perm_supported 3 32] }] +} + # Return 1 if the target plus current options supports vector permutation # on byte-sized elements, 0 otherwise. # @@ -5578,6 +5650,14 @@ proc check_effective_target_vect_perm_by return $et_vect_perm_byte_saved($et_index) } +# Return 1 if the target supports SLP permutation of 3 vectors when each +# element has 8 bits. + +proc check_effective_target_vect_perm3_byte { } { + return [expr { [check_effective_target_vect_perm_byte] + && [vect_perm_supported 3 8] }] +} + # Return 1 if the target plus current options supports vector permutation # on short-sized elements, 0 otherwise. # @@ -5609,6 +5689,14 @@ proc check_effective_target_vect_perm_sh return $et_vect_perm_short_saved($et_index) } +# Return 1 if the target supports SLP permutation of 3 vectors when each +# element has 16 bits. + +proc check_effective_target_vect_perm3_short { } { + return [expr { [check_effective_target_vect_perm_short] + && [vect_perm_supported 3 16] }] +} + # Return 1 if the target plus current options supports folding of # copysign into XORSIGN. # Index: gcc/testsuite/gcc.dg/vect/slp-perm-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-perm-1.c 2017-11-03 16:06:08.011089914 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-perm-1.c 2017-11-03 16:06:19.377029536 +0000 @@ -80,9 +80,9 @@ int main (int argc, const char* argv[]) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { vect_perm && {! vect_load_lanes } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { vect_perm3_int && {! vect_load_lanes } } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target vect_load_lanes } } } */ -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm && vect_load_lanes } } } } */ +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm3_int && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump "LOAD_LANES" "vect" { target vect_load_lanes } } } */ /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-perm-5.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-perm-5.c 2017-11-03 16:06:08.012090077 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-perm-5.c 2017-11-03 16:06:19.377029536 +0000 @@ -104,9 +104,9 @@ int main (int argc, const char* argv[]) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target { vect_perm && {! vect_load_lanes } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target { vect_perm3_int && {! vect_load_lanes } } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target vect_load_lanes } } } */ -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm && vect_load_lanes } } } } */ +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm3_int && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump "LOAD_LANES" "vect" { target vect_load_lanes } } } */ /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-perm-6.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-perm-6.c 2017-11-03 16:06:08.012090077 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-perm-6.c 2017-11-03 16:06:19.377029536 +0000 @@ -103,8 +103,8 @@ int main (int argc, const char* argv[]) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target { vect_perm && {! vect_load_lanes } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target { vect_perm3_int && {! vect_load_lanes } } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_load_lanes } } } */ -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm && vect_load_lanes } } } } */ +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm3_int && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump "LOAD_LANES" "vect" { target vect_load_lanes } } } */ /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-perm-7.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-perm-7.c 2017-11-03 16:06:08.012090077 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-perm-7.c 2017-11-03 16:06:19.377029536 +0000 @@ -96,8 +96,8 @@ int main (int argc, const char* argv[]) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { vect_perm && {! vect_load_lanes } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { vect_perm3_int && { ! vect_load_lanes } } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target vect_load_lanes } } } */ -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm && vect_load_lanes } } } } */ +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm3_int && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump "LOAD_LANES" "vect" { target vect_load_lanes } } } */ /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-perm-8.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-perm-8.c 2017-11-03 16:06:08.012090077 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-perm-8.c 2017-11-03 16:06:19.377029536 +0000 @@ -60,8 +60,8 @@ int main (int argc, const char* argv[]) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm_byte } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { vect_perm_byte && {! vect_load_lanes } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { vect_perm3_byte && { ! vect_load_lanes } } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target vect_load_lanes } } } */ -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm_byte && vect_load_lanes } } } } */ +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm3_byte && vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump "LOAD_LANES" "vect" { target vect_load_lanes } } } */ /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */ Index: gcc/testsuite/gcc.dg/vect/slp-perm-9.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-perm-9.c 2017-11-03 16:06:08.012090077 +0000 +++ gcc/testsuite/gcc.dg/vect/slp-perm-9.c 2017-11-03 16:06:19.378029224 +0000 @@ -57,9 +57,10 @@ int main (int argc, const char* argv[]) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 2 "vect" { target { {! vect_perm } || {! vect_sizes_16B_8B } } } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { { vect_perm } && { vect_sizes_16B_8B } } } } } */ -/* { dg-final { scan-tree-dump-times "permutation requires at least three vectors" 1 "vect" { target vect_perm_short } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { {! vect_perm } || {! vect_sizes_32B_16B } } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { { vect_perm } && { vect_sizes_32B_16B } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 2 "vect" { target { ! { vect_perm_short || vect_load_lanes } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm_short || vect_load_lanes } } } } */ +/* { dg-final { scan-tree-dump-times "permutation requires at least three vectors" 1 "vect" { target { vect_perm_short && { ! vect_perm3_short } } } } } */ +/* { dg-final { scan-tree-dump-not "permutation requires at least three vectors" "vect" { target vect_perm3_short } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { { ! vect_perm3_short } || vect_load_lanes } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { vect_perm3_short && { ! vect_load_lanes } } } } } */