On 10/9/20 4:12 AM, guojiufu via Gcc-patches wrote:
> Hi,
> PR68212 mentioned that the COUNT of unrolled loop was not correct, and
> comments of this PR also mentioned that loop become 'cold'.
>
> This patch fixes the wrong COUNT/PROB of unrolled loop.  And the
> patch handles the case where unrolling in unreliable count number can
> cause a loop to no longer look hot and therefor not get aligned.  This
> patch scale by profile_probability::likely () if unrolled count gets
> unrealistically small.
>
> Bootstrap/regtest on powerpc64le with no new regressions. Ok for trunk?
>
> Jiufu Guo
>
> gcc/ChangeLog:
> 2020-10-09  Jiufu Guo   <guoji...@linux.ibm.com>
>           Pat Haugen  <pthau...@us.ibm.com>
>
>       PR rtl-optimization/68212
>       * cfgloopmanip.c (duplicate_loop_to_header_edge): Reset probablity
>       of unrolled/peeled loop.
>
> testsuite/ChangeLog:
> 2020-10-09  Jiufu Guo   <guoji...@linux.ibm.com>
>           Pat Haugen  <pthau...@us.ibm.com>
>       PR rtl-optimization/68212
>       * gcc.dg/pr68212.c: New test.
OK
jeff

Reply via email to