From: H.J. Lu Date: Mon, 11 Jan 2016 12:33:25 +0000 (+0000) Subject: Remove snprintf from _(load|store)_mask X-Git-Tag: basepoints/gcc-7~1731 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b34b1c343600f7587213dafee5e305a8e4000132;p=thirdparty%2Fgcc.git 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. From-SVN: r232225 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c910e8968c7d..ffe643e6084d 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 278dd383295f..c8e2150a14d8 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")