[llvm-bugs] [Bug 43578] New: h264 (SPEC) : 8% percent perf regression with -march=haswell compared to plain -O3

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 6 12:08:32 PDT 2019


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

            Bug ID: 43578
           Summary: h264 (SPEC) : 8% percent perf regression with
                    -march=haswell compared to plain -O3
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: david.bolvansky at gmail.com
                CC: llvm-bugs at lists.llvm.org

I measured a significant performance drop for SPEC benchmark h264 with
-march=haswell:

417 seconds -O3 -march=haswell
418 seconds -O3 -mprefer-vector-width=128 -march=haswell
385 seconds -O3

I didnt go very deep, I went to check known hotspot function/loop of this
benchmark. I reduced benchmark so anybody can look at this hotspot on godbolt:
https://godbolt.org/z/i8vvYN

(if we improve this reduced test case; this benchmark will improve too)

As I can see, the reason of this slowdown is aggresive vectorization; with
-march=haswell we probably destroy loop perf due to use of
vpextrd, vextracti128, vpmovzxwd (SLP vectorizer somehow decided that
vectorization is profitable; clearly not; cost model issue?). 

GCC/ICC performs no vectorization of this loop with -march=haswell.

-- 
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/20191006/b7533a41/attachment.html>


More information about the llvm-bugs mailing list