This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/50904] [4.7 regression] pessimization when -fno-protect-parens is enabled by -Ofast
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 05 Dec 2011 08:18:00 +0000
- Subject: [Bug rtl-optimization/50904] [4.7 regression] pessimization when -fno-protect-parens is enabled by -Ofast
- Auto-submitted: auto-generated
- References: <bug-50904-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50904
--- Comment #37 from rguenther at suse dot de <rguenther at suse dot de> 2011-12-05 08:18:00 UTC ---
On Fri, 2 Dec 2011, burnus at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50904
>
> --- Comment #34 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-02 17:06:57 UTC ---
[...]
> * * *
>
> Back to the comment 0 issue: I still do not quite understand what the double
> evaluation (on tree level) of __builtin_pow in
> D.1959_82 = ((D.2115_81));
> D.1960_83 = __builtin_pow (D.1959_82, 2.0e+0);
> D.1978_168 = __builtin_pow (D.2115_81, 2.0e+0);
> has to do with the -Ofast slow down. If I have understood it correctly, on tree
> level, there is no reason for it while the slow-down happens on RTL level.
Indeed I can find no other difference on the tree level (thus, no
invariant motion missed optimization that isn't present with both
-f[no-]protect-parens).
> That -fprotect-parens makes it faster is a mere coincidence. Is that a correct rough
> summary?
Yes.
Thus, I think if at the RTL level we see a missed invariant motion then
this is a RTL level bug (esp. if it only triggers with
-fno-protect-parens).
Richard.