public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] i386: Make flags_reg_operand a special predicate
@ 2023-11-07 18:36 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2023-11-07 18:36 UTC (permalink / raw)
  To: gcc-patches

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

There is no need to check the mode in flags_reg_operand predicate. The
mode in flags setting instructions is checked with ix86_match_ccmode.

The patch avoids "warning: operand X missing mode?" warnings with
VOIDmode flags_reg_operand predicate.

gcc/ChangeLog:

    * config/i386/predicates.md ("flags_reg_operand"):
    Make predicate special to avoid automatic mode checks.

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

Uros.

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

diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index a63b8cd7be5..b5a86257c9e 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -88,7 +88,7 @@ (define_predicate "ax_reg_operand"
        (match_test "REGNO (op) == AX_REG")))
 
 ;; Return true if op is the flags register.
-(define_predicate "flags_reg_operand"
+(define_special_predicate "flags_reg_operand"
   (and (match_code "reg")
        (match_test "REGNO (op) == FLAGS_REG")))
 

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

only message in thread, other threads:[~2023-11-07 18:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-07 18:36 [committed] i386: Make flags_reg_operand a special predicate 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).