This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Commit: MSP430: Enhance the zero_extendhisi2 pattern
- From: Nick Clifton <nickc at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 May 2015 12:42:26 +0100
- Subject: Commit: MSP430: Enhance the zero_extendhisi2 pattern
- Authentication-results: sourceware.org; auth=none
Hi Guys,
I am applying the patch below to enhance the zero_extendhisi2 pattern
in the MSP430 backend so that it can cope with separate source and
destination registers. This makes zero extending into another
register more efficient and it also helps to work around a reload bug
reported in PR 66156.
Cheers
Nick
gcc/ChangeLog
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.
Index: gcc/config/msp430/msp430.md
===================================================================
--- gcc/config/msp430/msp430.md (revision 223348)
+++ gcc/config/msp430/msp430.md (working copy)
@@ -588,10 +588,12 @@
;; 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"