This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[bfin] Fix composev2hi
- From: Jie Zhang <jzhang918 at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Bernd Schmidt <bernds_cb1 at t-online dot de>
- Date: Fri, 24 Aug 2007 17:17:48 +0800
- Subject: [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")])