From 1ef0270e330da4938f5cb3371a45f2fb528eb4c4 Mon Sep 17 00:00:00 2001 From: hjl Date: Mon, 11 Jan 2016 12:33:25 +0000 Subject: [PATCH] Remove snprintf from _(load|store)_mask This patch removes snprintf from _(load|store)_mask patterns. * config/i386/sse.md (_load_mask): Remove snprintf. (_store_mask): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232225 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/sse.md | 52 ++++++++++++++++---------------------------------- 2 files changed, 22 insertions(+), 36 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c910e8968c7..ffe643e6084 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-01-11 H.J. Lu + + * config/i386/sse.md (_load_mask): Remove + snprintf. + (_store_mask): Likewise. + 2016-01-11 Bernd Schmidt Kyrylo Tkachov diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 278dd383295..c8e2150a14d 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -960,30 +960,20 @@ (match_operand: 3 "register_operand" "Yk,Yk")))] "TARGET_AVX512F" { - static char buf [64]; - - const char *insn_op; - const char *sse_suffix; - const char *align; if (FLOAT_MODE_P (GET_MODE_INNER (mode))) { - insn_op = "vmov"; - sse_suffix = ""; + if (misaligned_operand (operands[1], mode)) + return "vmovu\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; + else + return "vmova\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; } else { - insn_op = "vmovdq"; - sse_suffix = ""; + if (misaligned_operand (operands[1], mode)) + return "vmovdqu\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; + else + return "vmovdqa\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; } - - if (misaligned_operand (operands[1], mode)) - align = "u"; - else - align = "a"; - - snprintf (buf, sizeof (buf), "%s%s%s\t{%%1, %%0%%{%%3%%}%%N2|%%0%%{%%3%%}%%N2, %%1}", - insn_op, align, sse_suffix); - return buf; } [(set_attr "type" "ssemov") (set_attr "prefix" "evex") @@ -1035,30 +1025,20 @@ (match_operand: 2 "register_operand" "Yk")))] "TARGET_AVX512F" { - static char buf [64]; - - const char *insn_op; - const char *sse_suffix; - const char *align; if (FLOAT_MODE_P (GET_MODE_INNER (mode))) { - insn_op = "vmov"; - sse_suffix = ""; + if (misaligned_operand (operands[0], mode)) + return "vmovu\t{%1, %0%{%2%}|%0%{%2%}, %1}"; + else + return "vmova\t{%1, %0%{%2%}|%0%{%2%}, %1}"; } else { - insn_op = "vmovdq"; - sse_suffix = ""; + if (misaligned_operand (operands[0], mode)) + return "vmovdqu\t{%1, %0%{%2%}|%0%{%2%}, %1}"; + else + return "vmovdqa\t{%1, %0%{%2%}|%0%{%2%}, %1}"; } - - if (misaligned_operand (operands[0], mode)) - align = "u"; - else - align = "a"; - - snprintf (buf, sizeof (buf), "%s%s%s\t{%%1, %%0%%{%%2%%}|%%0%%{%%2%%}, %%1}", - insn_op, align, sse_suffix); - return buf; } [(set_attr "type" "ssemov") (set_attr "prefix" "evex") -- 2.11.4.GIT