On Mon, 2005-08-15 at 12:33 +0300, Denis Vlasenko wrote:
> gcc can optimize that away with non-const n?! I don't think so.
due to the wonders of "value range propagation" it actually can, if the
check is done sufficiently before...
gcc keeps track of the range a variable can have at each point, so if
the check is done before, the "possible range" will be such that the
divide should be optimizable.
(Note: this is a relatively new feature in gcc though)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|