+2018-11-22 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
+ (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
+
2018-11-22 Martin Liska <mliska@suse.cz>
* common/config/i386/i386-common.c (processor_names): Add
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)
{
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: