------- Comment #19 from dorit at il dot ibm dot com  2007-06-29 16:46 -------
testing this patch for Altivec:

Index: config/rs6000/altivec.md
===================================================================
*** config/rs6000/altivec.md    (revision 126053)
--- config/rs6000/altivec.md    (working copy)
***************
*** 147,152 ****
--- 147,156 ----
     (UNSPEC_VPERMHI    321)
     (UNSPEC_INTERHI      322)
     (UNSPEC_INTERLO      323)
+    (UNSPEC_VUPKHS_V4SF   324)
+    (UNSPEC_VUPKLS_V4SF   325)
+    (UNSPEC_VUPKHU_V4SF   326)
+    (UNSPEC_VUPKLU_V4SF   327)
  ])

  (define_constants
***************
*** 2933,2935 ****
--- 2937,2995 ----
    emit_insn (gen_altivec_vmrgl<VI_char> (operands[0], operands[1],
operands[2]));
    DONE;
  }")
+
+ (define_expand "vec_unpacks_float_hi_v8hi"
+  [(set (match_operand:V4SF 0 "register_operand" "")
+         (unspec:V4SF [(match_operand:V8HI 1 "register_operand" "")]
+                      UNSPEC_VUPKHS_V4SF))]
+   "TARGET_ALTIVEC"
+   "
+ {
+   rtx tmp = gen_reg_rtx (V4SImode);
+
+   emit_insn (gen_vec_unpacks_hi_v8hi (tmp, operands[1]));
+   emit_insn (gen_altivec_vcfsx (operands[0], tmp, const0_rtx));
+   DONE;
+ }")
+
+ (define_expand "vec_unpacks_float_lo_v8hi"
+  [(set (match_operand:V4SF 0 "register_operand" "")
+         (unspec:V4SF [(match_operand:V8HI 1 "register_operand" "")]
+                      UNSPEC_VUPKLS_V4SF))]
+   "TARGET_ALTIVEC"
+   "
+ {
+   rtx tmp = gen_reg_rtx (V4SImode);
+
+   emit_insn (gen_vec_unpacks_lo_v8hi (tmp, operands[1]));
+   emit_insn (gen_altivec_vcfsx (operands[0], tmp, const0_rtx));
+   DONE;
+ }")
+
+ (define_expand "vec_unpacku_float_hi_v8hi"
+  [(set (match_operand:V4SF 0 "register_operand" "")
+         (unspec:V4SF [(match_operand:V8HI 1 "register_operand" "")]
+                      UNSPEC_VUPKHU_V4SF))]
+   "TARGET_ALTIVEC"
+   "
+ {
+   rtx tmp = gen_reg_rtx (V4SImode);
+
+   emit_insn (gen_vec_unpacku_hi_v8hi (tmp, operands[1]));
+   emit_insn (gen_altivec_vcfux (operands[0], tmp, const0_rtx));
+   DONE;
+ }")
+
+ (define_expand "vec_unpacku_float_lo_v8hi"
+  [(set (match_operand:V4SF 0 "register_operand" "")
+         (unspec:V4SF [(match_operand:V8HI 1 "register_operand" "")]
+                      UNSPEC_VUPKLU_V4SF))]
+   "TARGET_ALTIVEC"
+   "
+ {
+   rtx tmp = gen_reg_rtx (V4SImode);
+
+   emit_insn (gen_vec_unpacku_lo_v8hi (tmp, operands[1]));
+   emit_insn (gen_altivec_vcfux (operands[0], tmp, const0_rtx));
+   DONE;
+ }")


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24659

Reply via email to