re PR target/78166 (hash.c:1887:1: error: unrecognizable insn)

PR target/78166
	* config/pa/pa.md: Add new shift/add patterns to handle
	(plus (mult (reg) (mem_shadd_operand)) (reg)) source operand.

From-SVN: r241749
This commit is contained in:
John David Anglin 2016-11-01 18:15:57 +00:00
parent ad89d820bf
commit e592dd625d
2 changed files with 36 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2016-11-01 John David Anglin <danglin@gcc.gnu.org>
PR target/78166
* config/pa/pa.md: Add new shift/add patterns to handle
(plus (mult (reg) (mem_shadd_operand)) (reg)) source operand.
2016-11-01 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/xtensa-protos.h

View file

@ -6248,6 +6248,21 @@
[(set_attr "type" "binary")
(set_attr "length" "4")])
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r")
(plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r")
(match_operand:SI 3 "mem_shadd_operand" ""))
(match_operand:SI 1 "register_operand" "r")))]
""
"*
{
int shift_val = exact_log2 (INTVAL (operands[3]));
operands[3] = GEN_INT (shift_val);
return \"{sh%o3addl %2,%1,%0|shladd,l %2,%o3,%1,%0}\";
}"
[(set_attr "type" "binary")
(set_attr "length" "4")])
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=r")
(plus:DI (ashift:DI (match_operand:DI 2 "register_operand" "r")
@ -6258,6 +6273,21 @@
[(set_attr "type" "binary")
(set_attr "length" "4")])
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=r")
(plus:DI (mult:DI (match_operand:DI 2 "register_operand" "r")
(match_operand:DI 3 "mem_shadd_operand" ""))
(match_operand:DI 1 "register_operand" "r")))]
"TARGET_64BIT"
"*
{
int shift_val = exact_log2 (INTVAL (operands[3]));
operands[3] = GEN_INT (shift_val);
return \"shladd,l %2,%o3,%1,%0\";
}"
[(set_attr "type" "binary")
(set_attr "length" "4")])
(define_expand "ashlsi3"
[(set (match_operand:SI 0 "register_operand" "")
(ashift:SI (match_operand:SI 1 "lhs_lshift_operand" "")