This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix HImode add pattern on PA
- From: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 5 Oct 2012 17:13:41 -0400
- Subject: [committed] Fix HImode add pattern on PA
- Reply-to: John David Anglin <dave dot anglin at nrc-cnrc dot gc dot ca>
The attached change fixes a reload failure encountered testing another
change. It occurred for a constant that didn't match the "J" constraint.
The change makes the HImode pattern the same as the corresponding SImode
pattern.
Tested on hppa-unknown-linux-gn, hppa2.0w-hp-hpux11.11 and
hppa64-hp-hpux11.11. Committed to 4.6, 4.7 and trunk.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2012-10-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* config/pa/pa.md: Adjust unamed HImode addition insn pattern.
Index: config/pa/pa.md
===================================================================
--- config/pa/pa.md (revision 191943)
+++ config/pa/pa.md (working copy)
@@ -2881,15 +2881,17 @@
[(set_attr "type" "store")
(set_attr "length" "4")])
-(define_insn ""
- [(set (match_operand:HI 0 "register_operand" "=r")
- (plus:HI (match_operand:HI 1 "register_operand" "r")
- (match_operand 2 "const_int_operand" "J")))]
+(define_insn "addhi3"
+ [(set (match_operand:HI 0 "register_operand" "=r,r")
+ (plus:HI (match_operand:HI 1 "register_operand" "%r,r")
+ (match_operand:HI 2 "arith14_operand" "r,J")))]
""
- "ldo %2(%1),%0"
- [(set_attr "type" "binary")
+ "@
+ {addl|add,l} %1,%2,%0
+ ldo %2(%1),%0"
+ [(set_attr "type" "binary,binary")
(set_attr "pa_combine_type" "addmove")
- (set_attr "length" "4")])
+ (set_attr "length" "4,4")])
(define_expand "movqi"
[(set (match_operand:QI 0 "general_operand" "")