diff options
author | Michael Meissner <meissner@linux.ibm.com> | 2019-11-28 00:55:38 +0000 |
---|---|---|
committer | Michael Meissner <meissner@linux.ibm.com> | 2019-11-28 00:55:38 +0000 |
commit | b337363affee81845439f163feaa6fa0a430be7e (patch) | |
tree | c560d45d52619958abe6f12ccdb1e4f966c28554 | |
parent | e9c799779cfead621587e816b61d2195c0145ac9 (diff) |
Generate PADDI for 34-bit adds when -mcpu=future is used.ibm/pcrel-trunk
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.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ibm/pcrel-trunk@278798 138bc75d-0d04-0410-961f-82ee72b054a4
-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") |