* [PATCH] Fix PR68707, 67323
@ 2015-12-16 15:01 Richard Biener
2015-12-17 10:38 ` Alan Lawrence
2016-01-08 11:30 ` [PATCH] Fix PR68707 Alan Lawrence
0 siblings, 2 replies; 9+ messages in thread
From: Richard Biener @ 2015-12-16 15:01 UTC (permalink / raw)
To: gcc-patches; +Cc: richard.earnshaw, marcus.shawcroft, ramana.radhakrishnan
The following patch adds a heuristic to prefer store/load-lanes
over SLP when vectorizing. Compared to the variant attached to
the PR I made the STMT_VINFO_STRIDED_P behavior explicit (matching
what you've tested).
It's a heuristic that may end up vectorizing less loops or loops
in a less optimal way.
Thus I wait for your ok (it's essentially ARM specific).
Bootstrapped and tested on x86_64-unknown-linux-gnu.
Ok? It will require a bunch of vectorizer tests to be adjusted for
ARM I think.
Thanks,
Richard.
2015-12-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/68707
PR tree-optimization/67323
* tree-vect-slp.c (vect_analyze_slp_instance): Drop SLP instances
if they can be vectorized using load/store-lane instructions.
Index: gcc/tree-vect-slp.c
===================================================================
*** gcc/tree-vect-slp.c (revision 231673)
--- gcc/tree-vect-slp.c (working copy)
*************** vect_analyze_slp_instance (vec_info *vin
*** 1808,1813 ****
--- 1802,1836 ----
}
}
+ /* If the loads and stores can be handled with load/store-lane
+ instructions do not generate this SLP instance. */
+ if (is_a <loop_vec_info> (vinfo)
+ && loads_permuted
+ && dr && vect_store_lanes_supported (vectype, group_size))
+ {
+ slp_tree load_node;
+ FOR_EACH_VEC_ELT (loads, i, load_node)
+ {
+ gimple *first_stmt = GROUP_FIRST_ELEMENT
+ (vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (load_node)[0]));
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (first_stmt);
+ if (! STMT_VINFO_STRIDED_P (stmt_vinfo)
+ && ! vect_load_lanes_supported
+ (STMT_VINFO_VECTYPE (stmt_vinfo),
+ GROUP_SIZE (stmt_vinfo)))
+ break;
+ }
+ if (i == loads.length ())
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "Built SLP cancelled: can use "
+ "load/store-lanes\n");
+ vect_free_slp_instance (new_instance);
+ return false;
+ }
+ }
+
vinfo->slp_instances.safe_push (new_instance);
if (dump_enabled_p ())
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix PR68707, 67323
2015-12-16 15:01 [PATCH] Fix PR68707, 67323 Richard Biener
@ 2015-12-17 10:38 ` Alan Lawrence
2015-12-17 10:47 ` Richard Biener
2016-01-08 11:30 ` [PATCH] Fix PR68707 Alan Lawrence
1 sibling, 1 reply; 9+ messages in thread
From: Alan Lawrence @ 2015-12-17 10:38 UTC (permalink / raw)
To: Richard Biener, gcc-patches
Cc: richard.earnshaw, marcus.shawcroft, ramana.radhakrishnan, nd
On 16/12/15 15:01, Richard Biener wrote:
>
> The following patch adds a heuristic to prefer store/load-lanes
> over SLP when vectorizing. Compared to the variant attached to
> the PR I made the STMT_VINFO_STRIDED_P behavior explicit (matching
> what you've tested).
Not sure I follow this. Compared to the variant attached to the PR - we will now
attempt to use load-lanes, if (say) all of the loads are strided, even if we
know we don't support load-lanes (for any of them). That sounds the wrong way
around and I think rather different to what you proposed earlier? (At the least,
the debug message "can use load/store lanes" is potentially misleading, that's
not necessarily the case!)
There are arguments that we want to do less SLP, generally, on ARM/AArch64 but I
think Wilco's permute cost patch
https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01469.html is a better way of
achieving that?
Just my gut feeling at this point - I haven't evaluated this version of the
patch on any benchmarks etc...
Thanks, Alan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix PR68707, 67323
2015-12-17 10:38 ` Alan Lawrence
@ 2015-12-17 10:47 ` Richard Biener
2015-12-17 15:07 ` Alan Lawrence
0 siblings, 1 reply; 9+ messages in thread
From: Richard Biener @ 2015-12-17 10:47 UTC (permalink / raw)
To: Alan Lawrence
Cc: gcc-patches, richard.earnshaw, marcus.shawcroft,
ramana.radhakrishnan, nd
On Thu, 17 Dec 2015, Alan Lawrence wrote:
> On 16/12/15 15:01, Richard Biener wrote:
> >
> > The following patch adds a heuristic to prefer store/load-lanes
> > over SLP when vectorizing. Compared to the variant attached to
> > the PR I made the STMT_VINFO_STRIDED_P behavior explicit (matching
> > what you've tested).
>
> Not sure I follow this. Compared to the variant attached to the PR - we will
> now attempt to use load-lanes, if (say) all of the loads are strided, even if
> we know we don't support load-lanes (for any of them). That sounds the wrong
> way around and I think rather different to what you proposed earlier? (At the
> least, the debug message "can use load/store lanes" is potentially misleading,
> that's not necessarily the case!)
Ah, indeed. Note that the whole thing is still guarded by the check
that we can use store-lanes for the store.
I can also do it the other way around (as previously proposed) which
would change outcome for slp-perm-11.c. That proposal would not reject
the SLP if there were any strided grouped loads involved.
> There are arguments that we want to do less SLP, generally, on ARM/AArch64 but
> I think Wilco's permute cost patch
> https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01469.html is a better way of
> achieving that?
Maybe, but it's also a heuristic. At least if we _statically_ fail to
SLP due to cost issues then we re-try with interleaving.
> Just my gut feeling at this point - I haven't evaluated this version of the
> patch on any benchmarks etc...
Btw, another option is to push the decision past full SLP analysis
and thus make the decision globally for all SLP instances - currently
SLP instances are cancelled one a one-by-one basis meaning we might
do SLP plus load/store-lanes in the same loop.
Maybe we have to go all the way to implementing a better vectorization
cost hook just for the permutations - the SLP path in theory knows
exactly which ones it will generate.
Richard.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix PR68707, 67323
2015-12-17 10:47 ` Richard Biener
@ 2015-12-17 15:07 ` Alan Lawrence
0 siblings, 0 replies; 9+ messages in thread
From: Alan Lawrence @ 2015-12-17 15:07 UTC (permalink / raw)
To: Richard Biener
Cc: gcc-patches, richard.earnshaw, marcus.shawcroft, ramana.radhakrishnan
On 17/12/15 10:46, Richard Biener wrote:
> On Thu, 17 Dec 2015, Alan Lawrence wrote:
>
>> On 16/12/15 15:01, Richard Biener wrote:
>>>
>>> The following patch adds a heuristic to prefer store/load-lanes
>>> over SLP when vectorizing. Compared to the variant attached to
>>> the PR I made the STMT_VINFO_STRIDED_P behavior explicit (matching
>>> what you've tested).
>>
>> Not sure I follow this. Compared to the variant attached to the PR - we will
>> now attempt to use load-lanes, if (say) all of the loads are strided, even if
>> we know we don't support load-lanes (for any of them). That sounds the wrong
>> way around and I think rather different to what you proposed earlier? (At the
>> least, the debug message "can use load/store lanes" is potentially misleading,
>> that's not necessarily the case!)
>
> Ah, indeed. Note that the whole thing is still guarded by the check
> that we can use store-lanes for the store.
>
> I can also do it the other way around (as previously proposed) which
> would change outcome for slp-perm-11.c. That proposal would not reject
> the SLP if there were any strided grouped loads involved.
Indeed; the STMT_VINFO_STRIDED_P || !vect_load_lanes_supported approach (as on
PR68707) vectorizes slp-perm-11.c with SLP, which works much better than the
!STMT_VINFO_STRIDED_P && !vect_load_lanes_supported, which tries to use st2 (and
only sort-of works - you get an st2 output, but no ld2, and lots of faff).
I think I move for the patch from PR68707, therefore. (Ramana - any thoughts?)
> Btw, another option is to push the decision past full SLP analysis
> and thus make the decision globally for all SLP instances - currently
> SLP instances are cancelled one a one-by-one basis meaning we might
> do SLP plus load/store-lanes in the same loop.
I don't see anything inherently wrong with doing both in the same loop. On
simple loops, I suspect we'll do better committing to one strategy or the other
(tho really it's only the VF required I think?), but then, on such simple loops,
there are probably not very many SLP instances!
> Maybe we have to go all the way to implementing a better vectorization
> cost hook just for the permutations - the SLP path in theory knows
> exactly which ones it will generate.
Yes, I think this sounds like a good plan for GCC 7. It doesn't require
constructing an entire stmt (if you are concerned about the cost of that), and
on most targets, probably integrates fairly easily with the
expand_vec_perm_const hooks.
--Alan
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] Fix PR68707
2015-12-16 15:01 [PATCH] Fix PR68707, 67323 Richard Biener
2015-12-17 10:38 ` Alan Lawrence
@ 2016-01-08 11:30 ` Alan Lawrence
2016-01-08 11:45 ` Richard Biener
2016-01-10 12:15 ` Thomas Schwinge
1 sibling, 2 replies; 9+ messages in thread
From: Alan Lawrence @ 2016-01-08 11:30 UTC (permalink / raw)
To: gcc-patches
Cc: rguenther, richard.earnshaw, marcus.shawcroft, ramana.radhakrishnan
Here's an alternative patch, using the hunk from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68707#c16, which 'improves' (heh,
we think) on the previous by allowing SLP to proceed where the loads are
strided, for example, slp-perm-11.c. Also I fix the testsuite failures (looking
for SLP where we've now decided to do load/store-lanes instead). I used simple
scan-tree-dump (rather than -times) because load_lanes typically appears many
times in the log for each instance output, and it felt fragile to look for a
specific number.
Note, this doesn't fix PR67323 - that's an example where unpermuted SLP is
still (a bit) worse than load-lanes, as it needs unrolling * 2. The
previously-posted patch doesn't fix this either, however
(https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01620.html).
Bootstrapped + check-gcc + check-g++ on x86_64 (no changes), arm and aarch64
(various new scan-tree-dump tests all passing, and PASS->FAIL for O3-pr36098.c).
gcc/ChangeLog:
2016-01-XX Alan Lawrence <alan.lawrence@arm.com>
Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_analyze_slp_instance): Cancel permuted SLP
instances that can be handled via vect_load_lanes.
gcc/testsuite/ChangeLog:
* lib/target-supports.exp (check_effective_target_vect_load_lanes): New.
* gcc.dg/vect/slp-perm-1.c: Look for vect_load_lanes instead of SLP
on platforms supporting it.
* gcc.dg/vect/slp-perm-2.c: Likewise.
* gcc.dg/vect/slp-perm-3.c: Likewise.
* gcc.dg/vect/slp-perm-5.c: Likewise.
* gcc.dg/vect/slp-perm-7.c: Likewise.
* gcc.dg/vect/slp-perm-8.c: Likewise.
* gcc.dg/vect/slp-perm-6.c: Look for vect_load_lanes in addition to SLP
on platforms supporting it.
---
gcc/testsuite/gcc.dg/vect/slp-perm-1.c | 6 +++++-
gcc/testsuite/gcc.dg/vect/slp-perm-2.c | 7 +++++--
gcc/testsuite/gcc.dg/vect/slp-perm-3.c | 7 +++++--
gcc/testsuite/gcc.dg/vect/slp-perm-5.c | 7 +++++--
gcc/testsuite/gcc.dg/vect/slp-perm-6.c | 7 +++++--
gcc/testsuite/gcc.dg/vect/slp-perm-7.c | 8 +++++---
gcc/testsuite/gcc.dg/vect/slp-perm-8.c | 7 +++++--
gcc/testsuite/lib/target-supports.exp | 19 +++++++++++++++++++
gcc/tree-vect-slp.c | 30 ++++++++++++++++++++++++++++++
9 files changed, 84 insertions(+), 14 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-1.c b/gcc/testsuite/gcc.dg/vect/slp-perm-1.c
index 2b6c134..6d0d66f 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-1.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-1.c
@@ -58,5 +58,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 } } } */
+/* { 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" 0 "vect" { target vect_load_lanes } } } */
+/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-2.c b/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
index da50e16..34b413d 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
@@ -54,5 +54,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 } } } */
-
+/* { 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" 0 "vect" { target vect_load_lanes } } } */
+/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-3.c b/gcc/testsuite/gcc.dg/vect/slp-perm-3.c
index 1d33f9b..ec13e0f 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-3.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-3.c
@@ -67,6 +67,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 } } } */
-
+/* { 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" 0 "vect" { target vect_load_lanes } } } */
+/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-5.c b/gcc/testsuite/gcc.dg/vect/slp-perm-5.c
index 9ed4d724..f44f44f 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-5.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-5.c
@@ -73,6 +73,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 } } } */
-
+/* { 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" 0 "vect" { target vect_load_lanes } } } */
+/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-6.c b/gcc/testsuite/gcc.dg/vect/slp-perm-6.c
index 392d36f..551734a 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-6.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-6.c
@@ -72,5 +72,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 } } } */
-
+/* { 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" 1 "vect" { target vect_load_lanes } } } */
+/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-7.c b/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
index 4352334..8b66142 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
@@ -71,6 +71,8 @@ int main (int argc, const char* argv[])
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_perm } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 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" 0 "vect" { target vect_load_lanes } } } */
+/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-8.c b/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
index 3bdd150..b1e9a10 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
@@ -54,5 +54,8 @@ int main (int argc, const char* argv[])
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target { vect_perm_byte && vect_char_mult } } } } */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm_byte && {! vect_char_mult } } } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 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" 0 "vect" { target vect_load_lanes } } } */
+/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm_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 } } } */
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 4e349e9..0e6d2b6 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -4823,6 +4823,25 @@ proc check_effective_target_vect_element_align { } {
return $et_vect_element_align
}
+# Return 1 if the target supports vector LOAD_LANES operations, 0 otherwise.
+
+proc check_effective_target_vect_load_lanes { } {
+ global et_vect_load_lanes
+
+ if [info exists et_vect_load_lanes] {
+ verbose "check_effective_target_vect_load_lanes: using cached result" 2
+ } else {
+ set et_vect_load_lanes 0
+ if { ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok])
+ || [istarget aarch64*-*-*] } {
+ set et_vect_load_lanes 1
+ }
+ }
+
+ verbose "check_effective_target_vect_load_lanes: returning $et_vect_load_lanes" 2
+ return $et_vect_load_lanes
+}
+
# Return 1 if the target supports vector conditional operations, 0 otherwise.
proc check_effective_target_vect_condition { } {
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index b893682..b53767f 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1793,6 +1793,36 @@ vect_analyze_slp_instance (vec_info *vinfo,
}
}
+ /* If the loads and stores can be handled with load/store-lane
+ instructions do not generate this SLP instance. */
+ if (is_a <loop_vec_info> (vinfo)
+ && loads_permuted
+ && dr && vect_store_lanes_supported (vectype, group_size))
+ {
+ slp_tree load_node;
+ FOR_EACH_VEC_ELT (loads, i, load_node)
+ {
+ gimple *first_stmt = GROUP_FIRST_ELEMENT
+ (vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (load_node)[0]));
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (first_stmt);
+ /* Use SLP for strided accesses (or if we can't load-lanes). */
+ if (STMT_VINFO_STRIDED_P (stmt_vinfo)
+ || ! vect_load_lanes_supported
+ (STMT_VINFO_VECTYPE (stmt_vinfo),
+ GROUP_SIZE (stmt_vinfo)))
+ break;
+ }
+ if (i == loads.length ())
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "Built SLP cancelled: can use "
+ "load/store-lanes\n");
+ vect_free_slp_instance (new_instance);
+ return false;
+ }
+ }
+
vinfo->slp_instances.safe_push (new_instance);
if (dump_enabled_p ())
--
1.9.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix PR68707
2016-01-08 11:30 ` [PATCH] Fix PR68707 Alan Lawrence
@ 2016-01-08 11:45 ` Richard Biener
2016-01-08 17:15 ` Richard Earnshaw (lists)
2016-01-10 12:15 ` Thomas Schwinge
1 sibling, 1 reply; 9+ messages in thread
From: Richard Biener @ 2016-01-08 11:45 UTC (permalink / raw)
To: Alan Lawrence
Cc: gcc-patches, richard.earnshaw, marcus.shawcroft, ramana.radhakrishnan
On Fri, 8 Jan 2016, Alan Lawrence wrote:
> Here's an alternative patch, using the hunk from
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68707#c16, which 'improves' (heh,
> we think) on the previous by allowing SLP to proceed where the loads are
> strided, for example, slp-perm-11.c. Also I fix the testsuite failures (looking
> for SLP where we've now decided to do load/store-lanes instead). I used simple
> scan-tree-dump (rather than -times) because load_lanes typically appears many
> times in the log for each instance output, and it felt fragile to look for a
> specific number.
>
> Note, this doesn't fix PR67323 - that's an example where unpermuted SLP is
> still (a bit) worse than load-lanes, as it needs unrolling * 2. The
> previously-posted patch doesn't fix this either, however
> (https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01620.html).
>
> Bootstrapped + check-gcc + check-g++ on x86_64 (no changes), arm and aarch64
> (various new scan-tree-dump tests all passing, and PASS->FAIL for O3-pr36098.c).
Looks good to me. Ok if arm maintainers agree.
Thanks,
Richard.
> gcc/ChangeLog:
>
> 2016-01-XX Alan Lawrence <alan.lawrence@arm.com>
> Richard Biener <rguenther@suse.de>
>
> * tree-vect-slp.c (vect_analyze_slp_instance): Cancel permuted SLP
> instances that can be handled via vect_load_lanes.
>
> gcc/testsuite/ChangeLog:
>
> * lib/target-supports.exp (check_effective_target_vect_load_lanes): New.
> * gcc.dg/vect/slp-perm-1.c: Look for vect_load_lanes instead of SLP
> on platforms supporting it.
> * gcc.dg/vect/slp-perm-2.c: Likewise.
> * gcc.dg/vect/slp-perm-3.c: Likewise.
> * gcc.dg/vect/slp-perm-5.c: Likewise.
> * gcc.dg/vect/slp-perm-7.c: Likewise.
> * gcc.dg/vect/slp-perm-8.c: Likewise.
> * gcc.dg/vect/slp-perm-6.c: Look for vect_load_lanes in addition to SLP
> on platforms supporting it.
> ---
> gcc/testsuite/gcc.dg/vect/slp-perm-1.c | 6 +++++-
> gcc/testsuite/gcc.dg/vect/slp-perm-2.c | 7 +++++--
> gcc/testsuite/gcc.dg/vect/slp-perm-3.c | 7 +++++--
> gcc/testsuite/gcc.dg/vect/slp-perm-5.c | 7 +++++--
> gcc/testsuite/gcc.dg/vect/slp-perm-6.c | 7 +++++--
> gcc/testsuite/gcc.dg/vect/slp-perm-7.c | 8 +++++---
> gcc/testsuite/gcc.dg/vect/slp-perm-8.c | 7 +++++--
> gcc/testsuite/lib/target-supports.exp | 19 +++++++++++++++++++
> gcc/tree-vect-slp.c | 30 ++++++++++++++++++++++++++++++
> 9 files changed, 84 insertions(+), 14 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-1.c b/gcc/testsuite/gcc.dg/vect/slp-perm-1.c
> index 2b6c134..6d0d66f 100644
> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-1.c
> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-1.c
> @@ -58,5 +58,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 } } } */
> +/* { 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" 0 "vect" { target vect_load_lanes } } } */
> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
>
> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-2.c b/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
> index da50e16..34b413d 100644
> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
> @@ -54,5 +54,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 } } } */
> -
> +/* { 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" 0 "vect" { target vect_load_lanes } } } */
> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-3.c b/gcc/testsuite/gcc.dg/vect/slp-perm-3.c
> index 1d33f9b..ec13e0f 100644
> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-3.c
> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-3.c
> @@ -67,6 +67,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 } } } */
> -
> +/* { 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" 0 "vect" { target vect_load_lanes } } } */
> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
>
> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-5.c b/gcc/testsuite/gcc.dg/vect/slp-perm-5.c
> index 9ed4d724..f44f44f 100644
> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-5.c
> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-5.c
> @@ -73,6 +73,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 } } } */
> -
> +/* { 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" 0 "vect" { target vect_load_lanes } } } */
> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
>
> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-6.c b/gcc/testsuite/gcc.dg/vect/slp-perm-6.c
> index 392d36f..551734a 100644
> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-6.c
> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-6.c
> @@ -72,5 +72,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 } } } */
> -
> +/* { 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" 1 "vect" { target vect_load_lanes } } } */
> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-7.c b/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
> index 4352334..8b66142 100644
> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
> @@ -71,6 +71,8 @@ int main (int argc, const char* argv[])
> }
>
> /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_perm } } } */
> -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 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" 0 "vect" { target vect_load_lanes } } } */
> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-8.c b/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
> index 3bdd150..b1e9a10 100644
> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
> @@ -54,5 +54,8 @@ int main (int argc, const char* argv[])
>
> /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target { vect_perm_byte && vect_char_mult } } } } */
> /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm_byte && {! vect_char_mult } } } } } */
> -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 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" 0 "vect" { target vect_load_lanes } } } */
> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm_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 } } } */
> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
> index 4e349e9..0e6d2b6 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -4823,6 +4823,25 @@ proc check_effective_target_vect_element_align { } {
> return $et_vect_element_align
> }
>
> +# Return 1 if the target supports vector LOAD_LANES operations, 0 otherwise.
> +
> +proc check_effective_target_vect_load_lanes { } {
> + global et_vect_load_lanes
> +
> + if [info exists et_vect_load_lanes] {
> + verbose "check_effective_target_vect_load_lanes: using cached result" 2
> + } else {
> + set et_vect_load_lanes 0
> + if { ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok])
> + || [istarget aarch64*-*-*] } {
> + set et_vect_load_lanes 1
> + }
> + }
> +
> + verbose "check_effective_target_vect_load_lanes: returning $et_vect_load_lanes" 2
> + return $et_vect_load_lanes
> +}
> +
> # Return 1 if the target supports vector conditional operations, 0 otherwise.
>
> proc check_effective_target_vect_condition { } {
> diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
> index b893682..b53767f 100644
> --- a/gcc/tree-vect-slp.c
> +++ b/gcc/tree-vect-slp.c
> @@ -1793,6 +1793,36 @@ vect_analyze_slp_instance (vec_info *vinfo,
> }
> }
>
> + /* If the loads and stores can be handled with load/store-lane
> + instructions do not generate this SLP instance. */
> + if (is_a <loop_vec_info> (vinfo)
> + && loads_permuted
> + && dr && vect_store_lanes_supported (vectype, group_size))
> + {
> + slp_tree load_node;
> + FOR_EACH_VEC_ELT (loads, i, load_node)
> + {
> + gimple *first_stmt = GROUP_FIRST_ELEMENT
> + (vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (load_node)[0]));
> + stmt_vec_info stmt_vinfo = vinfo_for_stmt (first_stmt);
> + /* Use SLP for strided accesses (or if we can't load-lanes). */
> + if (STMT_VINFO_STRIDED_P (stmt_vinfo)
> + || ! vect_load_lanes_supported
> + (STMT_VINFO_VECTYPE (stmt_vinfo),
> + GROUP_SIZE (stmt_vinfo)))
> + break;
> + }
> + if (i == loads.length ())
> + {
> + if (dump_enabled_p ())
> + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
> + "Built SLP cancelled: can use "
> + "load/store-lanes\n");
> + vect_free_slp_instance (new_instance);
> + return false;
> + }
> + }
> +
> vinfo->slp_instances.safe_push (new_instance);
>
> if (dump_enabled_p ())
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix PR68707
2016-01-08 11:45 ` Richard Biener
@ 2016-01-08 17:15 ` Richard Earnshaw (lists)
0 siblings, 0 replies; 9+ messages in thread
From: Richard Earnshaw (lists) @ 2016-01-08 17:15 UTC (permalink / raw)
To: Richard Biener, Alan Lawrence
Cc: gcc-patches, marcus.shawcroft, ramana.radhakrishnan
On 08/01/16 11:45, Richard Biener wrote:
> On Fri, 8 Jan 2016, Alan Lawrence wrote:
>
>> Here's an alternative patch, using the hunk from
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68707#c16, which 'improves' (heh,
>> we think) on the previous by allowing SLP to proceed where the loads are
>> strided, for example, slp-perm-11.c. Also I fix the testsuite failures (looking
>> for SLP where we've now decided to do load/store-lanes instead). I used simple
>> scan-tree-dump (rather than -times) because load_lanes typically appears many
>> times in the log for each instance output, and it felt fragile to look for a
>> specific number.
>>
>> Note, this doesn't fix PR67323 - that's an example where unpermuted SLP is
>> still (a bit) worse than load-lanes, as it needs unrolling * 2. The
>> previously-posted patch doesn't fix this either, however
>> (https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01620.html).
>>
>> Bootstrapped + check-gcc + check-g++ on x86_64 (no changes), arm and aarch64
>> (various new scan-tree-dump tests all passing, and PASS->FAIL for O3-pr36098.c).
>
> Looks good to me. Ok if arm maintainers agree.
>
OK by me.
R.
> Thanks,
> Richard.
>
>> gcc/ChangeLog:
>>
>> 2016-01-XX Alan Lawrence <alan.lawrence@arm.com>
>> Richard Biener <rguenther@suse.de>
>>
>> * tree-vect-slp.c (vect_analyze_slp_instance): Cancel permuted SLP
>> instances that can be handled via vect_load_lanes.
>>
>> gcc/testsuite/ChangeLog:
>>
>> * lib/target-supports.exp (check_effective_target_vect_load_lanes): New.
>> * gcc.dg/vect/slp-perm-1.c: Look for vect_load_lanes instead of SLP
>> on platforms supporting it.
>> * gcc.dg/vect/slp-perm-2.c: Likewise.
>> * gcc.dg/vect/slp-perm-3.c: Likewise.
>> * gcc.dg/vect/slp-perm-5.c: Likewise.
>> * gcc.dg/vect/slp-perm-7.c: Likewise.
>> * gcc.dg/vect/slp-perm-8.c: Likewise.
>> * gcc.dg/vect/slp-perm-6.c: Look for vect_load_lanes in addition to SLP
>> on platforms supporting it.
>> ---
>> gcc/testsuite/gcc.dg/vect/slp-perm-1.c | 6 +++++-
>> gcc/testsuite/gcc.dg/vect/slp-perm-2.c | 7 +++++--
>> gcc/testsuite/gcc.dg/vect/slp-perm-3.c | 7 +++++--
>> gcc/testsuite/gcc.dg/vect/slp-perm-5.c | 7 +++++--
>> gcc/testsuite/gcc.dg/vect/slp-perm-6.c | 7 +++++--
>> gcc/testsuite/gcc.dg/vect/slp-perm-7.c | 8 +++++---
>> gcc/testsuite/gcc.dg/vect/slp-perm-8.c | 7 +++++--
>> gcc/testsuite/lib/target-supports.exp | 19 +++++++++++++++++++
>> gcc/tree-vect-slp.c | 30 ++++++++++++++++++++++++++++++
>> 9 files changed, 84 insertions(+), 14 deletions(-)
>>
>> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-1.c b/gcc/testsuite/gcc.dg/vect/slp-perm-1.c
>> index 2b6c134..6d0d66f 100644
>> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-1.c
>> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-1.c
>> @@ -58,5 +58,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 } } } */
>> +/* { 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" 0 "vect" { target vect_load_lanes } } } */
>> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
>>
>> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-2.c b/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
>> index da50e16..34b413d 100644
>> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
>> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
>> @@ -54,5 +54,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 } } } */
>> -
>> +/* { 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" 0 "vect" { target vect_load_lanes } } } */
>> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
>> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-3.c b/gcc/testsuite/gcc.dg/vect/slp-perm-3.c
>> index 1d33f9b..ec13e0f 100644
>> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-3.c
>> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-3.c
>> @@ -67,6 +67,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 } } } */
>> -
>> +/* { 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" 0 "vect" { target vect_load_lanes } } } */
>> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
>>
>> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-5.c b/gcc/testsuite/gcc.dg/vect/slp-perm-5.c
>> index 9ed4d724..f44f44f 100644
>> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-5.c
>> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-5.c
>> @@ -73,6 +73,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 } } } */
>> -
>> +/* { 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" 0 "vect" { target vect_load_lanes } } } */
>> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
>>
>> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-6.c b/gcc/testsuite/gcc.dg/vect/slp-perm-6.c
>> index 392d36f..551734a 100644
>> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-6.c
>> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-6.c
>> @@ -72,5 +72,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 } } } */
>> -
>> +/* { 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" 1 "vect" { target vect_load_lanes } } } */
>> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
>> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-7.c b/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
>> index 4352334..8b66142 100644
>> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
>> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
>> @@ -71,6 +71,8 @@ int main (int argc, const char* argv[])
>> }
>>
>> /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_perm } } } */
>> -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 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" 0 "vect" { target vect_load_lanes } } } */
>> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 } } } */
>> diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-8.c b/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
>> index 3bdd150..b1e9a10 100644
>> --- a/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
>> +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
>> @@ -54,5 +54,8 @@ int main (int argc, const char* argv[])
>>
>> /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target { vect_perm_byte && vect_char_mult } } } } */
>> /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm_byte && {! vect_char_mult } } } } } */
>> -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 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" 0 "vect" { target vect_load_lanes } } } */
>> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm_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 } } } */
>> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
>> index 4e349e9..0e6d2b6 100644
>> --- a/gcc/testsuite/lib/target-supports.exp
>> +++ b/gcc/testsuite/lib/target-supports.exp
>> @@ -4823,6 +4823,25 @@ proc check_effective_target_vect_element_align { } {
>> return $et_vect_element_align
>> }
>>
>> +# Return 1 if the target supports vector LOAD_LANES operations, 0 otherwise.
>> +
>> +proc check_effective_target_vect_load_lanes { } {
>> + global et_vect_load_lanes
>> +
>> + if [info exists et_vect_load_lanes] {
>> + verbose "check_effective_target_vect_load_lanes: using cached result" 2
>> + } else {
>> + set et_vect_load_lanes 0
>> + if { ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok])
>> + || [istarget aarch64*-*-*] } {
>> + set et_vect_load_lanes 1
>> + }
>> + }
>> +
>> + verbose "check_effective_target_vect_load_lanes: returning $et_vect_load_lanes" 2
>> + return $et_vect_load_lanes
>> +}
>> +
>> # Return 1 if the target supports vector conditional operations, 0 otherwise.
>>
>> proc check_effective_target_vect_condition { } {
>> diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
>> index b893682..b53767f 100644
>> --- a/gcc/tree-vect-slp.c
>> +++ b/gcc/tree-vect-slp.c
>> @@ -1793,6 +1793,36 @@ vect_analyze_slp_instance (vec_info *vinfo,
>> }
>> }
>>
>> + /* If the loads and stores can be handled with load/store-lane
>> + instructions do not generate this SLP instance. */
>> + if (is_a <loop_vec_info> (vinfo)
>> + && loads_permuted
>> + && dr && vect_store_lanes_supported (vectype, group_size))
>> + {
>> + slp_tree load_node;
>> + FOR_EACH_VEC_ELT (loads, i, load_node)
>> + {
>> + gimple *first_stmt = GROUP_FIRST_ELEMENT
>> + (vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (load_node)[0]));
>> + stmt_vec_info stmt_vinfo = vinfo_for_stmt (first_stmt);
>> + /* Use SLP for strided accesses (or if we can't load-lanes). */
>> + if (STMT_VINFO_STRIDED_P (stmt_vinfo)
>> + || ! vect_load_lanes_supported
>> + (STMT_VINFO_VECTYPE (stmt_vinfo),
>> + GROUP_SIZE (stmt_vinfo)))
>> + break;
>> + }
>> + if (i == loads.length ())
>> + {
>> + if (dump_enabled_p ())
>> + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
>> + "Built SLP cancelled: can use "
>> + "load/store-lanes\n");
>> + vect_free_slp_instance (new_instance);
>> + return false;
>> + }
>> + }
>> +
>> vinfo->slp_instances.safe_push (new_instance);
>>
>> if (dump_enabled_p ())
>>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix PR68707
2016-01-08 11:30 ` [PATCH] Fix PR68707 Alan Lawrence
2016-01-08 11:45 ` Richard Biener
@ 2016-01-10 12:15 ` Thomas Schwinge
2016-01-11 13:08 ` Christophe Lyon
1 sibling, 1 reply; 9+ messages in thread
From: Thomas Schwinge @ 2016-01-10 12:15 UTC (permalink / raw)
To: Alan Lawrence, gcc-patches
Cc: rguenther, richard.earnshaw, marcus.shawcroft, ramana.radhakrishnan
[-- Attachment #1: Type: text/plain, Size: 10040 bytes --]
Hi!
On Fri, 8 Jan 2016 11:30:16 +0000, Alan Lawrence <alan.lawrence@arm.com> wrote:
> Here's an alternative patch, [...]
> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && vect_load_lanes } } } } */
For all these, you're missing to provide the "suffix" in the
'scan-tree-dump "note: [...]' directives, which results in:
UNRESOLVED: gcc.dg/vect/slp-perm-1.c -flto -ffat-lto-objects scan-tree-dump target { vect_perm && vect_load_lanes } "note: Built SLP cancelled: can use load/store-lanes"
The target selector doesn't trigger in my x86_64 GNU/Linux testing, but
to get rid of the UNRESOLVEDs, in r232197 I fixed at least the syntax as
follows:
commit 880ed4be84bfc9cec83d7c9718fd4f87a9ca8f39
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun Jan 10 12:12:38 2016 +0000
Fix scan-tree-dump syntax
gcc/testsuite/
* gcc.dg/vect/slp-perm-1.c: Fix scan-tree-dump syntax.
* gcc.dg/vect/slp-perm-2.c: Likewise.
* gcc.dg/vect/slp-perm-3.c: Likewise.
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232197 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/testsuite/ChangeLog | 10 ++++++++++
gcc/testsuite/gcc.dg/vect/slp-perm-1.c | 2 +-
gcc/testsuite/gcc.dg/vect/slp-perm-2.c | 2 +-
gcc/testsuite/gcc.dg/vect/slp-perm-3.c | 2 +-
gcc/testsuite/gcc.dg/vect/slp-perm-5.c | 2 +-
gcc/testsuite/gcc.dg/vect/slp-perm-6.c | 2 +-
gcc/testsuite/gcc.dg/vect/slp-perm-7.c | 2 +-
gcc/testsuite/gcc.dg/vect/slp-perm-8.c | 2 +-
8 files changed, 17 insertions(+), 7 deletions(-)
diff --git gcc/testsuite/ChangeLog gcc/testsuite/ChangeLog
index 198f26c..3005c9f 100644
--- gcc/testsuite/ChangeLog
+++ gcc/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2016-01-10 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gcc.dg/vect/slp-perm-1.c: Fix scan-tree-dump syntax.
+ * gcc.dg/vect/slp-perm-2.c: Likewise.
+ * gcc.dg/vect/slp-perm-3.c: Likewise.
+ * 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.
+
2016-01-10 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/69039
diff --git gcc/testsuite/gcc.dg/vect/slp-perm-1.c gcc/testsuite/gcc.dg/vect/slp-perm-1.c
index 6d0d66f..ee211f2 100644
--- gcc/testsuite/gcc.dg/vect/slp-perm-1.c
+++ gcc/testsuite/gcc.dg/vect/slp-perm-1.c
@@ -60,7 +60,7 @@ 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" 0 "vect" { target vect_load_lanes } } } */
-/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
/* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
diff --git gcc/testsuite/gcc.dg/vect/slp-perm-2.c gcc/testsuite/gcc.dg/vect/slp-perm-2.c
index 34b413d..4bab348 100644
--- gcc/testsuite/gcc.dg/vect/slp-perm-2.c
+++ gcc/testsuite/gcc.dg/vect/slp-perm-2.c
@@ -56,6 +56,6 @@ 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" 0 "vect" { target vect_load_lanes } } } */
-/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
/* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
diff --git gcc/testsuite/gcc.dg/vect/slp-perm-3.c gcc/testsuite/gcc.dg/vect/slp-perm-3.c
index ec13e0f..568e400 100644
--- gcc/testsuite/gcc.dg/vect/slp-perm-3.c
+++ gcc/testsuite/gcc.dg/vect/slp-perm-3.c
@@ -69,7 +69,7 @@ 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" 0 "vect" { target vect_load_lanes } } } */
-/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
/* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
diff --git gcc/testsuite/gcc.dg/vect/slp-perm-5.c gcc/testsuite/gcc.dg/vect/slp-perm-5.c
index f44f44f..806603f 100644
--- gcc/testsuite/gcc.dg/vect/slp-perm-5.c
+++ gcc/testsuite/gcc.dg/vect/slp-perm-5.c
@@ -75,7 +75,7 @@ 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" 0 "vect" { target vect_load_lanes } } } */
-/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
/* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
diff --git gcc/testsuite/gcc.dg/vect/slp-perm-6.c gcc/testsuite/gcc.dg/vect/slp-perm-6.c
index 551734a..0fb4a6b 100644
--- gcc/testsuite/gcc.dg/vect/slp-perm-6.c
+++ gcc/testsuite/gcc.dg/vect/slp-perm-6.c
@@ -74,6 +74,6 @@ 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" 1 "vect" { target vect_load_lanes } } } */
-/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
/* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
diff --git gcc/testsuite/gcc.dg/vect/slp-perm-7.c gcc/testsuite/gcc.dg/vect/slp-perm-7.c
index 8b66142..a2881f9 100644
--- gcc/testsuite/gcc.dg/vect/slp-perm-7.c
+++ gcc/testsuite/gcc.dg/vect/slp-perm-7.c
@@ -73,6 +73,6 @@ int main (int argc, const char* argv[])
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "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" 0 "vect" { target vect_load_lanes } } } */
-/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
/* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
diff --git gcc/testsuite/gcc.dg/vect/slp-perm-8.c gcc/testsuite/gcc.dg/vect/slp-perm-8.c
index b1e9a10..d5fa1e8 100644
--- gcc/testsuite/gcc.dg/vect/slp-perm-8.c
+++ gcc/testsuite/gcc.dg/vect/slp-perm-8.c
@@ -56,6 +56,6 @@ int main (int argc, const char* argv[])
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm_byte && {! vect_char_mult } } } } } */
/* { 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" 0 "vect" { target vect_load_lanes } } } */
-/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm_byte && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
/* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
Grüße
Thomas
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Fix PR68707
2016-01-10 12:15 ` Thomas Schwinge
@ 2016-01-11 13:08 ` Christophe Lyon
0 siblings, 0 replies; 9+ messages in thread
From: Christophe Lyon @ 2016-01-11 13:08 UTC (permalink / raw)
To: Thomas Schwinge
Cc: Alan Lawrence, gcc-patches, Richard Biener, Richard Earnshaw,
Marcus Shawcroft, Ramana Radhakrishnan
On 10 January 2016 at 13:15, Thomas Schwinge <thomas@codesourcery.com> wrote:
> Hi!
>
> On Fri, 8 Jan 2016 11:30:16 +0000, Alan Lawrence <alan.lawrence@arm.com> wrote:
>> Here's an alternative patch, [...]
>
>> +/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && vect_load_lanes } } } } */
>
> For all these, you're missing to provide the "suffix" in the
> 'scan-tree-dump "note: [...]' directives, which results in:
>
> UNRESOLVED: gcc.dg/vect/slp-perm-1.c -flto -ffat-lto-objects scan-tree-dump target { vect_perm && vect_load_lanes } "note: Built SLP cancelled: can use load/store-lanes"
>
> The target selector doesn't trigger in my x86_64 GNU/Linux testing, but
> to get rid of the UNRESOLVEDs, in r232197 I fixed at least the syntax as
> follows:
>
Not sure if I need to mention that these updated tests fail on armeb;
I guess that falls into the known problems with vectorization on
armeb.
Christophe.
> commit 880ed4be84bfc9cec83d7c9718fd4f87a9ca8f39
> Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date: Sun Jan 10 12:12:38 2016 +0000
>
> Fix scan-tree-dump syntax
>
> gcc/testsuite/
> * gcc.dg/vect/slp-perm-1.c: Fix scan-tree-dump syntax.
> * gcc.dg/vect/slp-perm-2.c: Likewise.
> * gcc.dg/vect/slp-perm-3.c: Likewise.
> * 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.
>
> git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232197 138bc75d-0d04-0410-961f-82ee72b054a4
> ---
> gcc/testsuite/ChangeLog | 10 ++++++++++
> gcc/testsuite/gcc.dg/vect/slp-perm-1.c | 2 +-
> gcc/testsuite/gcc.dg/vect/slp-perm-2.c | 2 +-
> gcc/testsuite/gcc.dg/vect/slp-perm-3.c | 2 +-
> gcc/testsuite/gcc.dg/vect/slp-perm-5.c | 2 +-
> gcc/testsuite/gcc.dg/vect/slp-perm-6.c | 2 +-
> gcc/testsuite/gcc.dg/vect/slp-perm-7.c | 2 +-
> gcc/testsuite/gcc.dg/vect/slp-perm-8.c | 2 +-
> 8 files changed, 17 insertions(+), 7 deletions(-)
>
> diff --git gcc/testsuite/ChangeLog gcc/testsuite/ChangeLog
> index 198f26c..3005c9f 100644
> --- gcc/testsuite/ChangeLog
> +++ gcc/testsuite/ChangeLog
> @@ -1,3 +1,13 @@
> +2016-01-10 Thomas Schwinge <thomas@codesourcery.com>
> +
> + * gcc.dg/vect/slp-perm-1.c: Fix scan-tree-dump syntax.
> + * gcc.dg/vect/slp-perm-2.c: Likewise.
> + * gcc.dg/vect/slp-perm-3.c: Likewise.
> + * 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.
> +
> 2016-01-10 Tom de Vries <tom@codesourcery.com>
>
> PR tree-optimization/69039
> diff --git gcc/testsuite/gcc.dg/vect/slp-perm-1.c gcc/testsuite/gcc.dg/vect/slp-perm-1.c
> index 6d0d66f..ee211f2 100644
> --- gcc/testsuite/gcc.dg/vect/slp-perm-1.c
> +++ gcc/testsuite/gcc.dg/vect/slp-perm-1.c
> @@ -60,7 +60,7 @@ 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" 0 "vect" { target vect_load_lanes } } } */
> -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
> /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
>
> diff --git gcc/testsuite/gcc.dg/vect/slp-perm-2.c gcc/testsuite/gcc.dg/vect/slp-perm-2.c
> index 34b413d..4bab348 100644
> --- gcc/testsuite/gcc.dg/vect/slp-perm-2.c
> +++ gcc/testsuite/gcc.dg/vect/slp-perm-2.c
> @@ -56,6 +56,6 @@ 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" 0 "vect" { target vect_load_lanes } } } */
> -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
> /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
> diff --git gcc/testsuite/gcc.dg/vect/slp-perm-3.c gcc/testsuite/gcc.dg/vect/slp-perm-3.c
> index ec13e0f..568e400 100644
> --- gcc/testsuite/gcc.dg/vect/slp-perm-3.c
> +++ gcc/testsuite/gcc.dg/vect/slp-perm-3.c
> @@ -69,7 +69,7 @@ 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" 0 "vect" { target vect_load_lanes } } } */
> -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
> /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
>
> diff --git gcc/testsuite/gcc.dg/vect/slp-perm-5.c gcc/testsuite/gcc.dg/vect/slp-perm-5.c
> index f44f44f..806603f 100644
> --- gcc/testsuite/gcc.dg/vect/slp-perm-5.c
> +++ gcc/testsuite/gcc.dg/vect/slp-perm-5.c
> @@ -75,7 +75,7 @@ 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" 0 "vect" { target vect_load_lanes } } } */
> -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
> /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
>
> diff --git gcc/testsuite/gcc.dg/vect/slp-perm-6.c gcc/testsuite/gcc.dg/vect/slp-perm-6.c
> index 551734a..0fb4a6b 100644
> --- gcc/testsuite/gcc.dg/vect/slp-perm-6.c
> +++ gcc/testsuite/gcc.dg/vect/slp-perm-6.c
> @@ -74,6 +74,6 @@ 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" 1 "vect" { target vect_load_lanes } } } */
> -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
> /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
> diff --git gcc/testsuite/gcc.dg/vect/slp-perm-7.c gcc/testsuite/gcc.dg/vect/slp-perm-7.c
> index 8b66142..a2881f9 100644
> --- gcc/testsuite/gcc.dg/vect/slp-perm-7.c
> +++ gcc/testsuite/gcc.dg/vect/slp-perm-7.c
> @@ -73,6 +73,6 @@ int main (int argc, const char* argv[])
> /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "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" 0 "vect" { target vect_load_lanes } } } */
> -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
> /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
> diff --git gcc/testsuite/gcc.dg/vect/slp-perm-8.c gcc/testsuite/gcc.dg/vect/slp-perm-8.c
> index b1e9a10..d5fa1e8 100644
> --- gcc/testsuite/gcc.dg/vect/slp-perm-8.c
> +++ gcc/testsuite/gcc.dg/vect/slp-perm-8.c
> @@ -56,6 +56,6 @@ int main (int argc, const char* argv[])
> /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm_byte && {! vect_char_mult } } } } } */
> /* { 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" 0 "vect" { target vect_load_lanes } } } */
> -/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" { target { vect_perm_byte && 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 "LOAD_LANES" "vect" { target vect_load_lanes } } } */
> /* { dg-final { scan-tree-dump "STORE_LANES" "vect" { target vect_load_lanes } } } */
>
>
> Grüße
> Thomas
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-01-11 13:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-16 15:01 [PATCH] Fix PR68707, 67323 Richard Biener
2015-12-17 10:38 ` Alan Lawrence
2015-12-17 10:47 ` Richard Biener
2015-12-17 15:07 ` Alan Lawrence
2016-01-08 11:30 ` [PATCH] Fix PR68707 Alan Lawrence
2016-01-08 11:45 ` Richard Biener
2016-01-08 17:15 ` Richard Earnshaw (lists)
2016-01-10 12:15 ` Thomas Schwinge
2016-01-11 13:08 ` Christophe Lyon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).