This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/32044] udivdi3 counterproductive, unwarranted use
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 May 2007 12:15:32 -0000
- Subject: [Bug middle-end/32044] udivdi3 counterproductive, unwarranted use
- References: <bug-32044-11706@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from manu at gcc dot gnu dot org 2007-05-23 13:15 -------
(In reply to comment #3)
>
> The meaning of __builtin_expect is as defined in the documentation.
> This particular transformation has nothing to do with __builtin_expect.
> The transformation happens regardless of __builtin_expect.
>
> scev_const_prop eliminates the loop by replacing
> the final value with an expression using divide.
> Probably the right approach would be to prevent this from happening
> ifthe final value expression looks expensive
> (like DImode divide on targets without native DImode divide).
>
Isn't there a way for __builtin_expect to modify this behaviour? After all, it
is telling us that the loop is cheap. And the difference in computation time is
not trivial at all.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32044