diff options
-rw-r--r-- | gcc/ChangeLog.meissner | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/predicates.md | 3 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 12 |
3 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner index c76fcfffdad..92f48dba755 100644 --- a/gcc/ChangeLog.meissner +++ b/gcc/ChangeLog.meissner @@ -1,3 +1,10 @@ +2019-11-27 Michael Meissner <meissner@linux.ibm.com> + + * config/rs6000/predicates.md (add_operand): Allow constants that + satisfy the eI constraint. + * config/rs6000/rs6000.md (add<mode>3, GPR iterator): Add support + for PADDI. + 2019-11-27 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/rs6000.md (movsi_internal): Add alternative to diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index 42c41b32305..718ddc45f95 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -839,7 +839,8 @@ (define_predicate "add_operand" (if_then_else (match_code "const_int") (match_test "satisfies_constraint_I (op) - || satisfies_constraint_L (op)") + || satisfies_constraint_L (op) + || satisfies_constraint_eI (op)") (match_operand 0 "gpc_reg_operand"))) ;; Return 1 if the operand is either a non-special register, or 0, or -1. diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 22a70f033db..2308f0ad6ef 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -1761,15 +1761,17 @@ }) (define_insn "*add<mode>3" - [(set (match_operand:GPR 0 "gpc_reg_operand" "=r,r,r") - (plus:GPR (match_operand:GPR 1 "gpc_reg_operand" "%r,b,b") - (match_operand:GPR 2 "add_operand" "r,I,L")))] + [(set (match_operand:GPR 0 "gpc_reg_operand" "=r,r,r,r") + (plus:GPR (match_operand:GPR 1 "gpc_reg_operand" "%r,b,b,b") + (match_operand:GPR 2 "add_operand" "r,I,L,eI")))] "" "@ add %0,%1,%2 addi %0,%1,%2 - addis %0,%1,%v2" - [(set_attr "type" "add")]) + addis %0,%1,%v2 + addi %0,%1,%2" + [(set_attr "type" "add") + (set_attr "isa" "*,*,*,fut")]) (define_insn "*addsi3_high" [(set (match_operand:SI 0 "gpc_reg_operand" "=b") |