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]

[bfin] Fix composev2hi


With this patch composev2hi pattern puts operands into vector with correct order, thus

__builtin_bfin_compose_2x16(X.im, X.re)

returns vector (X.re, X.im) instead of (X.im, X.re).

OK to commit?


Jie
	* config/bfin/bfin.md (composev2hi): Put operands into vector
	with correct order.

Index: gcc/config/bfin/bfin.md
===================================================================
--- gcc.orig/config/bfin/bfin.md	2007-08-24 16:53:16.000000000 +0800
+++ gcc/config/bfin/bfin.md	2007-08-24 16:53:27.000000000 +0800
@@ -2831,16 +2831,16 @@
 			 (match_operand:HI 1 "register_operand" "d,d")))]
   ""
   "@
-   %d0 = %h2 << 0%!
+   %d0 = %h1 << 0%!
    #"
   "reload_completed"
   [(set (match_dup 0)
 	(vec_concat:V2HI
 	 (vec_select:HI (match_dup 0) (parallel [(const_int 0)]))
-	 (match_dup 2)))
+	 (match_dup 1)))
    (set (match_dup 0)
 	(vec_concat:V2HI
-	 (match_dup 1)
+	 (match_dup 2)
 	 (vec_select:HI (match_dup 0) (parallel [(const_int 1)]))))]
   ""
   [(set_attr "type" "dsp32")])

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