This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/56560] [4.6/4.7 regression] vzeroupper clobbers argument with AVX
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Mar 2013 11:37:27 +0000
- Subject: [Bug target/56560] [4.6/4.7 regression] vzeroupper clobbers argument with AVX
- Auto-submitted: auto-generated
- References: <bug-56560-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56560
--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2013-03-12 11:37:27 UTC ---
> This patch adds expand_args to track library calls to
> expend arguments. We add vzeroupper when expand_args == 1,
> which indicates we are expanding the actual function.
This looks complicated. A simpler approach could be to record the AVX state in
the CUMULATIVE_ARGS structure and transfer it to cfun->machine only at the end
of the argument processing. Comments and code in calls.c appear to guarantee
that
targetm.calls.function_arg (&args_so_far, VOIDmode, void_type_node, true)
is invoked immediately before the call instruction is emitted.