public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, i386]: Handle potential partial reg stall in *andqi_2_maybe_si
@ 2019-07-17 15:06 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2019-07-17 15:06 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]

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.

[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 1010 bytes --]

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-17 14:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17 15:06 [PATCH, i386]: Handle potential partial reg stall in *andqi_2_maybe_si Uros Bizjak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).