On Mon, Oct 25, 2010 at 01:57:24AM -0700, H.J. Lu wrote:
> At RTL expansion time, the vzeroupper optimization generates a> vzeroupper_nop before function call and functin return if 256bit AVX> instructions are used. The vzeroupper pass is run before final pass.
Can't you run it at the end of machine_reorg instead?
Jakub

On Mon, Oct 25, 2010 at 4:38 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Oct 25, 2010 at 01:57:24AM -0700, H.J. Lu wrote:>> At RTL expansion time, the vzeroupper optimization generates a>> vzeroupper_nop before function call and functin return if 256bit AVX>> instructions are used. The vzeroupper pass is run before final pass.>> Can't you run it at the end of machine_reorg instead?>
I tried it at different places, but probably not at the end of machine_reorg.
The main issue that unspec_volatile doesn't guarantee that any pass won't
move instructions across it:
http://gcc.gnu.org/ml/gcc/2010-05/msg00653.html
I want to avoid any potential problems. That is why I put it before final
pass.

"H.J. Lu" <hongjiu.lu@intel.com> writes:
>> At RTL expansion time, the vzeroupper optimization generates a> vzeroupper_nop before function call and functin return if 256bit AVX> instructions are used. The vzeroupper pass is run before final pass.> It scans all reachable blocks:>> 1. Remove vzeroupper_nop when:> a. The upper 128bits of AVX regiters are known dead.
Is dead the correct term here? It would seem to need "unused"
-Andi

In Mon, Oct 25, 2010 at 6:33 AM, Andi Kleen <andi@firstfloor.org> wrote:
> "H.J. Lu" <hongjiu.lu@intel.com> writes:>>>> At RTL expansion time, the vzeroupper optimization generates a>> vzeroupper_nop before function call and functin return if 256bit AVX>> instructions are used. The vzeroupper pass is run before final pass.>> It scans all reachable blocks:>>>> 1. Remove vzeroupper_nop when:>> a. The upper 128bits of AVX regiters are known dead.>> Is dead the correct term here? It would seem to need "unused">
It has be to be cleared to zero, not unused.Maybe I should use zero.