ior<mode>_mask always splits to rtl matching rotl<mode>3_insert.  The
latter requires one of its input operands match the output, so let
reload/lra know the equivalent operand match must also occur for
ior<mode>_mask.

Bootstrapped and regression tested powerpc64le-linux.  OK to apply?

        PR target/67356
        * config/rs6000/rs6000.md (ior<mode>_mask): Use constraint "0"
        for operand 1.

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 167e138..d6278a9 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -3651,7 +3651,7 @@
 ; an insert instruction, in many cases.
 (define_insn_and_split "*ior<mode>_mask"
   [(set (match_operand:GPR 0 "gpc_reg_operand" "=r")
-       (ior:GPR (match_operand:GPR 1 "gpc_reg_operand" "r")
+       (ior:GPR (match_operand:GPR 1 "gpc_reg_operand" "0")
                 (match_operand:GPR 2 "const_int_operand" "n")))
    (clobber (match_scratch:GPR 3 "=r"))]
   "!logical_const_operand (operands[2], <MODE>mode)

-- 
Alan Modra
Australia Development Lab, IBM

Reply via email to