i386.c (ix86_expand_int_vcond): Reformat.
authorH.J. Lu <hjl@gcc.gnu.org>
Tue, 29 Dec 2009 21:05:13 +0000 (13:05 -0800)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 29 Dec 2009 21:05:13 +0000 (13:05 -0800)
2009-12-29  H.J. Lu  <hongjiu.lu@intel.com>

* config/i386/i386.c (ix86_expand_int_vcond): Reformat.

From-SVN: r155509

gcc/ChangeLog
gcc/config/i386/i386.c

index ffe2782..a1160cf 100644 (file)
@@ -1,6 +1,10 @@
+2009-12-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/i386/i386.c (ix86_expand_int_vcond): Reformat.
+
 2009-12-29  Dave Korn  <dave.korn.cygwin@gmail.com>
 
-  2009-10-06 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
+       2009-10-06 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
 
        PR objective-c++/41595
        * config/darwin.c (darwin_label_is_anonymous_local_objc_name):
index dfe12de..3e15b9d 100644 (file)
@@ -16189,116 +16189,118 @@ ix86_expand_int_vcond (rtx operands[])
   /* XOP supports all of the comparisons on all vector int types.  */
   if (!TARGET_XOP)
     {
-  /* Canonicalize the comparison to EQ, GT, GTU.  */
-  switch (code)
-    {
-    case EQ:
-    case GT:
-    case GTU:
-      break;
-
-    case NE:
-    case LE:
-    case LEU:
-      code = reverse_condition (code);
-      negate = true;
-      break;
-
-    case GE:
-    case GEU:
-      code = reverse_condition (code);
-      negate = true;
-      /* FALLTHRU */
-
-    case LT:
-    case LTU:
-      code = swap_condition (code);
-      x = cop0, cop0 = cop1, cop1 = x;
-      break;
-
-    default:
-      gcc_unreachable ();
-    }
-
-  /* Only SSE4.1/SSE4.2 supports V2DImode.  */
-  if (mode == V2DImode)
-    {
+      /* Canonicalize the comparison to EQ, GT, GTU.  */
       switch (code)
        {
        case EQ:
-         /* SSE4.1 supports EQ.  */
-         if (!TARGET_SSE4_1)
-           return false;
-         break;
-
        case GT:
        case GTU:
-         /* SSE4.2 supports GT/GTU.  */
-         if (!TARGET_SSE4_2)
-           return false;
+         break;
+
+       case NE:
+       case LE:
+       case LEU:
+         code = reverse_condition (code);
+         negate = true;
+         break;
+
+       case GE:
+       case GEU:
+         code = reverse_condition (code);
+         negate = true;
+         /* FALLTHRU */
+
+       case LT:
+       case LTU:
+         code = swap_condition (code);
+         x = cop0, cop0 = cop1, cop1 = x;
          break;
 
        default:
          gcc_unreachable ();
        }
-    }
 
-  /* Unsigned parallel compare is not supported by the hardware.  Play some
-     tricks to turn this into a signed comparison against 0.  */
-  if (code == GTU)
-    {
-      cop0 = force_reg (mode, cop0);
+      /* Only SSE4.1/SSE4.2 supports V2DImode.  */
+      if (mode == V2DImode)
+       {
+         switch (code)
+           {
+           case EQ:
+             /* SSE4.1 supports EQ.  */
+             if (!TARGET_SSE4_1)
+               return false;
+             break;
 
-      switch (mode)
+           case GT:
+           case GTU:
+             /* SSE4.2 supports GT/GTU.  */
+             if (!TARGET_SSE4_2)
+               return false;
+             break;
+
+           default:
+             gcc_unreachable ();
+           }
+       }
+
+      /* Unsigned parallel compare is not supported by the hardware.
+        Play some tricks to turn this into a signed comparison
+        against 0.  */
+      if (code == GTU)
        {
-       case V4SImode:
-       case V2DImode:
-         {
-           rtx t1, t2, mask;
-
-           /* Perform a parallel modulo subtraction.  */
-           t1 = gen_reg_rtx (mode);
-           emit_insn ((mode == V4SImode
-                       ? gen_subv4si3
-                       : gen_subv2di3) (t1, cop0, cop1));
-
-           /* Extract the original sign bit of op0.  */
-           mask = ix86_build_signbit_mask (GET_MODE_INNER (mode),
-                                           true, false);
-           t2 = gen_reg_rtx (mode);
-           emit_insn ((mode == V4SImode
-                       ? gen_andv4si3
-                       : gen_andv2di3) (t2, cop0, mask));
-
-           /* XOR it back into the result of the subtraction.  This results
-              in the sign bit set iff we saw unsigned underflow.  */
-           x = gen_reg_rtx (mode);
-           emit_insn ((mode == V4SImode
-                       ? gen_xorv4si3
-                       : gen_xorv2di3) (x, t1, t2));
-
-           code = GT;
-         }
-         break;
+         cop0 = force_reg (mode, cop0);
 
-       case V16QImode:
-       case V8HImode:
-         /* Perform a parallel unsigned saturating subtraction.  */
-         x = gen_reg_rtx (mode);
-         emit_insn (gen_rtx_SET (VOIDmode, x,
-                                 gen_rtx_US_MINUS (mode, cop0, cop1)));
+         switch (mode)
+           {
+           case V4SImode:
+           case V2DImode:
+               {
+                 rtx t1, t2, mask;
+
+                 /* Perform a parallel modulo subtraction.  */
+                 t1 = gen_reg_rtx (mode);
+                 emit_insn ((mode == V4SImode
+                             ? gen_subv4si3
+                             : gen_subv2di3) (t1, cop0, cop1));
+
+                 /* Extract the original sign bit of op0.  */
+                 mask = ix86_build_signbit_mask (GET_MODE_INNER (mode),
+                                                 true, false);
+                 t2 = gen_reg_rtx (mode);
+                 emit_insn ((mode == V4SImode
+                             ? gen_andv4si3
+                             : gen_andv2di3) (t2, cop0, mask));
+
+                 /* XOR it back into the result of the subtraction.
+                    This results in the sign bit set iff we saw
+                    unsigned underflow.  */
+                 x = gen_reg_rtx (mode);
+                 emit_insn ((mode == V4SImode
+                             ? gen_xorv4si3
+                             : gen_xorv2di3) (x, t1, t2));
+
+                 code = GT;
+               }
+             break;
 
-         code = EQ;
-         negate = !negate;
-         break;
+           case V16QImode:
+           case V8HImode:
+             /* Perform a parallel unsigned saturating subtraction.  */
+             x = gen_reg_rtx (mode);
+             emit_insn (gen_rtx_SET (VOIDmode, x,
+                                     gen_rtx_US_MINUS (mode, cop0, cop1)));
 
-       default:
-         gcc_unreachable ();
-       }
+             code = EQ;
+             negate = !negate;
+             break;
 
-      cop0 = x;
-      cop1 = CONST0_RTX (mode);
-    }
+           default:
+             gcc_unreachable ();
+           }
+
+         cop0 = x;
+         cop1 = CONST0_RTX (mode);
+       }
     }
 
   x = ix86_expand_sse_cmp (operands[0], code, cop0, cop1,