aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2011-05-25 16:19:36 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2011-05-25 09:19:36 -0700
commit521ca78e26d4d145ca629221ddb24e771a86ef1d (patch)
treef4bd254ec77c9ebc3c6a1081b405398967bb2295
parent29f8b8449c6aafc8e6633871fd8783d61d5dcb04 (diff)
downloadgcc-521ca78e26d4d145ca629221ddb24e771a86ef1d.zip
gcc-521ca78e26d4d145ca629221ddb24e771a86ef1d.tar.gz
gcc-521ca78e26d4d145ca629221ddb24e771a86ef1d.tar.bz2
Replace q_regs_operand with QIreg_operand in QI ext patterns.
2011-05-25 H.J. Lu <hongjiu.lu@intel.com> PR target/49142 * config/i386/i386.md (*movqi_extv_1_rex64): Remove "register_operand" check and replace q_regs_operand with QIreg_operand in "type" calculation. (*movqi_extv_1): Likewise. (*movqi_extzv_2_rex64): Likewise. (*movqi_extzv_2): Likewise. * config/i386/predicates.md (QIreg_operand): New. From-SVN: r174211
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/i386/i386.md23
-rw-r--r--gcc/config/i386/predicates.md4
3 files changed, 26 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a22c5d5..620acbb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2011-05-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/49142
+ * config/i386/i386.md (*movqi_extv_1_rex64): Remove
+ "register_operand" check and replace q_regs_operand with
+ QIreg_operand in "type" calculation.
+ (*movqi_extv_1): Likewise.
+ (*movqi_extzv_2_rex64): Likewise.
+ (*movqi_extzv_2): Likewise.
+
+ * config/i386/predicates.md (QIreg_operand): New.
+
2011-05-25 Richard Guenther <rguenther@suse.de>
* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Fix
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 801573c..1cdbe7e 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -2488,10 +2488,9 @@
}
}
[(set (attr "type")
- (if_then_else (and (match_operand:QI 0 "register_operand" "")
- (ior (not (match_operand:QI 0 "q_regs_operand" ""))
- (ne (symbol_ref "TARGET_MOVX")
- (const_int 0))))
+ (if_then_else (ior (not (match_operand:QI 0 "QIreg_operand" ""))
+ (ne (symbol_ref "TARGET_MOVX")
+ (const_int 0)))
(const_string "imovx")
(const_string "imov")))
(set (attr "mode")
@@ -2515,10 +2514,9 @@
}
}
[(set (attr "type")
- (if_then_else (and (match_operand:QI 0 "register_operand" "")
- (ior (not (match_operand:QI 0 "q_regs_operand" ""))
- (ne (symbol_ref "TARGET_MOVX")
- (const_int 0))))
+ (if_then_else (ior (not (match_operand:QI 0 "QIreg_operand" ""))
+ (ne (symbol_ref "TARGET_MOVX")
+ (const_int 0)))
(const_string "imovx")
(const_string "imov")))
(set (attr "mode")
@@ -2553,7 +2551,7 @@
}
}
[(set (attr "type")
- (if_then_else (ior (not (match_operand:QI 0 "q_regs_operand" ""))
+ (if_then_else (ior (not (match_operand:QI 0 "QIreg_operand" ""))
(ne (symbol_ref "TARGET_MOVX")
(const_int 0)))
(const_string "imovx")
@@ -2580,10 +2578,9 @@
}
}
[(set (attr "type")
- (if_then_else (and (match_operand:QI 0 "register_operand" "")
- (ior (not (match_operand:QI 0 "q_regs_operand" ""))
- (ne (symbol_ref "TARGET_MOVX")
- (const_int 0))))
+ (if_then_else (ior (not (match_operand:QI 0 "QIreg_operand" ""))
+ (ne (symbol_ref "TARGET_MOVX")
+ (const_int 0)))
(const_string "imovx")
(const_string "imov")))
(set (attr "mode")
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 8a89f70..1471f5a 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -82,6 +82,10 @@
(and (match_code "reg")
(match_test "REGNO (op) == FLAGS_REG")))
+;; Return true if op is one of QImode registers: %[abcd][hl].
+(define_predicate "QIreg_operand"
+ (match_test "QI_REG_P (op)"))
+
;; Return true if op is a QImode register operand other than
;; %[abcd][hl].
(define_predicate "ext_QIreg_operand"