[llvm-bugs] [Bug 40027] New: [X86] cmov conversion hurts binary search performance
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Dec 14 09:45:51 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=40027
Bug ID: 40027
Summary: [X86] cmov conversion hurts binary search performance
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: nikita.ppv 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
Originally reported at: https://github.com/rust-lang/rust/issues/53823
The cmov conversion pass converts a cmov in Rust's binary search implementation
into a branch. As binary search branches are badly predicted, this
significantly hurts performance. For small data sets, which are not dominated
by cache performance, the slowdown is around 2-3x.
https://gist.github.com/nikic/13e907d7097f74a92d082fcc61bc212c has the LLVM IR
for the function, as well as generated assembly with cmov conversion enabled
(default) and disabled (-x86-cmov-converter=false).
It would be great if the cmov conversion heuristics could be adjusted in some
way to avoid converting this case.
--
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/20181214/4e8d0355/attachment.html>
More information about the llvm-bugs
mailing list