[llvm-bugs] [Bug 44359] New: Slow 'for' loop unrolling

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Dec 21 02:55:22 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=44359

            Bug ID: 44359
           Summary: Slow 'for' loop unrolling
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hehaochen13 at nudt.edu.cn
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Created attachment 22959
  --> https://bugs.llvm.org/attachment.cgi?id=22959&action=edit
Adobe_C++Benchmarks

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

╔══════════════════════════════════════╦═════╦═════╦═════╦══════════╗
║ Total absolute execution time (sec.) ║ O1  ║ O2  ║ O3  ║ comments ║
╠════════════════════════════╦═════════╬═════╬═════╬═════╬══════════╣
║                            ║ gcc-8   ║ 259 ║ 167 ║ 149 ║ ok       ║
║                            ╠═════════╬═════╬═════╬═════╬══════════╣
║                            ║ clang-6 ║ 326 ║ 206 ║ 181 ║ ok?      ║
║                            ╠═════════╬═════╬═════╬═════╬══════════╣
║       int32_t 'for'        ║ clang-7 ║ 249 ║ 171 ║ 182 ║ SLOW     ║
║       loop unrolling       ╠═════════╬═════╬═════╬═════╬══════════╣
║                            ║ clang-8 ║ 247 ║ 170 ║ 183 ║ SLOW     ║
║                            ╠═════════╬═════╬═════╬═════╬══════════╣
║                            ║ clang-9 ║ 248 ║ 170 ║ 183 ║ SLOW     ║
╚════════════════════════════╩═════════╩═════╩═════╩═════╩══════════╝

╔══════════════════════════════════════╦═════╦═════╦═════╦══════════╗
║ Total absolute execution time (sec.) ║ O1  ║ O2  ║ O3  ║ comments ║
╠═══════════════════════╦══════════════╬═════╬═════╬═════╬══════════╣
║                       ║ clang-6      ║ 347 ║ 206 ║ 181 ║ ok       ║
║                       ╠══════════════╬═════╬═════╬═════╬══════════╣
║   int32_t 'while'     ║ clang-7      ║ 248 ║ 167 ║ 164 ║ ok       ║
║   loop unrolling      ╠══════════════╬═════╬═════╬═════╬══════════╣
║                       ║ clang-8      ║ 249 ║ 167 ║ 165 ║ ok       ║
║                       ╠══════════════╬═════╬═════╬═════╬══════════╣
║                       ║ clang-9      ║ 248 ║ 167 ║ 165 ║ ok       ║
╚═══════════════════════╩══════════════╩═════╩═════╩═════╩══════════╝

The this performance issue do not occur in 'while' loop unrolling test or gcc
either.

Thank you.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191221/93c09c92/attachment.html>


More information about the llvm-bugs mailing list