Open github-actions[bot] opened 2 weeks ago
The following issues have been found with 40344-15_Check_LOOPVINFOPEELINGFORGAPS_on_epilog_is_supported-1 using gcc's ./contrib/check_GNU_style.py. Please use your best judgement when resolving these issues. These are only warnings and do not need to be resolved in order to merge your patch.
=== ERROR type #1: lines should not exceed 80 characters (1 error(s)) ===
gcc/params.opt:1178:80:Common Joined UInteger Var(param_vect_epilogues_nomask) Init(1) IntegerRange(0, 8) Param Optimization
=== ERROR type #2: there should be exactly one space between function name and parenthesis (1 error(s)) ===
gcc/params.opt:1178:26:Common Joined UInteger Var(param_vect_epilogues_nomask) Init(1) IntegerRange(0, 8) Param Optimization
Target | Status |
---|---|
Baseline hash: https://github.com/gcc-mirror/gcc/commit/8ac694ae67e24a798dce368587bed4c40b90fbc0 | Failed |
Tip of tree hash: https://github.com/gcc-mirror/gcc/commit/137b26412f681bb1f8b3eb52b8f9efd79e6bda2a | Failed |
> git am ../patches/*.patch --whitespace=fix -q --3way --empty=drop
error: sha1 information is lacking or useless (gcc/doc/invoke.texi).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Allow multiple vectorized epilogs via --param vect-epilogues-nomask=N
---
gcc/doc/invoke.texi | 3 ++-
gcc/params.opt | 2 +-
gcc/tree-vect-loop.cc | 23 +++++++++++++++++------
3 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f2555ec83a1..73e54a47381 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -16870,7 +16870,8 @@ The maximum number of insns in loop header duplicated
by the copy loop headers pass.
@item vect-epilogues-nomask
-Enable loop epilogue vectorization using smaller vector size.
+Enable loop epilogue vectorization using smaller vector size with up to N
+vector epilogue loops.
@item vect-partial-vector-usage
Controls when the loop vectorizer considers using partial vector loads
diff --git a/gcc/params.opt b/gcc/params.opt
index 4dab7a26f9b..c77472e7ad3 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -1175,7 +1175,7 @@ Common Joined UInteger Var(param_use_canonical_types) Init(1) IntegerRange(0, 1)
Whether to use canonical types.
-param=vect-epilogues-nomask=
-Common Joined UInteger Var(param_vect_epilogues_nomask) Init(1) IntegerRange(0, 1) Param Optimization
+Common Joined UInteger Var(param_vect_epilogues_nomask) Init(1) IntegerRange(0, 8) Param Optimization
Enable loop epilogue vectorization using smaller vector size.
-param=vect-max-layout-candidates=
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 41875683595..90802675a84 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -3721,6 +3721,10 @@ vect_analyze_loop (class loop *loop, gimple *loop_vectorized_call,
partial_vectors_supported_p () && param_vect_partial_vector_usage != 0;
poly_uint64 first_vinfo_vf = LOOP_VINFO_VECT_FACTOR (first_loop_vinfo);
+ loop_vec_info orig_loop_vinfo = first_loop_vinfo;
+ unsigned n = param_vect_epilogues_nomask;
+ do
+ {
while (1)
{
/* If the target does not support partial vectors we can shorten the
@@ -3744,7 +3748,7 @@ vect_analyze_loop (class loop *loop, gimple *loop_vectorized_call,
bool fatal;
opt_loop_vec_info loop_vinfo
= vect_analyze_loop_1 (loop, shared, &loop_form_info,
- first_loop_vinfo,
+ orig_loop_vinfo,
vector_modes, mode_i,
autodetected_vector_mode, fatal);
if (fatal)
@@ -3769,17 +3773,24 @@ vect_analyze_loop (class loop *loop, gimple *loop_vectorized_call,
loop_vinfo = opt_loop_vec_info::success (NULL);
}
- /* For now only allow one epilogue loop, but allow
- pick_lowest_cost_p to replace it, so commit to the
- first epilogue if we have no reason to try alternatives. */
+ /* If we do not pick an alternative based on cost we're done. */
if (!pick_lowest_cost_p)
break;
}
if (mode_i == vector_modes.length ())
- break;
-
+ {
+ mode_i = 0;
+ break;
+ }
+ }
+ if (mode_i == vector_modes.length ())
+ break;
+ orig_loop_vinfo = orig_loop_vinfo->epilogue_vinfo;
}
+ while (orig_loop_vinfo
+ && !LOOP_VINFO_USING_PARTIAL_VECTORS_P (orig_loop_vinfo)
+ && --n != 0);
if (first_loop_vinfo->epilogue_vinfo)
{
Precommit CI Run information
Logs can be found in the associated Github Actions run: https://github.com/ewlu/gcc-precommit-ci/actions/runs/11706072463
Patch information
Applied patches: 1 -> 1 Associated series: https://patchwork.sourceware.org/project/gcc/list/?series=40344 Last patch applied: https://patchwork.sourceware.org/project/gcc/patch/20241106143253.6AA833858C56@sourceware.org/ Patch id: 100403
Build Targets
multilib
, please refer to the table below to see all the targets within that multilib.-march
stringrv64gcv-lp64d
,rv32gc-ilp32d
,rv64gc-lp64d
,rv32imc_zba_zbb_zbc_zbs-ilp32
rv32gcv-ilp32d
,rv64gcv-lp64d
rv32gc_zba_zbb_zbc_zbs-ilp32d
,rv64gc_zba_zbb_zbc_zbs-lp64d
Target Information
-march
stringgc_zba_zbb_zbc_zbs
Notes
Testsuite results use a more lenient allowlist to reduce error reporting with flakey tests. Please take a look at the current allowlist. Results come from a sum file comparator. Each patch is applied to a well known, non-broken baseline taken from our gcc postcommit framework (here) which runs the full gcc testsuite every 6 hours. If you have any questions or encounter any issues which may seem like false-positives, please contact us at patchworks-ci@rivosinc.com