]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Add CC clobber and splits for 32-bit vector mode logic insns [PR100673, PR103861]
authorUros Bizjak <ubizjak@gmail.com>
Wed, 12 Jan 2022 18:59:57 +0000 (19:59 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 12 Jan 2022 19:03:16 +0000 (20:03 +0100)
Add CC clobber to 32-bit vector mode logic insns to allow variants with
general-purpose registers.  Also improve ix86_sse_movcc to emit insn with
CC clobber for narrow vector modes in order to re-enable conditional moves
for 16-bit and 32-bit narrow vector modes with -msse2.

2022-01-12  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:

PR target/100637
PR target/103861
* config/i386/i386-expand.c (ix86_emit_vec_binop): New static function.
(ix86_expand_sse_movcc): Use ix86_emit_vec_binop instead of gen_rtx_X
when constructing vector logic RTXes.
(expand_vec_perm_pshufb2): Ditto.
* config/i386/mmx.md (negv2qi): Disparage GPR alternative a bit.
(<plusminus:insn>v2qi3): Ditto.
(vcond<mode><mode>): Re-enable for TARGET_SSE2.
(vcondu<mode><mode>): Ditto.
(vcond_mask_<mode><mode>): Ditto.
(one_cmpl<VI_32:mode>2): Remove expander.
(one_cmpl<VI_16_32:mode>2): Rename from one_cmplv2qi.
Use VI_16_32 mode iterator.
(one_cmpl<VI_16_32:mode>2 splitters): Use VI_16_32 mode iterator.
Use lowpart_subreg instead of gen_lowpart to create subreg.
(*andnot<VI_16_32:mode>3): Merge from "*andnot<VI_32:mode>" and
"*andnotv2qi3" insn patterns using VI_16_32 mode iterator.
Disparage GPR alternative a bit.  Add CC clobber.
(*andnot<VI_16_32:mode>3 splitters): Use VI_16_32 mode iterator.
Use lowpart_subreg instead of gen_lowpart to create subreg.
(*<any_logic:code><VI_16_32:mode>3): Merge from
"*<any_logic:code><VI_32:mode>" and "*<any_logic:code>v2qi3" insn patterns
using VI_16_32 mode iterator.  Disparage GPR alternative a bit.
Add CC clobber.
(*<any_logic:code><VI_16_32:mode>3 splitters):Use VI_16_32 mode
iterator.  Use lowpart_subreg instead of gen_lowpart to create subreg.

gcc/testsuite/ChangeLog:

PR target/100637
PR target/103861
* g++.target/i386/pr100637-1b.C (dg-options):
Use -msse2 instead of -msse4.1.
* g++.target/i386/pr100637-1w.C (dg-options): Ditto.
* g++.target/i386/pr103861-1.C (dg-options): Ditto.
* gcc.target/i386/pr100637-4b.c (dg-options): Ditto.
* gcc.target/i386/pr103861-4.c (dg-options): Ditto.
* gcc.target/i386/pr100637-1b.c: Remove scan-assembler
directives for logic instructions.
* gcc.target/i386/pr100637-1w.c: Ditto.
* gcc.target/i386/warn-vect-op-2.c:
Update dg-warning for vector logic operation.

gcc/config/i386/i386-expand.c
gcc/config/i386/mmx.md
gcc/testsuite/g++.target/i386/pr100637-1b.C
gcc/testsuite/g++.target/i386/pr100637-1w.C
gcc/testsuite/g++.target/i386/pr103861-1.C
gcc/testsuite/gcc.target/i386/pr100637-1b.c
gcc/testsuite/gcc.target/i386/pr100637-1w.c
gcc/testsuite/gcc.target/i386/pr100637-4b.c
gcc/testsuite/gcc.target/i386/pr103861-4.c
gcc/testsuite/gcc.target/i386/warn-vect-op-2.c

index 8b1266fb9f174b70770996b5642acddf616064aa..0318f1267855a30e5cb5c724aa65eb13ee086e0c 100644 (file)
@@ -3752,6 +3752,27 @@ ix86_expand_sse_cmp (rtx dest, enum rtx_code code, rtx cmp_op0, rtx cmp_op1,
   return dest;
 }
 
+/* Emit x86 binary operand CODE in mode MODE for SSE vector
+   instructions that can be performed using GP registers.  */
+
+static void
+ix86_emit_vec_binop (enum rtx_code code, machine_mode mode,
+                    rtx dst, rtx src1, rtx src2)
+{
+  rtx tmp;
+
+  tmp = gen_rtx_SET (dst, gen_rtx_fmt_ee (code, mode, src1, src2));
+
+  if (GET_MODE_SIZE (mode) <= GET_MODE_SIZE (SImode)
+      && GET_MODE_CLASS (mode) == MODE_VECTOR_INT)
+    {
+      rtx clob = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (CCmode, FLAGS_REG));
+      tmp = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, tmp, clob));
+    }
+
+  emit_insn (tmp);
+}
+
 /* Expand DEST = CMP ? OP_TRUE : OP_FALSE into a sequence of logical
    operations.  This is used for both scalar and vector conditional moves.  */
 
@@ -3820,23 +3841,20 @@ ix86_expand_sse_movcc (rtx dest, rtx cmp, rtx op_true, rtx op_false)
   else if (op_false == CONST0_RTX (mode))
     {
       op_true = force_reg (mode, op_true);
-      x = gen_rtx_AND (mode, cmp, op_true);
-      emit_insn (gen_rtx_SET (dest, x));
+      ix86_emit_vec_binop (AND, mode, dest, cmp, op_true);
       return;
     }
   else if (op_true == CONST0_RTX (mode))
     {
       op_false = force_reg (mode, op_false);
       x = gen_rtx_NOT (mode, cmp);
-      x = gen_rtx_AND (mode, x, op_false);
-      emit_insn (gen_rtx_SET (dest, x));
+      ix86_emit_vec_binop (AND, mode, dest, x, op_false);
       return;
     }
   else if (INTEGRAL_MODE_P (mode) && op_true == CONSTM1_RTX (mode))
     {
       op_false = force_reg (mode, op_false);
-      x = gen_rtx_IOR (mode, cmp, op_false);
-      emit_insn (gen_rtx_SET (dest, x));
+      ix86_emit_vec_binop (IOR, mode, dest, cmp, op_false);
       return;
     }
   else if (TARGET_XOP)
@@ -4010,15 +4028,12 @@ ix86_expand_sse_movcc (rtx dest, rtx cmp, rtx op_true, rtx op_false)
       else
        t3 = dest;
 
-      x = gen_rtx_AND (mode, op_true, cmp);
-      emit_insn (gen_rtx_SET (t2, x));
+      ix86_emit_vec_binop (AND, mode, t2, op_true, cmp);
 
       x = gen_rtx_NOT (mode, cmp);
-      x = gen_rtx_AND (mode, x, op_false);
-      emit_insn (gen_rtx_SET (t3, x));
+      ix86_emit_vec_binop (AND, mode, t3, x, op_false);
 
-      x = gen_rtx_IOR (mode, t3, t2);
-      emit_insn (gen_rtx_SET (dest, x));
+      ix86_emit_vec_binop (IOR, mode, dest, t3, t2);
     }
 }
 
@@ -20733,7 +20748,7 @@ expand_vec_perm_pshufb2 (struct expand_vec_perm_d *d)
   op = d->target;
   if (d->vmode != mode)
     op = gen_reg_rtx (mode);
-  emit_insn (gen_rtx_SET (op, gen_rtx_IOR (mode, l, h)));
+  ix86_emit_vec_binop (IOR, mode, op, l, h);
   if (op != d->target)
     emit_move_insn (d->target, gen_lowpart (d->vmode, op));
 
index fa67278e003d8bca69def67b7b36d58cd2854a32..8a8142c8a09fd8cc3a7091ff9e837e97d38d9a70 100644 (file)
   "operands[2] = force_reg (<MODE>mode, CONST0_RTX (<MODE>mode));")
 
 (define_insn "negv2qi2"
-  [(set (match_operand:V2QI 0 "register_operand" "=Q,&Yw")
+  [(set (match_operand:V2QI 0 "register_operand" "=?Q,&Yw")
         (neg:V2QI
          (match_operand:V2QI 1 "register_operand" "0,Yw")))
    (clobber (reg:CC FLAGS_REG))]
    (set_attr "mode" "TI")])
 
 (define_insn "<insn>v2qi3"
-  [(set (match_operand:V2QI 0 "register_operand" "=Q,x,Yw")
+  [(set (match_operand:V2QI 0 "register_operand" "=?Q,x,Yw")
         (plusminus:V2QI
          (match_operand:V2QI 1 "register_operand" "<comm>0,0,Yw")
          (match_operand:V2QI 2 "register_operand" "Q,x,Yw")))
             (match_operand:VI_16_32 5 "register_operand")])
          (match_operand:VI_16_32 1)
          (match_operand:VI_16_32 2)))]
-  "TARGET_SSE4_1"
+  "TARGET_SSE2"
 {
   bool ok = ix86_expand_int_vcond (operands);
   gcc_assert (ok);
             (match_operand:VI_16_32 5 "register_operand")])
          (match_operand:VI_16_32 1)
          (match_operand:VI_16_32 2)))]
-  "TARGET_SSE4_1"
+  "TARGET_SSE2"
 {
   bool ok = ix86_expand_int_vcond (operands);
   gcc_assert (ok);
          (match_operand:VI_16_32 1 "register_operand")
          (match_operand:VI_16_32 2 "register_operand")
          (match_operand:VI_16_32 3 "register_operand")))]
-  "TARGET_SSE4_1"
+  "TARGET_SSE2"
 {
   ix86_expand_sse_movcc (operands[0], operands[3],
                         operands[1], operands[2]);
   "TARGET_MMX_WITH_SSE"
   "operands[2] = force_reg (<MODE>mode, CONSTM1_RTX (<MODE>mode));")
 
-(define_expand "one_cmpl<mode>2"
-  [(set (match_operand:VI_32 0 "register_operand")
-       (xor:VI_32
-         (match_operand:VI_32 1 "register_operand")
-         (match_dup 2)))]
-  "TARGET_SSE2"
-  "operands[2] = force_reg (<MODE>mode, CONSTM1_RTX (<MODE>mode));")
-
-(define_insn "one_cmplv2qi2"
-  [(set (match_operand:V2QI 0 "register_operand" "=r,&x,&v")
-       (not:V2QI
-         (match_operand:V2QI 1 "register_operand" "0,x,v")))]
+(define_insn "one_cmpl<mode>2"
+  [(set (match_operand:VI_16_32 0 "register_operand" "=?r,&x,&v")
+       (not:VI_16_32
+         (match_operand:VI_16_32 1 "register_operand" "0,x,v")))]
   ""
   "#"
   [(set_attr "isa" "*,sse2,avx512vl")
    (set_attr "mode" "SI,TI,TI")])
 
 (define_split
-  [(set (match_operand:V2QI 0 "general_reg_operand")
-       (not:V2QI
-         (match_operand:V2QI 1 "general_reg_operand")))]
+  [(set (match_operand:VI_16_32 0 "general_reg_operand")
+       (not:VI_16_32
+         (match_operand:VI_16_32 1 "general_reg_operand")))]
   "reload_completed"
   [(set (match_dup 0)
        (not:SI (match_dup 1)))]
 {
-  operands[1] = gen_lowpart (SImode, operands[1]);
-  operands[0] = gen_lowpart (SImode, operands[0]);
+  operands[1] = lowpart_subreg (SImode, operands[1], <MODE>mode);
+  operands[0] = lowpart_subreg (SImode, operands[0], <MODE>mode);
 })
 
 (define_split
-  [(set (match_operand:V2QI 0 "sse_reg_operand")
-       (not:V2QI
-         (match_operand:V2QI 1 "sse_reg_operand")))]
+  [(set (match_operand:VI_16_32 0 "sse_reg_operand")
+       (not:VI_16_32
+         (match_operand:VI_16_32 1 "sse_reg_operand")))]
   "TARGET_SSE2 && reload_completed"
-  [(set (match_dup 0)
-       (xor:V4QI
+  [(set (match_dup 0) (match_dup 2))
+   (set (match_dup 0)
+       (xor:V16QI
          (match_dup 0) (match_dup 1)))]
 {
-  emit_insn
-   (gen_rtx_SET (gen_rtx_REG (V16QImode, REGNO (operands[0])),
-                CONSTM1_RTX (V16QImode)));
-
-  operands[1] = gen_lowpart (V4QImode, operands[1]);
-  operands[0] = gen_lowpart (V4QImode, operands[0]);
+  operands[2] = CONSTM1_RTX (V16QImode);
+  operands[1] = lowpart_subreg (V16QImode, operands[1], <MODE>mode);
+  operands[0] = lowpart_subreg (V16QImode, operands[0], <MODE>mode);
 })
 
 (define_insn "mmx_andnot<mode>3"
    (set_attr "mode" "DI,TI,TI,TI")])
 
 (define_insn "*andnot<mode>3"
-  [(set (match_operand:VI_32 0 "register_operand" "=x,x,v")
-       (and:VI_32
-         (not:VI_32 (match_operand:VI_32 1 "register_operand" "0,x,v"))
-         (match_operand:VI_32 2 "register_operand" "x,x,v")))]
-  "TARGET_SSE2"
-  "@
-   pandn\t{%2, %0|%0, %2}
-   vpandn\t{%2, %1, %0|%0, %1, %2}
-   vpandnd\t{%2, %1, %0|%0, %1, %2}"
-  [(set_attr "isa" "noavx,avx,avx512vl")
-   (set_attr "type" "sselog")
-   (set_attr "mode" "TI")])
-
-(define_insn "*andnotv2qi3"
-  [(set (match_operand:V2QI 0 "register_operand" "=&r,r,x,x,v")
-        (and:V2QI
-         (not:V2QI (match_operand:V2QI 1 "register_operand" "0,r,0,x,v"))
-         (match_operand:V2QI 2 "register_operand" "r,r,x,x,v")))
+  [(set (match_operand:VI_16_32 0 "register_operand" "=?&r,?r,x,x,v")
+        (and:VI_16_32
+         (not:VI_16_32
+           (match_operand:VI_16_32 1 "register_operand" "0,r,0,x,v"))
+         (match_operand:VI_16_32 2 "register_operand" "r,r,x,x,v")))
    (clobber (reg:CC FLAGS_REG))]
   ""
   "#"
    (set_attr "mode" "SI,SI,TI,TI,TI")])
 
 (define_split
-  [(set (match_operand:V2QI 0 "general_reg_operand")
-        (and:V2QI
-         (not:V2QI (match_operand:V2QI 1 "general_reg_operand"))
-         (match_operand:V2QI 2 "general_reg_operand")))
+  [(set (match_operand:VI_16_32 0 "general_reg_operand")
+        (and:VI_16_32
+         (not:VI_16_32 (match_operand:VI_16_32 1 "general_reg_operand"))
+         (match_operand:VI_16_32 2 "general_reg_operand")))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_BMI && reload_completed"
   [(parallel
           (and:SI (not:SI (match_dup 1)) (match_dup 2)))
       (clobber (reg:CC FLAGS_REG))])]
 {
-  operands[2] = gen_lowpart (SImode, operands[2]);
-  operands[1] = gen_lowpart (SImode, operands[1]);
-  operands[0] = gen_lowpart (SImode, operands[0]);
+  operands[2] = lowpart_subreg (SImode, operands[2], <MODE>mode);
+  operands[1] = lowpart_subreg (SImode, operands[1], <MODE>mode);
+  operands[0] = lowpart_subreg (SImode, operands[0], <MODE>mode);
 })
 
 (define_split
-  [(set (match_operand:V2QI 0 "general_reg_operand")
-        (and:V2QI
-         (not:V2QI (match_operand:V2QI 1 "general_reg_operand"))
-         (match_operand:V2QI 2 "general_reg_operand")))
+  [(set (match_operand:VI_16_32 0 "general_reg_operand")
+        (and:VI_16_32
+         (not:VI_16_32 (match_operand:VI_16_32 1 "general_reg_operand"))
+         (match_operand:VI_16_32 2 "general_reg_operand")))
    (clobber (reg:CC FLAGS_REG))]
   "!TARGET_BMI && reload_completed"
   [(set (match_dup 0)
           (and:SI (match_dup 0) (match_dup 2)))
       (clobber (reg:CC FLAGS_REG))])]
 {
-  operands[2] = gen_lowpart (SImode, operands[2]);
-  operands[1] = gen_lowpart (SImode, operands[1]);
-  operands[0] = gen_lowpart (SImode, operands[0]);
+  operands[2] = lowpart_subreg (SImode, operands[2], <MODE>mode);
+  operands[1] = lowpart_subreg (SImode, operands[1], <MODE>mode);
+  operands[0] = lowpart_subreg (SImode, operands[0], <MODE>mode);
 })
 
 (define_split
-  [(set (match_operand:V2QI 0 "sse_reg_operand")
-        (and:V2QI
-         (not:V2QI (match_operand:V2QI 1 "sse_reg_operand"))
-         (match_operand:V2QI 2 "sse_reg_operand")))
+  [(set (match_operand:VI_16_32 0 "sse_reg_operand")
+        (and:VI_16_32
+         (not:VI_16_32 (match_operand:VI_16_32 1 "sse_reg_operand"))
+         (match_operand:VI_16_32 2 "sse_reg_operand")))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_SSE2 && reload_completed"
   [(set (match_dup 0)
-       (and:V4QI (not:V4QI (match_dup 1)) (match_dup 2)))]
+       (and:V16QI (not:V16QI (match_dup 1)) (match_dup 2)))]
 {
-  operands[2] = gen_lowpart (V4QImode, operands[2]);
-  operands[1] = gen_lowpart (V4QImode, operands[1]);
-  operands[0] = gen_lowpart (V4QImode, operands[0]);
+  operands[2] = lowpart_subreg (V16QImode, operands[2], <MODE>mode);
+  operands[1] = lowpart_subreg (V16QImode, operands[1], <MODE>mode);
+  operands[0] = lowpart_subreg (V16QImode, operands[0], <MODE>mode);
 })
 
 (define_expand "mmx_<code><mode>3"
    (set_attr "mode" "DI,TI,TI,TI")])
 
 (define_insn "<code><mode>3"
-  [(set (match_operand:VI_32 0 "register_operand" "=x,x,v")
-        (any_logic:VI_32
-         (match_operand:VI_32 1 "register_operand" "%0,x,v")
-         (match_operand:VI_32 2 "register_operand" "x,x,v")))]
-  "TARGET_SSE2"
-  "@
-   p<logic>\t{%2, %0|%0, %2}
-   vp<logic>\t{%2, %1, %0|%0, %1, %2}
-   vp<logic>d\t{%2, %1, %0|%0, %1, %2}"
-  [(set_attr "isa" "noavx,avx,avx512vl")
-   (set_attr "type" "sselog")
-   (set_attr "mode" "TI")])
-
-(define_insn "<code>v2qi3"
-  [(set (match_operand:V2QI 0 "register_operand" "=r,x,x,v")
-        (any_logic:V2QI
-         (match_operand:V2QI 1 "register_operand" "%0,0,x,v")
-         (match_operand:V2QI 2 "register_operand" "r,x,x,v")))
+  [(set (match_operand:VI_16_32 0 "register_operand" "=?r,x,x,v")
+        (any_logic:VI_16_32
+         (match_operand:VI_16_32 1 "register_operand" "%0,0,x,v")
+         (match_operand:VI_16_32 2 "register_operand" "r,x,x,v")))
    (clobber (reg:CC FLAGS_REG))]
   ""
   "#"
    (set_attr "mode" "SI,TI,TI,TI")])
 
 (define_split
-  [(set (match_operand:V2QI 0 "general_reg_operand")
-        (any_logic:V2QI
-         (match_operand:V2QI 1 "general_reg_operand")
-         (match_operand:V2QI 2 "general_reg_operand")))
+  [(set (match_operand:VI_16_32 0 "general_reg_operand")
+        (any_logic:VI_16_32
+         (match_operand:VI_16_32 1 "general_reg_operand")
+         (match_operand:VI_16_32 2 "general_reg_operand")))
    (clobber (reg:CC FLAGS_REG))]
   "reload_completed"
   [(parallel
           (any_logic:SI (match_dup 1) (match_dup 2)))
       (clobber (reg:CC FLAGS_REG))])]
 {
-  operands[2] = gen_lowpart (SImode, operands[2]);
-  operands[1] = gen_lowpart (SImode, operands[1]);
-  operands[0] = gen_lowpart (SImode, operands[0]);
+  operands[2] = lowpart_subreg (SImode, operands[2], <MODE>mode);
+  operands[1] = lowpart_subreg (SImode, operands[1], <MODE>mode);
+  operands[0] = lowpart_subreg (SImode, operands[0], <MODE>mode);
 })
 
 (define_split
-  [(set (match_operand:V2QI 0 "sse_reg_operand")
-        (any_logic:V2QI
-         (match_operand:V2QI 1 "sse_reg_operand")
-         (match_operand:V2QI 2 "sse_reg_operand")))
+  [(set (match_operand:VI_16_32 0 "sse_reg_operand")
+        (any_logic:VI_16_32
+         (match_operand:VI_16_32 1 "sse_reg_operand")
+         (match_operand:VI_16_32 2 "sse_reg_operand")))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_SSE2 && reload_completed"
   [(set (match_dup 0)
-       (any_logic:V4QI (match_dup 1) (match_dup 2)))]
+       (any_logic:V16QI (match_dup 1) (match_dup 2)))]
 {
-  operands[2] = gen_lowpart (V4QImode, operands[2]);
-  operands[1] = gen_lowpart (V4QImode, operands[1]);
-  operands[0] = gen_lowpart (V4QImode, operands[0]);
+  operands[2] = lowpart_subreg (V16QImode, operands[2], <MODE>mode);
+  operands[1] = lowpart_subreg (V16QImode, operands[1], <MODE>mode);
+  operands[0] = lowpart_subreg (V16QImode, operands[0], <MODE>mode);
 })
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index d602ac08b4d7dcfa5157b60cb5000fd49d2ae540..35b5df7c9dde705709fe2100f1c43468d1ae8240 100644 (file)
@@ -1,6 +1,6 @@
 /* PR target/100637 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -msse4" } */
+/* { dg-options "-O2 -msse2" } */
 
 typedef unsigned char __attribute__((__vector_size__ (4))) __v4qu;
 typedef char __attribute__((__vector_size__ (4))) __v4qi;
index c60564548978b293c423b80fbcddd11bf2e74c11..a3ed06fddee1aceddca20afce3456516c187022e 100644 (file)
@@ -1,6 +1,6 @@
 /* PR target/100637 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -msse4" } */
+/* { dg-options "-O2 -msse2" } */
 
 typedef unsigned short __attribute__((__vector_size__ (4))) __v2hu;
 typedef short __attribute__((__vector_size__ (4))) __v2hi;
index 940c939e04fc2bef0c515a45c5adaab5c65f39f1..6475728991e7ee09ea336926a02779e3543706c0 100644 (file)
@@ -1,6 +1,6 @@
 /* PR target/103861 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -msse4" } */
+/* { dg-options "-O2 -msse2" } */
 
 typedef unsigned char __attribute__((__vector_size__ (2))) __v2qu;
 typedef char __attribute__((__vector_size__ (2))) __v2qi;
index 3e7445ad9bbc39e2eaf1e11815f0b9fff75b5ec7..f5b1c122a6502368911b4493ef6f75cd1bba035b 100644 (file)
@@ -5,17 +5,14 @@
 typedef char __v4qi __attribute__ ((__vector_size__ (4)));
 
 __v4qi and (__v4qi a, __v4qi b) { return a & b; };
-/* { dg-final { scan-assembler "andv4qi3" } } */
 
 __v4qi andn (__v4qi a, __v4qi b) { return a & ~b; };
-/* { dg-final { scan-assembler "andnotv4qi3" } } */
 
 __v4qi or  (__v4qi a, __v4qi b) { return a | b; };
-/* { dg-final { scan-assembler "iorv4qi3" } } */
 
 __v4qi xor  (__v4qi a, __v4qi b) { return a ^ b; };
+
 __v4qi not  (__v4qi a) { return ~a; };
-/* { dg-final { scan-assembler-times "xorv4qi3" 2 } } */
 
 __v4qi plus  (__v4qi a, __v4qi b) { return a + b; };
 /* { dg-final { scan-assembler "addv4qi3" } } */
index fe6964044b6f7505353fb41f4df68059fb912efc..5f2798878af6f1785541a5cf2e1fcc0faffa66ae 100644 (file)
@@ -6,17 +6,14 @@ typedef short __v2hi __attribute__ ((__vector_size__ (4)));
 typedef unsigned short __v2hu __attribute__ ((__vector_size__ (4)));
 
 __v2hi and (__v2hi a, __v2hi b) { return a & b; };
-/* { dg-final { scan-assembler "andv2hi3" } } */
 
 __v2hi andn (__v2hi a, __v2hi b) { return a & ~b; };
-/* { dg-final { scan-assembler "andnotv2hi3" } } */
 
 __v2hi or  (__v2hi a, __v2hi b) { return a | b; };
-/* { dg-final { scan-assembler "iorv2hi3" } } */
 
 __v2hi xor  (__v2hi a, __v2hi b) { return a ^ b; };
+
 __v2hi not  (__v2hi a) { return ~a; };
-/* { dg-final { scan-assembler-times "xorv2hi3" 2 } } */
 
 __v2hi plus  (__v2hi a, __v2hi b) { return a + b; };
 /* { dg-final { scan-assembler "addv2hi3" } } */
index add4506e4c1f0766653efd1c42b5ea0385cd301c..198e3dd3352558d4db03a52c02bd1f0959876cf5 100644 (file)
@@ -1,6 +1,6 @@
 /* PR target/100637 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-vectorize -msse4" } */
+/* { dg-options "-O2 -ftree-vectorize -msse2" } */
 
 typedef char T;
 
index 54c1859b0279a7317c9ab7ae3e712acbc3b56821..54333697316c103018cf202c230c81d2f298a3ea 100644 (file)
@@ -1,6 +1,6 @@
 /* PR target/100637 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-vectorize -msse4" } */
+/* { dg-options "-O2 -ftree-vectorize -msse2" } */
 
 typedef char T;
 
index 4560f7070bbb4e198e84163e678d78e919871941..5e378b6bd043eb1afcbfd6fcde359b5efc6e7b3f 100644 (file)
@@ -14,7 +14,7 @@ int main (int argc, char *argv[])
     v0 + v1,              /* { dg-warning "expanded piecewise" }  */
     v0 - v1,              /* { dg-warning "expanded piecewise" }  */
     v0 > v1,              /* { dg-warning "expanded piecewise" }  */
-    v0 & v1,              /* { dg-warning "expanded piecewise" }  */
+    v0 & v1,              /* { dg-warning "expanded in parallel" }  */
     __builtin_shuffle (v0, v1),        /* { dg-warning "expanded piecewise" }  */
     __builtin_shuffle (v0, v1, v1)     /* { dg-warning "expanded piecewise" }  */
   };