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

            Bug ID: 44795
           Summary: Use vpshuflb instead of vpshuflw/vpshufhw (AMD Zen)
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

Orignally reported here:
https://www.realworldtech.com/forum/?threadid=176424&curpostid=176424&fbclid=IwAR0P-wuQYtb7X9C8K8cr-axqP4Gwh1ZRSz-yU69bm5-NTZHdud-Nvp5ypec

"In above example clang compiler replaced each of 4 vpshuflb instructions,
specified in the source code, by pair of instruction vpshuflw/vpshufhw. Since
the execution time is bottlenecked by 'Port 5' execution bandwidth, the
smart-assness of compiler leads to approximate doubling of execution time.

This particular Haswell/Broadwell/Skylake code generation bug is fixed in
clang6 (clang6 code looks horrible for other reason), but virtually identical
AMD Zen code generation bug is not fixed.

I have no Zen to measure, but according to Agner Fog's instruction tables 'Pipe
12 bottleneck' has approximately the same effect as 'Port 5 bottleneck' on
Intel parts."

https://godbolt.org/g/ZjjCmY

-- 
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