[Bug middle-end/32044] udivdi3 counterproductive, unwarranted use

manu at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed May 23 12:15:00 GMT 2007



------- 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



More information about the Gcc-bugs mailing list