This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFBT] Fix PR middle-end/37263, extra code for doloop with unsigned 32bit types on LP64
- From: Bernd Schmidt <bernds_cb1 at t-online dot de>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 16 Sep 2008 13:05:53 +0200
- Subject: Re: [RFBT] Fix PR middle-end/37263, extra code for doloop with unsigned 32bit types on LP64
- References: <de8d50360809151433k7d02007by61df8d2ec82c686f@mail.gmail.com>
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