From: Uros Bizjak Date: Tue, 7 Nov 2023 18:32:14 +0000 (+0100) Subject: i386: Make flags_reg_operand a special predicate X-Git-Tag: basepoints/gcc-15~4911 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fadf10e91872fc09298933e2a74a025966b58a80;p=thirdparty%2Fgcc.git i386: Make flags_reg_operand a special predicate 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. --- diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index a63b8cd7be50..b5a86257c9ed 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -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")))