http://llvm.org/bugs/show_bug.cgi?id=17683
Bug ID: 17683
Summary: Optimize division of positive signed integer by power
of 2 to a simple shift
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
It would be nice if LLVM could optimize the division of a signed integer by a
power of two to a simple shift if the integer can not be negative.
For example, GCC optimizes the division in the following sample to a simple
right shift (without fixup), while LLVM does not:
int divBy4(int x) {
if (x < 0) abort();
return x/4;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs