[Bug tree-optimization/64322] More optimize opportunity for constant folding

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Wed Dec 17 14:25:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64322

--- Comment #8 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 17 Dec 2014, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64322
> 
> --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, is 
> this fix acceptable to the reporter?  The explanation in the combiner is 
> that in the first testcase you have multiple uses of the load of 
> 0x100000000L constant and therefore it is not attempted to be combined 
> with the second use (division), changing that is undesirable I think, 
> combine is already expensive as is.

True, though eventually changing this just for constants (thus
(const ...) and CONST_INT and ...) might be worth the additional
overhead.  I can imagine targets that don't support (large)
immediates being pessimized very much otherwise.



More information about the Gcc-bugs mailing list