https://bugs.llvm.org/show_bug.cgi?id=48669
Bug ID: 48669
Summary: Failure to optimize modulo pattern made from division
optimally
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
__INT64_TYPE__ f(__INT32_TYPE__ x, __INT32_TYPE__ y)
{
return (__INT64_TYPE__)y - (y / x) * x;
}
This example (and most likely also a more generic form) can be optimized into
`return y % x;`. This transformation is done by GCC, but not by LLVM.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs