public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4338] Adjust testcase for O2 vectorization enabling
@ 2021-10-12 7:24 hongtao Liu
0 siblings, 0 replies; only message in thread
From: hongtao Liu @ 2021-10-12 7:24 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d61ce6ab04ee98f1f64b54436bca96054cc62329
commit r12-4338-gd61ce6ab04ee98f1f64b54436bca96054cc62329
Author: liuhongt <hongtao.liu@intel.com>
Date: Mon Oct 11 10:05:03 2021 +0800
Adjust testcase for O2 vectorization enabling
This issue was observed in rs6000 specific PR102658 as well.
I've looked into it a bit, it's caused by the "conditional store replacement" which
is originally disabled without vectorization as below code.
/* If either vectorization or if-conversion is disabled then do
not sink any stores. */
if (param_max_stores_to_sink == 0
|| (!flag_tree_loop_vectorize && !flag_tree_slp_vectorize)
|| !flag_tree_loop_if_convert)
return false;
The new change makes the innermost loop look like
for (int c1 = 0; c1 <= 1499; c1 += 1) {
if (c1 <= 500) {
S_10(c0, c1);
} else {
S_9(c0, c1);
}
S_11(c0, c1);
}
and can not be splitted as:
for (int c1 = 0; c1 <= 500; c1 += 1)
S_10(c0, c1);
for (int c1 = 501; c1 <= 1499; c1 += 1)
S_9(c0, c1);
So instead of disabling vectorization, could we just disable this cs replacement
with parameter "--param max-stores-to-sink=0"?
I tested this proposal on ppc64le, it should work as well.
2021-10-11 Kewen Lin <linkw@linux.ibm.com>
libgomp/ChangeLog:
* testsuite/libgomp.graphite/force-parallel-8.c: Add --param max-stores-to-sink=0.
Diff:
---
libgomp/testsuite/libgomp.graphite/force-parallel-8.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libgomp/testsuite/libgomp.graphite/force-parallel-8.c b/libgomp/testsuite/libgomp.graphite/force-parallel-8.c
index f9e07039172..6868dd29147 100644
--- a/libgomp/testsuite/libgomp.graphite/force-parallel-8.c
+++ b/libgomp/testsuite/libgomp.graphite/force-parallel-8.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-fdisable-tree-thread1 -fdisable-tree-vrp-thread1" } */
+/* { dg-additional-options "-fdisable-tree-thread1 -fdisable-tree-vrp-thread1 --param max-stores-to-sink=0" } */
#define N 1500
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-12 7:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 7:24 [gcc r12-4338] Adjust testcase for O2 vectorization enabling hongtao Liu
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).