ANDN is non-destructive, so use "r" instead of "0" for its operand 1 constraint.

2022-07-01  Uroš Bizjak  <ubiz...@gmail.com>

gcc/ChangeLog:

    * config/i386/i386.md (*andn<mode>3_doubleword_bmi):
    Use "r" constraint for operand 1.

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

Pushed to master.

Uros.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 352a21c585c..20c3b9a4122 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -10407,7 +10407,7 @@ (define_split
 (define_insn_and_split "*andn<mode>3_doubleword_bmi"
   [(set (match_operand:<DWI> 0 "register_operand" "=r")
        (and:<DWI>
-         (not:<DWI> (match_operand:<DWI> 1 "register_operand" "0"))
+         (not:<DWI> (match_operand:<DWI> 1 "register_operand" "r"))
          (match_operand:<DWI> 2 "nonimmediate_operand" "ro")))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_BMI"

Reply via email to