re PR rtl-optimization/66156 ([msp430] wrong code generated with -O2 -mlarge (zero...
authorNick Clifton <nickc@gcc.gnu.org>
Tue, 19 May 2015 11:42:44 +0000 (11:42 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Tue, 19 May 2015 11:42:44 +0000 (11:42 +0000)
PR target/66156
* config/msp430/msp430.md (zero_extendhisi2): Add support for
separate source and destination registers.

From-SVN: r223354

gcc/ChangeLog
gcc/config/msp430/msp430.md

index ed64b470784a9e1ce68eb2492afc02dc4041cfa4..2f90beaa2a9feabd062169c7a7ebdd82468aeeb7 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-19  Nick Clifton  <nickc@redhat.com>
+
+       PR target/66156
+       * config/msp430/msp430.md (zero_extendhisi2): Add support for
+       separate source and destination registers.
+
 2015-05-19  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/66165
@@ -32,7 +38,7 @@
        * calls.c: Always define STACK_GROWS_DOWNWARD as 0 or 1.
        (mem_overlaps_already_clobbered_arg_p): Rewrite ifdef
        STACK_GROWS_DOWNWARD as normal if.
-       (expand_call): Likewise. 
+       (expand_call): Likewise.
 
 2015-05-19  Oleg Endo  <olegendo@gcc.gnu.org>
 
index 91742fc38b5ed2d4c0933d3d8d55a9ff63dccd78..64fdc459b784ab839dea5d24853a6859cc761244 100644 (file)
 ;; patterns.  Doing these manually allows for alternate optimization
 ;; paths.
 (define_insn "zero_extendhisi2"
-  [(set (match_operand:SI 0 "nonimmediate_operand" "=rm")
-       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0")))]
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=rm,r")
+       (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0,r")))]
   "msp430x"
-  "MOV.W\t#0,%H0"
+  "@
+  MOV.W\t#0,%H0
+  MOV.W\t%1,%L0 { MOV.W\t#0,%H0"
 )
 
 (define_insn "zero_extendhisipsi2"