[llvm-bugs] [Bug 40629] New: (manual) fixed point math: scale reduction
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 6 08:10:14 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40629
Bug ID: 40629
Summary: (manual) fixed point math: scale reduction
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: lebedev.ri at gmail.com
CC: llvm-bugs at lists.llvm.org
int yy(int x) {
return (((10 * x) / 3) + 5) / 10;
}
int yy2(int x) {
return (((2 * x) / 3) + 1) / 2;
}
yy and yy2 are equivalent: https://rise4fun.com/Alive/tF61
yy2 results in better codegen.
I don't //really// expect this to be solved,
just thought i'd report for completeness
Refs https://github.com/google/souper/issues/438 (more TLDR)
--
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/20190206/32a436e8/attachment.html>
More information about the llvm-bugs
mailing list