From 2f5274cc3caea5c85ff7ce1536cadc1117a9e42c Mon Sep 17 00:00:00 2001 From: uros Date: Thu, 22 Nov 2018 15:39:35 +0000 Subject: [PATCH] * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove. (ix86_emit_mode_set) : Emit vzeroupper here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266382 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 30 ++---------------------------- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 57962464f40e..ab8c8d911848 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-11-22 Uros Bizjak + + * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove. + (ix86_emit_mode_set) : Emit vzeroupper here. + 2018-11-22 Martin Liska * common/config/i386/i386-common.c (processor_names): Add diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 2f0d531427be..6ccd2797b61b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -19173,37 +19173,11 @@ emit_i387_cw_initialization (int mode) emit_move_insn (new_mode, reg); } -/* Emit vzeroupper. */ - -void -ix86_avx_emit_vzeroupper (HARD_REG_SET regs_live) -{ - int i; - - /* Cancel automatic vzeroupper insertion if there are - live call-saved SSE registers at the insertion point. */ - - for (i = FIRST_SSE_REG; i <= LAST_SSE_REG; i++) - if (TEST_HARD_REG_BIT (regs_live, i) && !call_used_regs[i]) - return; - - if (TARGET_64BIT) - for (i = FIRST_REX_SSE_REG; i <= LAST_REX_SSE_REG; i++) - if (TEST_HARD_REG_BIT (regs_live, i) && !call_used_regs[i]) - return; - - emit_insn (gen_avx_vzeroupper ()); -} - /* Generate one or more insns to set ENTITY to MODE. */ -/* Generate one or more insns to set ENTITY to MODE. HARD_REG_LIVE - is the set of hard registers live at the point where the insn(s) - are to be inserted. */ - static void ix86_emit_mode_set (int entity, int mode, int prev_mode ATTRIBUTE_UNUSED, - HARD_REG_SET regs_live) + HARD_REG_SET regs_live ATTRIBUTE_UNUSED) { switch (entity) { @@ -19213,7 +19187,7 @@ ix86_emit_mode_set (int entity, int mode, int prev_mode ATTRIBUTE_UNUSED, break; case AVX_U128: if (mode == AVX_U128_CLEAN) - ix86_avx_emit_vzeroupper (regs_live); + emit_insn (gen_avx_vzeroupper ()); break; case I387_TRUNC: case I387_FLOOR: -- 2.47.2