sse.md (<mask_codefor><code><mode>): Add FALLTHRU comments.
authorJakub Jelinek <jakub@redhat.com>
Sat, 1 Oct 2016 08:41:52 +0000 (10:41 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 1 Oct 2016 08:41:52 +0000 (10:41 +0200)
* config/i386/sse.md (<mask_codefor><code><mode>): Add FALLTHRU
comments.  Simplify asserts, remove unnecessary conditions.
Formatting fixes.
(*<code><mode>3): Likewise.

From-SVN: r240694

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

index c2a590c117b902026306154b1a18002c6f5cb2f8..d432fe08e0463fed91dc0fd655b76fad46c5a638 100644 (file)
@@ -1,3 +1,10 @@
+2016-10-01  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/i386/sse.md (<mask_codefor><code><mode>): Add FALLTHRU
+       comments.  Simplify asserts, remove unnecessary conditions.
+       Formatting fixes.
+       (*<code><mode>3): Likewise.
+
 2016-09-30  Jakub Jelinek  <jakub@redhat.com>
 
        * doc/invoke.texi (-Wregister): Document.
index 7e718a076f6e6d27e463bc64f1ec04bee42f57c3..235969ab40eb21e9c6400c046d043781aeae41b4 100644 (file)
     {
     case MODE_XI:
       gcc_assert (TARGET_AVX512F);
+      /* FALLTHRU */
     case MODE_OI:
-      gcc_assert (TARGET_AVX2 || TARGET_AVX512VL);
+      gcc_assert (TARGET_AVX2);
+      /* FALLTHRU */
     case MODE_TI:
-      gcc_assert (TARGET_SSE2 || TARGET_AVX512VL);
+      gcc_assert (TARGET_SSE2);
       switch (<MODE>mode)
-      {
-        case V16SImode:
-        case V8DImode:
-          if (TARGET_AVX512F)
-          {
-            tmp = "p<logic><ssemodesuffix>";
-            break;
-          }
-        case V8SImode:
-        case V4DImode:
-        case V4SImode:
-        case V2DImode:
-          tmp = TARGET_AVX512VL ? "p<logic><ssemodesuffix>" : "p<logic>";
-          break;
-        default:
-          gcc_unreachable ();
-      }
+       {
+       case V16SImode:
+       case V8DImode:
+         tmp = "p<logic><ssemodesuffix>";
+         break;
+       case V8SImode:
+       case V4DImode:
+       case V4SImode:
+       case V2DImode:
+         tmp = TARGET_AVX512VL ? "p<logic><ssemodesuffix>" : "p<logic>";
+         break;
+       default:
+         gcc_unreachable ();
+       }
       break;
 
-   case MODE_V8SF:
+    case MODE_V8SF:
       gcc_assert (TARGET_AVX);
-   case MODE_V4SF:
+    case MODE_V4SF:
       gcc_assert (TARGET_SSE);
       gcc_assert (!<mask_applied>);
       tmp = "<logic>ps";
       break;
 
-   default:
+    default:
       gcc_unreachable ();
-   }
+    }
 
   switch (which_alternative)
     {
     {
     case MODE_XI:
       gcc_assert (TARGET_AVX512F);
+      /* FALLTHRU */
     case MODE_OI:
-      gcc_assert (TARGET_AVX2 || TARGET_AVX512VL);
+      gcc_assert (TARGET_AVX2);
+      /* FALLTHRU */
     case MODE_TI:
-      gcc_assert (TARGET_SSE2 || TARGET_AVX512VL);
+      gcc_assert (TARGET_SSE2);
       switch (<MODE>mode)
-        {
-        case V64QImode:
-        case V32HImode:
-          if (TARGET_AVX512F)
-          {
-            tmp = "p<logic>";
-            ssesuffix = "q";
-            break;
-          }
-        case V32QImode:
-        case V16HImode:
-        case V16QImode:
-        case V8HImode:
-          if (TARGET_AVX512VL || TARGET_AVX2 || TARGET_SSE2)
-          {
-            tmp = "p<logic>";
-            ssesuffix = TARGET_AVX512VL ? "q" : "";
-            break;
-          }
-        default:
-          gcc_unreachable ();
-      }
+       {
+       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:
+         gcc_unreachable ();
+       }
       break;
 
-   case MODE_V8SF:
+    case MODE_V8SF:
       gcc_assert (TARGET_AVX);
-   case MODE_V4SF:
+    case MODE_V4SF:
       gcc_assert (TARGET_SSE);
       tmp = "<logic>ps";
       ssesuffix = "";
       break;
 
-   default:
+    default:
       gcc_unreachable ();
-   }
+    }
 
   switch (which_alternative)
     {