diff options
author | Jan Hubicka <jh@suse.cz> | 2023-08-01 12:07:39 +0200 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2023-08-01 12:07:39 +0200 |
commit | 1762957384c659a2e6827939ce4b1f1d1ad40003 (patch) | |
tree | 2afc4e4de9d6f32774b9433381e7f6485f495697 /gcc/tree-vect-loop-manip.cc | |
parent | 63663e4e69527b308687c63bacb0cc038b386593 (diff) | |
download | gcc-1762957384c659a2e6827939ce4b1f1d1ad40003.zip gcc-1762957384c659a2e6827939ce4b1f1d1ad40003.tar.gz gcc-1762957384c659a2e6827939ce4b1f1d1ad40003.tar.bz2 |
Fix profile update after prologue peeling in vectorizer
This patch fixes update after constant peeling in profilogue. We now reached 0 profile
update bugs on tramp3d vectorizaiton and also on quite few testcases, so I am enabling the
testuiste checks so we do not regress again.
gcc/ChangeLog:
* tree-vect-loop-manip.cc (vect_do_peeling): Fix profile update after
constant prologue peeling.
gcc/testsuite/ChangeLog:
* gcc.dg/vect/vect-1-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-1.c: Check profile consistency.
* gcc.dg/vect/vect-10-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-10.c: Check profile consistency.
* gcc.dg/vect/vect-100.c: Check profile consistency.
* gcc.dg/vect/vect-103.c: Check profile consistency.
* gcc.dg/vect/vect-104.c: Check profile consistency.
* gcc.dg/vect/vect-105-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-105.c: Check profile consistency.
* gcc.dg/vect/vect-106.c: Check profile consistency.
* gcc.dg/vect/vect-107.c: Check profile consistency.
* gcc.dg/vect/vect-108.c: Check profile consistency.
* gcc.dg/vect/vect-109.c: Check profile consistency.
* gcc.dg/vect/vect-11.c: Check profile consistency.
* gcc.dg/vect/vect-110.c: Check profile consistency.
* gcc.dg/vect/vect-112-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-112.c: Check profile consistency.
* gcc.dg/vect/vect-113.c: Check profile consistency.
* gcc.dg/vect/vect-114.c: Check profile consistency.
* gcc.dg/vect/vect-115.c: Check profile consistency.
* gcc.dg/vect/vect-116.c: Check profile consistency.
* gcc.dg/vect/vect-117.c: Check profile consistency.
* gcc.dg/vect/vect-118.c: Check profile consistency.
* gcc.dg/vect/vect-119.c: Check profile consistency.
* gcc.dg/vect/vect-11a.c: Check profile consistency.
* gcc.dg/vect/vect-12.c: Check profile consistency.
* gcc.dg/vect/vect-120.c: Check profile consistency.
* gcc.dg/vect/vect-121.c: Check profile consistency.
* gcc.dg/vect/vect-122.c: Check profile consistency.
* gcc.dg/vect/vect-123.c: Check profile consistency.
* gcc.dg/vect/vect-124.c: Check profile consistency.
* gcc.dg/vect/vect-126.c: Check profile consistency.
* gcc.dg/vect/vect-13.c: Check profile consistency.
* gcc.dg/vect/vect-14.c: Check profile consistency.
* gcc.dg/vect/vect-15-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-15.c: Check profile consistency.
* gcc.dg/vect/vect-17.c: Check profile consistency.
* gcc.dg/vect/vect-18.c: Check profile consistency.
* gcc.dg/vect/vect-19.c: Check profile consistency.
* gcc.dg/vect/vect-2-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-2.c: Check profile consistency.
* gcc.dg/vect/vect-20.c: Check profile consistency.
* gcc.dg/vect/vect-21.c: Check profile consistency.
* gcc.dg/vect/vect-22.c: Check profile consistency.
* gcc.dg/vect/vect-23.c: Check profile consistency.
* gcc.dg/vect/vect-24.c: Check profile consistency.
* gcc.dg/vect/vect-25.c: Check profile consistency.
* gcc.dg/vect/vect-26.c: Check profile consistency.
* gcc.dg/vect/vect-27.c: Check profile consistency.
* gcc.dg/vect/vect-28.c: Check profile consistency.
* gcc.dg/vect/vect-29.c: Check profile consistency.
* gcc.dg/vect/vect-3.c: Check profile consistency.
* gcc.dg/vect/vect-30.c: Check profile consistency.
* gcc.dg/vect/vect-31-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-31.c: Check profile consistency.
* gcc.dg/vect/vect-32-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-32-chars.c: Check profile consistency.
* gcc.dg/vect/vect-32.c: Check profile consistency.
* gcc.dg/vect/vect-33-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-33.c: Check profile consistency.
* gcc.dg/vect/vect-34-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-34.c: Check profile consistency.
* gcc.dg/vect/vect-35-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-35.c: Check profile consistency.
* gcc.dg/vect/vect-36-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-36.c: Check profile consistency.
* gcc.dg/vect/vect-38.c: Check profile consistency.
* gcc.dg/vect/vect-4.c: Check profile consistency.
* gcc.dg/vect/vect-40.c: Check profile consistency.
* gcc.dg/vect/vect-42.c: Check profile consistency.
* gcc.dg/vect/vect-44.c: Check profile consistency.
* gcc.dg/vect/vect-46.c: Check profile consistency.
* gcc.dg/vect/vect-48.c: Check profile consistency.
* gcc.dg/vect/vect-5.c: Check profile consistency.
* gcc.dg/vect/vect-50.c: Check profile consistency.
* gcc.dg/vect/vect-52.c: Check profile consistency.
* gcc.dg/vect/vect-54.c: Check profile consistency.
* gcc.dg/vect/vect-56.c: Check profile consistency.
* gcc.dg/vect/vect-58.c: Check profile consistency.
* gcc.dg/vect/vect-6-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-6.c: Check profile consistency.
* gcc.dg/vect/vect-60.c: Check profile consistency.
* gcc.dg/vect/vect-62.c: Check profile consistency.
* gcc.dg/vect/vect-63.c: Check profile consistency.
* gcc.dg/vect/vect-64.c: Check profile consistency.
* gcc.dg/vect/vect-65.c: Check profile consistency.
* gcc.dg/vect/vect-66.c: Check profile consistency.
* gcc.dg/vect/vect-67.c: Check profile consistency.
* gcc.dg/vect/vect-68.c: Check profile consistency.
* gcc.dg/vect/vect-7.c: Check profile consistency.
* gcc.dg/vect/vect-70.c: Check profile consistency.
* gcc.dg/vect/vect-71.c: Check profile consistency.
* gcc.dg/vect/vect-72.c: Check profile consistency.
* gcc.dg/vect/vect-73-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-73.c: Check profile consistency.
* gcc.dg/vect/vect-74-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-74.c: Check profile consistency.
* gcc.dg/vect/vect-75-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-75.c: Check profile consistency.
* gcc.dg/vect/vect-76-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-76.c: Check profile consistency.
* gcc.dg/vect/vect-77-alignchecks.c: Check profile consistency.
* gcc.dg/vect/vect-77-global.c: Check profile consistency.
* gcc.dg/vect/vect-77.c: Check profile consistency.
* gcc.dg/vect/vect-78-alignchecks.c: Check profile consistency.
* gcc.dg/vect/vect-78-global.c: Check profile consistency.
* gcc.dg/vect/vect-78.c: Check profile consistency.
* gcc.dg/vect/vect-8.c: Check profile consistency.
* gcc.dg/vect/vect-80-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-80.c: Check profile consistency.
* gcc.dg/vect/vect-82.c: Check profile consistency.
* gcc.dg/vect/vect-82_64.c: Check profile consistency.
* gcc.dg/vect/vect-83.c: Check profile consistency.
* gcc.dg/vect/vect-83_64.c: Check profile consistency.
* gcc.dg/vect/vect-85-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-85.c: Check profile consistency.
* gcc.dg/vect/vect-86.c: Check profile consistency.
* gcc.dg/vect/vect-87.c: Check profile consistency.
* gcc.dg/vect/vect-88.c: Check profile consistency.
* gcc.dg/vect/vect-89-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-89.c: Check profile consistency.
* gcc.dg/vect/vect-9.c: Check profile consistency.
* gcc.dg/vect/vect-91.c: Check profile consistency.
* gcc.dg/vect/vect-92.c: Check profile consistency.
* gcc.dg/vect/vect-93.c: Check profile consistency.
* gcc.dg/vect/vect-95.c: Check profile consistency.
* gcc.dg/vect/vect-96.c: Check profile consistency.
* gcc.dg/vect/vect-97-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-97.c: Check profile consistency.
* gcc.dg/vect/vect-98-big-array.c: Check profile consistency.
* gcc.dg/vect/vect-98.c: Check profile consistency.
* gcc.dg/vect/vect-99.c: Check profile consistency.
Diffstat (limited to 'gcc/tree-vect-loop-manip.cc')
-rw-r--r-- | gcc/tree-vect-loop-manip.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index e53a99e..9de897d 100644 --- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -3121,8 +3121,13 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, tree niters_prolog; int bound_prolog = 0; if (prolog_peeling) - niters_prolog = vect_gen_prolog_loop_niters (loop_vinfo, anchor, - &bound_prolog); + { + niters_prolog = vect_gen_prolog_loop_niters (loop_vinfo, anchor, + &bound_prolog); + /* If algonment peeling is known, we will always execute prolog. */ + if (TREE_CODE (niters_prolog) == INTEGER_CST) + prob_prolog = profile_probability::always (); + } else niters_prolog = build_int_cst (type, 0); |