[llvm-bugs] [Bug 37747] New: Missed optimization opportunity: replacing logical or with bitwise.
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jun 8 03:12:51 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37747
Bug ID: 37747
Summary: Missed optimization opportunity: replacing logical or
with bitwise.
Product: clang
Version: 6.0
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: denis.yaroshevskij at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
std::accumulate(,,,std::bit_or{}) is much faster than
std::accumulate(,,,std::logical_or{}) even though they have the same semantics.
Since there is no branching on the result of the or in accumulate, the compiler
could substitute logical for the bit one.
QuickBench: http://quick-bench.com/OhizrjUK_8KaF3qa4Bv4LzjEXy8
--
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/20180608/5c1e981e/attachment.html>
More information about the llvm-bugs
mailing list