diff mbox

[RS6000] Correct constraints for ior<mode>_mask

Message ID 20150827130246.GF24814@bubble.grove.modra.org
State New
Headers show

Commit Message

Alan Modra Aug. 27, 2015, 1:02 p.m. UTC
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.

Comments

David Edelsohn Aug. 27, 2015, 1:23 p.m. UTC | #1
On Thu, Aug 27, 2015 at 9:02 AM, Alan Modra <amodra@gmail.com> wrote:
> 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.

Okay.

Thanks, David
diff mbox

Patch

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)