[llvm-bugs] [Bug 44795] New: Use vpshuflb instead of vpshuflw/vpshufhw (AMD Zen)
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 5 04:12:22 PST 2020
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: unassignedbugs at nondot.org
Reporter: david.bolvansky at gmail.com
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
llvm-dev at redking.me.uk, spatel+llvm at rotateright.com
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200205/4f86ecdc/attachment.html>
More information about the llvm-bugs
mailing list