sse.md (andnot<mode>3): Add FALLTHRU comments.
authorUros Bizjak <ubizjak@gmail.com>
Thu, 6 Oct 2016 14:56:34 +0000 (16:56 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 6 Oct 2016 14:56:34 +0000 (16:56 +0200)
* config/i386/sse.md (andnot<mode>3): Add FALLTHRU comments.
Introduce ssesuffix variable.
(<mask_codefor><code><mode>3<mask_name>): Ditto.
(*<code><mode>3): Ditto.

From-SVN: r240834

gcc/ChangeLog
gcc/config/i386/sse.md

index 3799db0fb83d89e96ebe71ab1419d537d4a54e34..6b8acef79bc9527b5d4941dff87fa12bf51bb8e6 100644 (file)
@@ -1,3 +1,10 @@
+2016-10-06  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/sse.md (andnot<mode>3): Add FALLTHRU comments.
+       Introduce ssesuffix variable.
+       (<mask_codefor><code><mode>3<mask_name>): Ditto.
+       (*<code><mode>3): Ditto.
+
 2016-10-06  Jan Hubicka  <hubicka@ucw.cz>
 
        * postreload.c (reload_cse_simplify): Skip also USE when detecting
index 026054d66fba3f33117da47a76eeee7d14315757..fde520f1ac0d817f3f5e298b12faab88dc76e41b 100644 (file)
   static char buf[64];
   const char *ops;
   const char *tmp;
+  const char *ssesuffix;
 
   switch (get_attr_mode (insn))
     {
     case MODE_XI:
       gcc_assert (TARGET_AVX512F);
+      /* FALLTHRU */
     case MODE_OI:
       gcc_assert (TARGET_AVX2);
+      /* FALLTHRU */
     case MODE_TI:
       gcc_assert (TARGET_SSE2);
+      tmp = "pandn";
       switch (<MODE>mode)
        {
        case V64QImode:
        case V32HImode:
          /* There is no vpandnb or vpandnw instruction, nor vpandn for
             512-bit vectors. Use vpandnq instead.  */
-         tmp = "pandnq";
+         ssesuffix = "q";
          break;
        case V16SImode:
        case V8DImode:
-         tmp = "pandn<ssemodesuffix>";
+         ssesuffix = "<ssemodesuffix>";
          break;
        case V8SImode:
        case V4DImode:
        case V4SImode:
        case V2DImode:
-         tmp = TARGET_AVX512VL ? "pandn<ssemodesuffix>" : "pandn";
+         ssesuffix = TARGET_AVX512VL ? "<ssemodesuffix>" : "";
          break;
        default:
-         tmp = TARGET_AVX512VL ? "pandnq" : "pandn";
-         break;
+         ssesuffix = TARGET_AVX512VL ? "q" : "";
        }
       break;
 
     case MODE_V16SF:
       gcc_assert (TARGET_AVX512F);
+      /* FALLTHRU */
     case MODE_V8SF:
       gcc_assert (TARGET_AVX);
+      /* FALLTHRU */
     case MODE_V4SF:
       gcc_assert (TARGET_SSE);
-      tmp = "andnps";
+      tmp = "andn";
+      ssesuffix = "ps";
       break;
 
     default:
   switch (which_alternative)
     {
     case 0:
-      ops = "%s\t{%%2, %%0|%%0, %%2}";
+      ops = "%s%s\t{%%2, %%0|%%0, %%2}";
       break;
     case 1:
-      ops = "v%s\t{%%2, %%1, %%0|%%0, %%1, %%2}";
+      ops = "v%s%s\t{%%2, %%1, %%0|%%0, %%1, %%2}";
       break;
     default:
       gcc_unreachable ();
     }
 
-  snprintf (buf, sizeof (buf), ops, tmp);
+  snprintf (buf, sizeof (buf), ops, tmp, ssesuffix);
   return buf;
 }
   [(set_attr "isa" "noavx,avx")
   static char buf[64];
   const char *ops;
   const char *tmp;
+  const char *ssesuffix;
 
   switch (get_attr_mode (insn))
     {
       /* FALLTHRU */
     case MODE_TI:
       gcc_assert (TARGET_SSE2);
+      tmp = "p<logic>";
       switch (<MODE>mode)
        {
        case V16SImode:
        case V8DImode:
-         tmp = "p<logic><ssemodesuffix>";
+         ssesuffix = "<ssemodesuffix>";
          break;
        case V8SImode:
        case V4DImode:
        case V4SImode:
        case V2DImode:
-         tmp = TARGET_AVX512VL ? "p<logic><ssemodesuffix>" : "p<logic>";
+         ssesuffix = TARGET_AVX512VL ? "<ssemodesuffix>" : "";
          break;
        default:
          gcc_unreachable ();
 
     case MODE_V8SF:
       gcc_assert (TARGET_AVX);
+      /* FALLTHRU */
     case MODE_V4SF:
       gcc_assert (TARGET_SSE);
-      tmp = "<logic>ps";
+      tmp = "<logic>";
+      ssesuffix = "ps";
       break;
 
     default:
     {
     case 0:
       if (<mask_applied>)
-        ops = "v%s\t{%%2, %%0, %%0<mask_operand3_1>|%%0<mask_operand3_1>, %%0, %%2}";
+        ops = "v%s%s\t{%%2, %%0, %%0<mask_operand3_1>|%%0<mask_operand3_1>, %%0, %%2}";
       else
-        ops = "%s\t{%%2, %%0|%%0, %%2}";
+        ops = "%s%s\t{%%2, %%0|%%0, %%2}";
       break;
     case 1:
-      ops = "v%s\t{%%2, %%1, %%0<mask_operand3_1>|%%0<mask_operand3_1>, %%1, %%2}";
+      ops = "v%s%s\t{%%2, %%1, %%0<mask_operand3_1>|%%0<mask_operand3_1>, %%1, %%2}";
       break;
     default:
       gcc_unreachable ();
     }
 
-  snprintf (buf, sizeof (buf), ops, tmp);
+  snprintf (buf, sizeof (buf), ops, tmp, ssesuffix);
   return buf;
 }
   [(set_attr "isa" "noavx,avx")
       /* FALLTHRU */
     case MODE_TI:
       gcc_assert (TARGET_SSE2);
+      tmp = "p<logic>";
       switch (<MODE>mode)
        {
        case V64QImode:
        case V32HImode:
-         tmp = "p<logic>";
          ssesuffix = "q";
          break;
        case V32QImode:
        case V16HImode:
        case V16QImode:
        case V8HImode:
-         tmp = "p<logic>";
          ssesuffix = TARGET_AVX512VL ? "q" : "";
          break;
        default:
 
     case MODE_V8SF:
       gcc_assert (TARGET_AVX);
+      /* FALLTHRU */
     case MODE_V4SF:
       gcc_assert (TARGET_SSE);
-      tmp = "<logic>ps";
-      ssesuffix = "";
+      tmp = "<logic>";
+      ssesuffix = "ps";
       break;
 
     default:
   switch (which_alternative)
     {
     case 0:
-      ops = "%s\t{%%2, %%0|%%0, %%2}";
-      snprintf (buf, sizeof (buf), ops, tmp);
+      ops = "%s%s\t{%%2, %%0|%%0, %%2}";
       break;
     case 1:
       ops = "v%s%s\t{%%2, %%1, %%0|%%0, %%1, %%2}";
-      snprintf (buf, sizeof (buf), ops, tmp, ssesuffix);
       break;
     default:
       gcc_unreachable ();
     }
 
+  snprintf (buf, sizeof (buf), ops, tmp, ssesuffix);
   return buf;
 }
   [(set_attr "isa" "noavx,avx")