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: unassignedclangb...@nondot.org
Reporter: denis.yaroshevs...@gmail.com
CC: dgre...@apple.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs