]> git.pld-linux.org Git - packages/gcc.git/blame - gcc-pr25180.patch
- fix target bug on ppc (and kernel build too).
[packages/gcc.git] / gcc-pr25180.patch
CommitLineData
d56c4166
PS
12005-11-30 Paolo Bonzini <bonzini@gnu.org>
2
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
7 logical_const_operand.
8
9--- gcc/gcc/config/rs6000/predicates.md (revision 107455)
10+++ gcc/gcc/config/rs6000/predicates.md (working copy)
11@@ -411,16 +411,13 @@
12 (match_test "!CONST_OK_FOR_LETTER_P (INTVAL (op), 'I')
13 && !CONST_OK_FOR_LETTER_P (INTVAL (op), 'L')")))
14
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
20+;; of an OR or XOR.
21+(define_predicate "logical_const_operand"
22+ (match_code "const_int,const_double")
23 {
24 HOST_WIDE_INT opl, oph;
25
26- if (gpc_reg_operand (op, mode))
27- return 1;
28-
29 if (GET_CODE (op) == CONST_INT)
30 {
31 opl = INTVAL (op) & GET_MODE_MASK (mode);
32@@ -445,7 +442,13 @@
33 || (opl & ~ (unsigned HOST_WIDE_INT) 0xffff0000) == 0);
34 })
35
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")))
41+
42 ;; Return 1 if op is a constant that is not a logical operand, but could
43 ;; be split into one.
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 @@
49
50 (define_peephole2
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"
55 [(match_dup 0)
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" "")
60 (match_dup 0)))
This page took 0.034407 seconds and 4 git commands to generate.