1 2005-11-30 Paolo Bonzini <bonzini@gnu.org>
3 * config/rs6000/predicates.md (logical_const_operand): Split
4 out of logical_operand.
5 (logical_operand): Use it.
6 * config/rs6000/rs6000.md (cmp -> xor peephole2): Use
9 --- gcc/gcc/config/rs6000/predicates.md (revision 107455)
10 +++ gcc/gcc/config/rs6000/predicates.md (working copy)
12 (match_test "!CONST_OK_FOR_LETTER_P (INTVAL (op), 'I')
13 && !CONST_OK_FOR_LETTER_P (INTVAL (op), 'L')")))
15 -;; Return 1 if the operand is a non-special register or a constant that
16 -;; can be used as the operand of an OR or XOR.
17 -(define_predicate "logical_operand"
18 - (match_code "reg,subreg,const_int,const_double")
19 +;; Return 1 if the operand is a constant that can be used as the operand
21 +(define_predicate "logical_const_operand"
22 + (match_code "const_int,const_double")
24 HOST_WIDE_INT opl, oph;
26 - if (gpc_reg_operand (op, mode))
29 if (GET_CODE (op) == CONST_INT)
31 opl = INTVAL (op) & GET_MODE_MASK (mode);
33 || (opl & ~ (unsigned HOST_WIDE_INT) 0xffff0000) == 0);
36 +;; Return 1 if the operand is a non-special register or a constant that
37 +;; can be used as the operand of an OR or XOR.
38 +(define_predicate "logical_operand"
39 + (ior (match_operand 0 "gpc_reg_operand")
40 + (match_operand 0 "logical_const_operand")))
42 ;; Return 1 if op is a constant that is not a logical operand, but could
44 (define_predicate "non_logical_cint_operand"
45 (and (match_code "const_int,const_double")
46 --- gcc/gcc/config/rs6000/rs6000.md (revision 107455)
47 +++ gcc/gcc/config/rs6000/rs6000.md (working copy)
48 @@ -11283,10 +11283,10 @@
51 [(set (match_operand:SI 0 "register_operand")
52 - (match_operand:SI 1 "logical_operand" ""))
53 + (match_operand:SI 1 "logical_const_operand" ""))
54 (set (match_dup 0) (match_operator:SI 3 "boolean_or_operator"
56 - (match_operand:SI 2 "logical_operand" "")]))
57 + (match_operand:SI 2 "logical_const_operand" "")]))
58 (set (match_operand:CC 4 "cc_reg_operand" "")
59 (compare:CC (match_operand:SI 5 "gpc_reg_operand" "")