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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to