i386.md (*andqi_2_maybe_si): Handle potential partial reg stall on alternative 2.
authorUros Bizjak <ubizjak@gmail.com>
Wed, 17 Jul 2019 14:33:53 +0000 (16:33 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 17 Jul 2019 14:33:53 +0000 (16:33 +0200)
* config/i386/i386.md (*andqi_2_maybe_si): Handle potential
partial reg stall on alternative 2.

From-SVN: r273551

gcc/ChangeLog
gcc/config/i386/i386.md

index f13d8a6a9a4016a27a46f90cf843e9265f6c2ac9..5c69a63c18a6a097126a8ac23eb9d054a25f6418 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-17  Uroš Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (*andqi_2_maybe_si): Handle potential
+       partial reg stall on alternative 2.
+
 2019-07-17  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/91178
index eb32d7c1d2a5bb537cee44889f04a24af1b9d175..47e36d442f2ebf0119d866366ff8c15cb22722bb 100644 (file)
                  (match_operand:QI 1 "nonimmediate_operand" "%0,0,0")
                  (match_operand:QI 2 "general_operand" "qmn,qn,n"))
                 (const_int 0)))
-   (set (match_operand:QI 0 "nonimmediate_operand" "=q,qm,*r")
+   (set (match_operand:QI 0 "nonimmediate_operand" "=q,qm,r")
        (and:QI (match_dup 1) (match_dup 2)))]
   "ix86_binary_operator_ok (AND, QImode, operands)
    && ix86_match_ccmode (insn,
   return "and{b}\t{%2, %0|%0, %2}";
 }
   [(set_attr "type" "alu")
-   (set_attr "mode" "QI,QI,SI")])
+   (set_attr "mode" "QI,QI,SI")
+   ;; Potential partial reg stall on alternative 2.
+   (set (attr "preferred_for_speed")
+     (cond [(eq_attr "alternative" "2")
+             (symbol_ref "!TARGET_PARTIAL_REG_STALL")]
+          (symbol_ref "true")))])
 
 (define_insn "*and<mode>_2"
   [(set (reg FLAGS_REG)