]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Make flags_reg_operand a special predicate
authorUros Bizjak <ubizjak@gmail.com>
Tue, 7 Nov 2023 18:32:14 +0000 (19:32 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Tue, 7 Nov 2023 18:33:26 +0000 (19:33 +0100)
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.

gcc/config/i386/predicates.md

index a63b8cd7be50f09b3d0c64fc072ef8bb8eace0b6..b5a86257c9ed87cd7328b33b4af8d2689f18ef95 100644 (file)
@@ -88,7 +88,7 @@
        (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")))