From 8c7bb540803e8bff9998bc86806e8a83acc75370 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 24 Jul 2020 15:59:38 +0200 Subject: [PATCH] i386: Emit mfence_sse2 for -Os [PR95750] MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2020-07-24 Uroš Bizjak gcc/ChangeLog: PR target/95750 * config/i386/sync.md (mmem_thread_fence): Emit mfence_sse2 for -Os. --- gcc/config/i386/sync.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md index c88750d3664..ed17bb00205 100644 --- a/gcc/config/i386/sync.md +++ b/gcc/config/i386/sync.md @@ -123,7 +123,8 @@ rtx mem; if ((TARGET_64BIT || TARGET_SSE2) - && !TARGET_AVOID_MFENCE) + && (optimize_function_for_size_p (cfun) + || !TARGET_AVOID_MFENCE)) mfence_insn = gen_mfence_sse2; else mfence_insn = gen_mfence_nosse; -- 2.30.2