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: unassignedb...@nondot.org
Reporter: lebedev...@gmail.com
CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs