diff mbox series

[i386] : Handle potential partial reg stall in *andqi_2_maybe_si

Message ID CAFULd4Z9T+72RBO4ZOGUE9nn3g-9csvUNP0U3YjnauBifXVwAw@mail.gmail.com
State New
Headers show
Series [i386] : Handle potential partial reg stall in *andqi_2_maybe_si | expand

Commit Message

Uros Bizjak July 17, 2019, 2:38 p.m. UTC
2019-07-17  Uroš Bizjak  <ubizjak@gmail.com>

    * config/i386/i386.md (*andqi_2_maybe_si): Handle potential
    partial reg stall on alternative 2.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Committed to mainline SVN.

Uros.
diff mbox series

Patch

Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md	(revision 273534)
+++ config/i386/i386.md	(working copy)
@@ -8689,7 +8689,7 @@ 
 		  (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,
@@ -8705,7 +8705,12 @@ 
   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)