Patchwork PATCH: Emit vzerouppers after reload

login
register
mail settings
Submitter H.J. Lu
Date Nov. 2, 2010, 9:35 p.m.
Message ID <20101102213517.GA9519@intel.com>
Download mbox | patch
Permalink /patch/69925/
State New
Headers show

Comments

H.J. Lu - Nov. 2, 2010, 9:35 p.m.
On Tue, Nov 02, 2010 at 11:06:06AM -0700, H.J. Lu wrote:
> Hi,
> 
> This patch changes vzeroupper optimization to emit vzerouppers after
> reload.  I checked in it as approved by Uros offline.
> 
> Thanks.
> 
> 
> H.J.
> ---
> gcc/
> 
> 2010-11-02  Uros Bizjak  <ubizjak@gmail.com>
> 	    H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* config/i386/i386-protos.h (ix86_split_call_vzeroupper): New.
> 	(ix86_split_call_pop_vzeroupper): Likewise.
> 
> 	* config/i386/i386.c (move_or_delete_vzeroupper_2): Rewrite
> 	the loop.
> 	(ix86_expand_call): Use UNSPEC_CALL_NEEDS_VZEROUPPER.
> 	(ix86_split_call_vzeroupper): New.
> 	(ix86_split_call_pop_vzeroupper): Likewise.
> 
> 	* config/i386/i386.md (UNSPEC_CALL_NEEDS_VZEROUPPER): New.
> 	(*call_pop_0_vzeroupper): Likewise.
> 	(*call_pop_1_vzeroupper): Likewise.
> 	(*sibcall_pop_1_vzeroupper): Likewise.
> 	(*call_0_vzeroupper): Likewise.
> 	(*call_1_vzeroupper): Likewise.
> 	(*sibcall_1_vzeroupper): Likewise.
> 	(*call_1_rex64_vzeroupper): Likewise.
> 	(*call_1_rex64_ms_sysv_vzeroupper): New.
> 	(*call_1_rex64_large_vzeroupper): Likewise.
> 	(*sibcall_1_rex64_vzeroupper): Likewise.
> 	(*call_value_pop_0_vzeroupper): New.
> 	(*call_value_pop_1_vzeroupper): Likewise.
> 	(*sibcall_value_pop_1_vzeroupper): Likewise.
> 	(*call_value_0_vzeroupper): New.
> 	(*call_value_0_rex64_vzeroupper): Use
> 	(*call_value_0_rex64_ms_sysv_vzeroupper): Likewise.
> 	(*call_value_1_vzeroupper): Likewise.
> 	(*sibcall_value_1_vzeroupper): Likewise.
> 	(*call_value_1_rex64_vzeroupper): Likewise.
> 	(*call_value_1_rex64_ms_sysv_vzeroupper): Likewise.
> 	(*call_value_1_rex64_large_vzeroupper): Likewise.
> 	(*sibcall_value_1_rex64_vzeroupper): Likewise.
> 

I checkec in this patch as an obvious fix to correct a typo.


H.J.
---

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 166214)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@ 
+2010-11-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* config/i386/i386.md (*sibcall_1_rex64_vzeroupper): Fix a
+	typo.
+
 2010-11-02  Eric Botcazou  <ebotcazou@adacore.com>
 
 	* basic-block.h (insert_insn_end_bb_new): Delete.
Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md	(revision 166214)
+++ config/i386/i386.md	(working copy)
@@ -11515,7 +11515,7 @@ 
 	 (match_operand 1 "" ""))
    (unspec [(match_operand 2 "const_int_operand" "")]
    	   UNSPEC_CALL_NEEDS_VZEROUPPER)]
-  "TARGET_VZEROUPPER && TARGET_64BIT && !SIBLING_CALL_P (insn)"
+  "TARGET_VZEROUPPER && TARGET_64BIT && SIBLING_CALL_P (insn)"
   "#"
   "&& reload_completed"
   [(const_int 0)]