https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93037

            Bug ID: 93037
           Summary: Slow 'while' loop unrolling
           Product: gcc
           Version: 8.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hehaochen at hotmail dot com
  Target Milestone: ---

Created attachment 47538
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47538&action=edit
Adobe_C++Benchmarks

Compile and run 'loop unroll test' in Adobe C++ benchmark
(https://stlab.adobe.com/performance/). We find slowdown in GCC-8(docker) when
adding '-O3':

╔════════════════════════════════════════╦═════╦═════╦═════╦══════════╗
║ Total absolute execution time (sec.)   ║ O1  ║ O2  ║ O3  ║ comments ║
╠═════════╦══════════════════════════════╬═════╬═════╬═════╬══════════╣
║ gcc-8   ║ int32_t for loop unrolling   ║ 259 ║ 167 ║ 149 ║ ok       ║
║         ╠══════════════════════════════╬═════╬═════╬═════╬══════════╣
║         ║ int32_t while loop unrolling ║ 257 ║ 164 ║ 204 ║ SLOW     ║
╠═════════╬══════════════════════════════╬═════╬═════╬═════╬══════════╣
║ clang-6 ║ int32_t for loop unrolling   ║ 326 ║ 206 ║ 181 ║ ok       ║
║         ╠══════════════════════════════╬═════╬═════╬═════╬══════════╣
║         ║ int32_t while loop unrolling ║ 347 ║ 206 ║ 181 ║ ok       ║
╚═════════╩══════════════════════════════╩═════╩═════╩═════╩══════════╝

The this performance issue do not occur in 'for' loop unrolling test or clang
either.

Reply via email to