Fix profile count maintenance in vectorizer peeling.
authorEugene Rozenfeld <erozen@microsoft.com>
Tue, 26 Apr 2022 21:28:16 +0000 (14:28 -0700)
committerEugene Rozenfeld <erozen@microsoft.com>
Tue, 24 May 2022 23:49:45 +0000 (16:49 -0700)
commit5af22024f62f1f596a35d3c138d41d47d5697ca0
tree2b4c4c86a218027e940fd14a37318a0b0945c8bb
parent10d1986aee47c592f903527bb68546efc557735d
Fix profile count maintenance in vectorizer peeling.

This patch changes the code to save/restore profile counts for
the epliog loop (when not using scalar loop in the epilog)
instead of scaling them down and then back up, which may lead
to problems if we scale down to 0.

Tested on x86_64-pc-linux-gnu.

gcc/ChangeLog:

* tree-vect-loop-manip.cc (vect_do_peeling): Save/restore profile
counts for the epilog loop.
gcc/tree-vect-loop-manip.cc