diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2016-01-11 12:33:25 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2016-01-11 04:33:25 -0800 |
commit | b34b1c343600f7587213dafee5e305a8e4000132 (patch) | |
tree | 0299b94d12627fc1a244b3813e134531b9192d6b | |
parent | 5baf45323b70abe259bffc89425e9f0155a1a7a3 (diff) | |
download | gcc-b34b1c343600f7587213dafee5e305a8e4000132.zip gcc-b34b1c343600f7587213dafee5e305a8e4000132.tar.gz gcc-b34b1c343600f7587213dafee5e305a8e4000132.tar.bz2 |
Remove snprintf from <avx512>_(load|store)<mode>_mask
This patch removes snprintf from <avx512>_(load|store)<mode>_mask
patterns.
* config/i386/sse.md (<avx512>_load<mode>_mask): Remove
snprintf.
(<avx512>_store<mode>_mask): Likewise.
From-SVN: r232225
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/sse.md | 52 |
2 files changed, 22 insertions, 36 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c910e89..ffe643e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-01-11 H.J. Lu <hongjiu.lu@intel.com> + + * config/i386/sse.md (<avx512>_load<mode>_mask): Remove + snprintf. + (<avx512>_store<mode>_mask): Likewise. + 2016-01-11 Bernd Schmidt <bschmidt@redhat.com> Kyrylo Tkachov <kyrylo.tkachov@arm.com> diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 278dd38..c8e2150 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -960,30 +960,20 @@ (match_operand:<avx512fmaskmode> 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>mode))) { - insn_op = "vmov"; - sse_suffix = "<ssemodesuffix>"; + if (misaligned_operand (operands[1], <MODE>mode)) + return "vmovu<ssemodesuffix>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; + else + return "vmova<ssemodesuffix>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; } else { - insn_op = "vmovdq"; - sse_suffix = "<ssescalarsize>"; + if (misaligned_operand (operands[1], <MODE>mode)) + return "vmovdqu<ssescalarsize>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; + else + return "vmovdqa<ssescalarsize>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; } - - if (misaligned_operand (operands[1], <MODE>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:<avx512fmaskmode> 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>mode))) { - insn_op = "vmov"; - sse_suffix = "<ssemodesuffix>"; + if (misaligned_operand (operands[0], <MODE>mode)) + return "vmovu<ssemodesuffix>\t{%1, %0%{%2%}|%0%{%2%}, %1}"; + else + return "vmova<ssemodesuffix>\t{%1, %0%{%2%}|%0%{%2%}, %1}"; } else { - insn_op = "vmovdq"; - sse_suffix = "<ssescalarsize>"; + if (misaligned_operand (operands[0], <MODE>mode)) + return "vmovdqu<ssescalarsize>\t{%1, %0%{%2%}|%0%{%2%}, %1}"; + else + return "vmovdqa<ssescalarsize>\t{%1, %0%{%2%}|%0%{%2%}, %1}"; } - - if (misaligned_operand (operands[0], <MODE>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") |