This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28417] suboptimal 'division by constant' optimization
- From: "vda dot linux at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jul 2006 13:35:18 -0000
- Subject: [Bug middle-end/28417] suboptimal 'division by constant' optimization
- References: <bug-28417-12956@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from vda dot linux at googlemail dot com 2006-07-30 13:35 -------
Created an attachment (id=11971)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11971&action=view)
Use alternative algorithm if it gives better results
New algorithm lives in separate function gcc_fastdiv_params() which is called
from choose_multiplier(). Then we run old algorithm. Then we compare results
and if new algorithm gives different one (new result is always better or same
than old), we use it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28417