From b8a3183134353cb86383f4395b99452e04acaa74 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 22 Nov 2018 16:39:35 +0100 Subject: [PATCH] i386.c (ix86_avx_emit_vzeroupper): Remove. * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove. (ix86_emit_mode_set) : Emit vzeroupper here. From-SVN: r266382 --- 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 5796246..ab8c8d9 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 2f0d531..6ccd279 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.7.4