From 521ca78e26d4d145ca629221ddb24e771a86ef1d Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 25 May 2011 16:19:36 +0000 Subject: [PATCH] Replace q_regs_operand with QIreg_operand in QI ext patterns. 2011-05-25 H.J. Lu 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 --- gcc/ChangeLog | 12 ++++++++++++ gcc/config/i386/i386.md | 23 ++++++++++------------- gcc/config/i386/predicates.md | 4 ++++ 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a22c5d53575..620acbb117b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2011-05-25 H.J. Lu + + 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 * 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 801573c1e98..1cdbe7e430b 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 8a89f70c333..1471f5a2282 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" -- 2.30.2