summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-08 23:42:06 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-08 23:42:06 +0000
commitbdd661e0f320faf78ce306860817d65a7700ef0c (patch)
tree750745dc1f7a0a46ca626e431462df26a80c62ee
parent8063e5585821f56bf97ab509d7bd00cbdccc153a (diff)
downloadgcc-bdd661e0f320faf78ce306860817d65a7700ef0c.tar.gz
PR target/20814
* config/rs6000/predicates.md (altivec_register_operand): Accept SUBREG. (and64_operand): Do not limit CONST_INT to mask64_operand. (and64_2_operand): Do not limit CONST_INT to mask64_1or2_operand. (and_operand): Do not limit CONST_INT to mask_operand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97872 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/rs6000/predicates.md36
2 files changed, 27 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3f99ac1b203..269275c3ee5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2005-04-08 David Edelsohn <edelsohn@gnu.org>
+
+ PR target/20814
+ * config/rs6000/predicates.md (altivec_register_operand): Accept
+ SUBREG.
+ (and64_operand): Do not limit CONST_INT to mask64_operand.
+ (and64_2_operand): Do not limit CONST_INT to mask64_1or2_operand.
+ (and_operand): Do not limit CONST_INT to mask_operand.
+
2005-04-09 Hans-Peter Nilsson <hp@axis.com>
PR rtl-optimization/20466
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index b8757a1fe6a..e29297a0faf 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -34,9 +34,11 @@
;; Return 1 if op is an Altivec register.
(define_predicate "altivec_register_operand"
- (and (match_code "reg")
- (match_test "ALTIVEC_REGNO_P (REGNO (op))
- || REGNO (op) > LAST_VIRTUAL_REGISTER")))
+ (and (match_code "reg,subreg")
+ (and (match_operand 0 "register_operand")
+ (match_test "GET_CODE (op) != REG
+ || ALTIVEC_REGNO_P (REGNO (op))
+ || REGNO (op) > LAST_VIRTUAL_REGISTER"))))
;; Return 1 if op is XER register.
(define_predicate "xer_operand"
@@ -531,29 +533,27 @@
;; Return 1 if the operand is either a non-special register or a constant
;; that can be used as the operand of a PowerPC64 logical AND insn.
(define_predicate "and64_operand"
- (if_then_else (match_code "const_int")
- (match_operand 0 "mask64_operand")
- (if_then_else (match_test "fixed_regs[CR0_REGNO]")
- (match_operand 0 "gpc_reg_operand")
- (match_operand 0 "logical_operand"))))
+ (ior (match_operand 0 "mask64_operand")
+ (if_then_else (match_test "fixed_regs[CR0_REGNO]")
+ (match_operand 0 "gpc_reg_operand")
+ (match_operand 0 "logical_operand"))))
;; Like and64_operand, but also match constants that can be implemented
;; with two rldicl or rldicr insns.
(define_predicate "and64_2_operand"
- (if_then_else (match_code "const_int")
- (match_test "mask64_1or2_operand (op, mode, true)")
- (if_then_else (match_test "fixed_regs[CR0_REGNO]")
- (match_operand 0 "gpc_reg_operand")
- (match_operand 0 "logical_operand"))))
+ (ior (and (match_code "const_int")
+ (match_test "mask64_1or2_operand (op, mode, true)"))
+ (if_then_else (match_test "fixed_regs[CR0_REGNO]")
+ (match_operand 0 "gpc_reg_operand")
+ (match_operand 0 "logical_operand"))))
;; Return 1 if the operand is either a non-special register or a
;; constant that can be used as the operand of a logical AND.
(define_predicate "and_operand"
- (if_then_else (match_code "const_int")
- (match_operand 0 "mask_operand")
- (if_then_else (match_test "fixed_regs[CR0_REGNO]")
- (match_operand 0 "gpc_reg_operand")
- (match_operand 0 "logical_operand"))))
+ (ior (match_operand 0 "mask_operand")
+ (if_then_else (match_test "fixed_regs[CR0_REGNO]")
+ (match_operand 0 "gpc_reg_operand")
+ (match_operand 0 "logical_operand"))))
;; Return 1 if the operand is a general non-special register or memory operand.
(define_predicate "reg_or_mem_operand"