This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Implement vector shift left for Altivec


Hi,

This patch implements vector shift left for Altivec, fixing
gcc.dg/vect/pr33953.c failure to vectorize the loop on powerpc.

Bootstrapped with vectorization enabled and tested on ppc-linux.
O.K. for mainline?

Thanks,
Ira

ChangeLog:

      * config/rs6000/altivec.md (ashl<mode>3): Implement.


Index: config/rs6000/altivec.md
===================================================================
--- config/rs6000/altivec.md    (revision 132472)
+++ config/rs6000/altivec.md    (working copy)
@@ -1264,6 +1264,14 @@
   "vsra<VI_char> %0,%1,%2"
   [(set_attr "type" "vecsimple")])

+(define_insn "ashl<mode>3"
+  [(set (match_operand:VI 0 "register_operand" "=v")
+        (ashift:VI (match_operand:VI 1 "register_operand" "v")
+                   (match_operand:VI 2 "register_operand" "v") ))]
+  "TARGET_ALTIVEC"
+  "vsl<VI_char> %0,%1,%2"
+  [(set_attr "type" "vecsimple")])
+
 (define_insn "altivec_vsr"
   [(set (match_operand:V4SI 0 "register_operand" "=v")
         (unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]