Commit f14e0109 by Segher Boessenkool Committed by Segher Boessenkool

rs6000: Fix PR67346

"*ior<mode>_mask" is a define_insn_and_split, so it shouldn't use
can_create_pseudo in its instruction condition, because IRA can then
create such an instruction, and the condition becomes false before
the insn is split.  Use a scratch instead.


2015-08-25  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/67346
	* config/rs6000/rs6000.md (*ior<mode>_mask): Use a match_scratch.

From-SVN: r227183
parent b733687e
2015-08-25 Segher Boessenkool <segher@kernel.crashing.org>
PR target/67346
* config/rs6000/rs6000.md (*ior<mode>_mask): Use a match_scratch.
2015-08-25 Segher Boessenkool <segher@kernel.crashing.org>
PR target/67344
* config/rs6000/rs6000.md (*and<mode>3_imm_dot_shifted): Change to
a define_insn, remove second alternative.
......
......@@ -3652,9 +3652,9 @@
(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")
(match_operand:GPR 2 "const_int_operand" "n")))]
"can_create_pseudo_p ()
&& !logical_const_operand (operands[2], <MODE>mode)
(match_operand:GPR 2 "const_int_operand" "n")))
(clobber (match_scratch:GPR 3 "=r"))]
"!logical_const_operand (operands[2], <MODE>mode)
&& rs6000_is_valid_mask (operands[2], NULL, NULL, <MODE>mode)"
"#"
"&& 1"
......@@ -3669,7 +3669,8 @@
{
int nb, ne;
rs6000_is_valid_mask (operands[2], &nb, &ne, <MODE>mode);
operands[3] = gen_reg_rtx (<MODE>mode);
if (GET_CODE (operands[3]) == SCRATCH)
operands[3] = gen_reg_rtx (<MODE>mode);
operands[4] = GEN_INT (ne);
operands[5] = GEN_INT (~UINTVAL (operands[2]));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment