]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
spu: Implement vec_permv16qi.
authorRichard Henderson <rth@redhat.com>
Fri, 14 Oct 2011 03:18:14 +0000 (20:18 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 14 Oct 2011 03:18:14 +0000 (20:18 -0700)
From-SVN: r179954

gcc/ChangeLog
gcc/config/spu/spu.md

index 2f0dfe058be629dd6e45a68afda9770252d20f13..9e34eca79091b73074e370c878af42f13b8d0f0f 100644 (file)
@@ -2,6 +2,8 @@
 
        * config/rs6000/altivec.md (vec_permv16qi): New pattern.
 
+       * config/rs6000/spu.md (vec_permv16qi): New pattern.
+
 2011-10-13  Jakub Jelinek  <jakub@redhat.com>
 
        * config/i386/sse.md (vec_set<mode>): Change V_128 iterator mode
index 676d54e8de0a340d38ed5f0ae924c6fcefe7f8be..00cfaa4be55e728e72a8433e3d1065748c1685cf 100644 (file)
@@ -4395,6 +4395,18 @@ selb\t%0,%4,%0,%3"
   "shufb\t%0,%1,%2,%3"
   [(set_attr "type" "shuf")])
 
+(define_expand "vec_permv16qi"
+  [(set (match_operand:V16QI 0 "spu_reg_operand" "")
+       (unspec:V16QI
+         [(match_operand:V16QI 1 "spu_reg_operand" "")
+          (match_operand:V16QI 2 "spu_reg_operand" "")
+          (match_operand:V16QI 3 "spu_reg_operand" "")]
+         UNSPEC_SHUFB))]
+  ""
+  {
+    operands[3] = gen_lowpart (TImode, operands[3]);
+  })
+
 (define_insn "nop"
   [(unspec_volatile [(const_int 0)] UNSPECV_NOP)]
   ""