From 04ae82aa4e3d2bdbcb2fc604604db6bf9884ba82 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 2 Nov 2010 22:02:52 +0000 Subject: [PATCH] Remove ix86_split_call_pop_vzeroupper. 2010-11-02 H.J. Lu * config/i386/i386-protos.h (ix86_split_call_pop_vzeroupper): Removed. * config/i386/i386.c (ix86_split_call_pop_vzeroupper): Likewise. * config/i386/i386.md (*call_pop_0_vzeroupper): Use parallel and call ix86_split_call_vzeroupper instead of ix86_split_call_pop_vzeroupper. (*call_pop_1_vzeroupper): Likewise. (*sibcall_pop_1_vzeroupper): Likewise. (*call_value_pop_0_vzeroupper): Likewise. (*call_value_pop_1_vzeroupper): Likewise. (*sibcall_value_pop_1_vzeroupper): Likewise. From-SVN: r166218 --- gcc/ChangeLog | 15 +++++++ gcc/config/i386/i386-protos.h | 1 - gcc/config/i386/i386.c | 10 ----- gcc/config/i386/i386.md | 84 +++++++++++++++++++---------------- 4 files changed, 60 insertions(+), 50 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 570b67daf8b..61f8fded4ae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2010-11-02 H.J. Lu + + * config/i386/i386-protos.h (ix86_split_call_pop_vzeroupper): + Removed. + * config/i386/i386.c (ix86_split_call_pop_vzeroupper): Likewise. + + * config/i386/i386.md (*call_pop_0_vzeroupper): Use parallel + and call ix86_split_call_vzeroupper instead of + ix86_split_call_pop_vzeroupper. + (*call_pop_1_vzeroupper): Likewise. + (*sibcall_pop_1_vzeroupper): Likewise. + (*call_value_pop_0_vzeroupper): Likewise. + (*call_value_pop_1_vzeroupper): Likewise. + (*sibcall_value_pop_1_vzeroupper): Likewise. + 2010-11-02 H.J. Lu * config/i386/i386.md (*sibcall_1_rex64_vzeroupper): Fix a diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index c64135bb8d6..4dc707c05da 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -120,7 +120,6 @@ extern void ix86_expand_sse4_unpack (rtx[], bool, bool); extern bool ix86_expand_int_addcc (rtx[]); extern rtx ix86_expand_call (rtx, rtx, rtx, rtx, rtx, int); extern void ix86_split_call_vzeroupper (rtx, rtx); -extern void ix86_split_call_pop_vzeroupper (rtx, rtx); extern void x86_initialize_trampoline (rtx, rtx, rtx); extern rtx ix86_zero_extend_to_Pmode (rtx); extern void ix86_split_long_move (rtx[]); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a5beb8324da..afecc8935da 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -21561,16 +21561,6 @@ ix86_split_call_vzeroupper (rtx insn, rtx vzeroupper) emit_call_insn (call); } -void -ix86_split_call_pop_vzeroupper (rtx insn, rtx vzeroupper) -{ - rtx call = XVECEXP (PATTERN (insn), 0, 0); - rtx pop = XVECEXP (PATTERN (insn), 0, 1); - emit_insn (gen_avx_vzeroupper (vzeroupper)); - emit_call_insn (gen_rtx_PARALLEL (VOIDmode, - gen_rtvec (2, call, pop))); -} - /* Output the assembly for a call instruction. */ const char * diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index a4dc9de0e31..79f4b68d53c 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -11262,18 +11262,19 @@ }) (define_insn_and_split "*call_pop_0_vzeroupper" - [(call (mem:QI (match_operand:SI 0 "constant_call_address_operand" "")) - (match_operand:SI 1 "" "")) - (set (reg:SI SP_REG) - (plus:SI (reg:SI SP_REG) - (match_operand:SI 2 "immediate_operand" ""))) + [(parallel + [(call (mem:QI (match_operand:SI 0 "constant_call_address_operand" "")) + (match_operand:SI 1 "" "")) + (set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (match_operand:SI 2 "immediate_operand" "")))]) (unspec [(match_operand 3 "const_int_operand" "")] UNSPEC_CALL_NEEDS_VZEROUPPER)] "TARGET_VZEROUPPER && !TARGET_64BIT" "#" "&& reload_completed" [(const_int 0)] - "ix86_split_call_pop_vzeroupper (curr_insn, operands[3]); DONE;" + "ix86_split_call_vzeroupper (curr_insn, operands[3]); DONE;" [(set_attr "type" "call")]) (define_insn "*call_pop_0" @@ -11292,18 +11293,19 @@ [(set_attr "type" "call")]) (define_insn_and_split "*call_pop_1_vzeroupper" - [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lsm")) - (match_operand:SI 1 "" "")) - (set (reg:SI SP_REG) - (plus:SI (reg:SI SP_REG) - (match_operand:SI 2 "immediate_operand" "i"))) + [(parallel + [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lsm")) + (match_operand:SI 1 "" "")) + (set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (match_operand:SI 2 "immediate_operand" "i")))]) (unspec [(match_operand 3 "const_int_operand" "")] UNSPEC_CALL_NEEDS_VZEROUPPER)] "TARGET_VZEROUPPER && !TARGET_64BIT && !SIBLING_CALL_P (insn)" "#" "&& reload_completed" [(const_int 0)] - "ix86_split_call_pop_vzeroupper (curr_insn, operands[3]); DONE;" + "ix86_split_call_vzeroupper (curr_insn, operands[3]); DONE;" [(set_attr "type" "call")]) (define_insn "*call_pop_1" @@ -11321,18 +11323,19 @@ [(set_attr "type" "call")]) (define_insn_and_split "*sibcall_pop_1_vzeroupper" - [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "s,U")) - (match_operand:SI 1 "" "")) - (set (reg:SI SP_REG) - (plus:SI (reg:SI SP_REG) - (match_operand:SI 2 "immediate_operand" "i,i"))) + [(parallel + [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "s,U")) + (match_operand:SI 1 "" "")) + (set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (match_operand:SI 2 "immediate_operand" "i,i")))]) (unspec [(match_operand 3 "const_int_operand" "")] UNSPEC_CALL_NEEDS_VZEROUPPER)] "TARGET_VZEROUPPER && !TARGET_64BIT && SIBLING_CALL_P (insn)" "#" "&& reload_completed" [(const_int 0)] - "ix86_split_call_pop_vzeroupper (curr_insn, operands[3]); DONE;" + "ix86_split_call_vzeroupper (curr_insn, operands[3]); DONE;" [(set_attr "type" "call")]) (define_insn "*sibcall_pop_1" @@ -17269,19 +17272,20 @@ ;; disrupt insn-recog's switch tables. (define_insn_and_split "*call_value_pop_0_vzeroupper" - [(set (match_operand 0 "" "") - (call (mem:QI (match_operand:SI 1 "constant_call_address_operand" "")) - (match_operand:SI 2 "" ""))) - (set (reg:SI SP_REG) - (plus:SI (reg:SI SP_REG) - (match_operand:SI 3 "immediate_operand" ""))) + [(parallel + [(set (match_operand 0 "" "") + (call (mem:QI (match_operand:SI 1 "constant_call_address_operand" "")) + (match_operand:SI 2 "" ""))) + (set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (match_operand:SI 3 "immediate_operand" "")))]) (unspec [(match_operand 4 "const_int_operand" "")] UNSPEC_CALL_NEEDS_VZEROUPPER)] "TARGET_VZEROUPPER && !TARGET_64BIT" "#" "&& reload_completed" [(const_int 0)] - "ix86_split_call_pop_vzeroupper (curr_insn, operands[4]); DONE;" + "ix86_split_call_vzeroupper (curr_insn, operands[4]); DONE;" [(set_attr "type" "callv")]) (define_insn "*call_value_pop_0" @@ -17296,19 +17300,20 @@ [(set_attr "type" "callv")]) (define_insn_and_split "*call_value_pop_1_vzeroupper" - [(set (match_operand 0 "" "") - (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lsm")) - (match_operand:SI 2 "" ""))) - (set (reg:SI SP_REG) - (plus:SI (reg:SI SP_REG) - (match_operand:SI 3 "immediate_operand" "i"))) + [(parallel + [(set (match_operand 0 "" "") + (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lsm")) + (match_operand:SI 2 "" ""))) + (set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (match_operand:SI 3 "immediate_operand" "i")))]) (unspec [(match_operand 4 "const_int_operand" "")] UNSPEC_CALL_NEEDS_VZEROUPPER)] "TARGET_VZEROUPPER && !TARGET_64BIT && !SIBLING_CALL_P (insn)" "#" "&& reload_completed" [(const_int 0)] - "ix86_split_call_pop_vzeroupper (curr_insn, operands[4]); DONE;" + "ix86_split_call_vzeroupper (curr_insn, operands[4]); DONE;" [(set_attr "type" "callv")]) (define_insn "*call_value_pop_1" @@ -17323,19 +17328,20 @@ [(set_attr "type" "callv")]) (define_insn_and_split "*sibcall_value_pop_1_vzeroupper" - [(set (match_operand 0 "" "") - (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U")) - (match_operand:SI 2 "" ""))) - (set (reg:SI SP_REG) - (plus:SI (reg:SI SP_REG) - (match_operand:SI 3 "immediate_operand" "i,i"))) + [(parallel + [(set (match_operand 0 "" "") + (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U")) + (match_operand:SI 2 "" ""))) + (set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (match_operand:SI 3 "immediate_operand" "i,i")))]) (unspec [(match_operand 4 "const_int_operand" "")] UNSPEC_CALL_NEEDS_VZEROUPPER)] "TARGET_VZEROUPPER && !TARGET_64BIT && SIBLING_CALL_P (insn)" "#" "&& reload_completed" [(const_int 0)] - "ix86_split_call_pop_vzeroupper (curr_insn, operands[4]); DONE;" + "ix86_split_call_vzeroupper (curr_insn, operands[4]); DONE;" [(set_attr "type" "callv")]) (define_insn "*sibcall_value_pop_1" -- 2.30.2