This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/84114] global reassociation pass prevents fma usage, generates slower code
- From: "wilco.dijkstra at arm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Feb 2018 15:24:24 +0000
- Subject: [Bug tree-optimization/84114] global reassociation pass prevents fma usage, generates slower code
- Auto-submitted: auto-generated
- References: <bug-84114-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84114
Wilco <wilco.dijkstra at arm dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wilco.dijkstra at arm dot com
--- Comment #5 from Wilco <wilco.dijkstra at arm dot com> ---
(In reply to Steve Ellcey from comment #4)
> While teaching the reassociation pass about fma's seems like the right
> answer would it be reasonable (and simpler) to do the fma pass
> (pass_optimize_widening_mul) before
> the reassociation pass (pass_reassoc) to get the most fma's?
>
> That fixes my small test case but I haven't done a bigger performance check
> to see what the overall impact would be.
I don't know what else that would affect since the reassociation phase runs
very early - and it's late at this stage. My patch seems much safer. Even
easier might be to return 1 for FLOAT_MODE PLUS_EXPR in
aarch64_reassociation_width. Then we can fix the reassociation phase in GCC9.