[RFBT] Fix PR middle-end/37263, extra code for doloop with unsigned 32bit types on LP64
Bernd Schmidt
bernds_cb1@t-online.de
Tue Sep 16 11:36:00 GMT 2008
Andrew Pinski wrote:
> The issue here is that in 4.1 and 4.0, IV-opts used to replace a < b
> with a != b which causes doloop not to create extra branches as it
> knows that the iterations are already correct. Since
> http://www.nabble.com/-patch--Fix-nonsensical-exit-test-replacement-td8289646.html,
> IV-opts no longer does this as it thinks it is not profitable to do
> it. Well the issue is that the cost are the same. We should prefer
> the replacement version if the cost is the same as it allows the RTL
> optimizers to do better job; though another solution would be
> propagate that information down to RTL level from the tree level but
> that is not suitable for stage 3 really
I've tried the patch in a 4.3-based Blackfin compiler, and it generates
a lot more hardware loops.
> * tree-ssa-loop-ivopts.c (determine_use_iv_cost_condition): Prefer the
> eliminate IV if the cost are the same.
Ok. Thanks!
Bernd
--
This footer brought to you by insane German lawmakers.
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif
More information about the Gcc-patches
mailing list