Commit 2d590ab0 by Segher Boessenkool Committed by Segher Boessenkool

re PR target/66217 (PowerPC rotate/shift/mask instructions not optimal)

	PR target/66217
	PR target/67045
	* config/rs6000/rs6000.md (and<mode>3): Put a CONST_INT_P check
	around those cases that need one.

From-SVN: r226378
parent dfe8fbc2
2015-07-29 Segher Boessenkool <segher@kernel.crashing.org>
PR target/66217
PR target/67045
* config/rs6000/rs6000.md (and<mode>3): Put a CONST_INT_P check
around those cases that need one.
2015-07-29 Aditya Kumar <hiraditya@msn.com> 2015-07-29 Aditya Kumar <hiraditya@msn.com>
* params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Default to 3. * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Default to 3.
......
...@@ -2898,26 +2898,29 @@ ...@@ -2898,26 +2898,29 @@
DONE; DONE;
} }
if (rs6000_is_valid_and_mask (operands[2], <MODE>mode)) if (CONST_INT_P (operands[2]))
{ {
emit_insn (gen_and<mode>3_mask (operands[0], operands[1], operands[2])); if (rs6000_is_valid_and_mask (operands[2], <MODE>mode))
DONE; {
} emit_insn (gen_and<mode>3_mask (operands[0], operands[1], operands[2]));
DONE;
}
if (logical_const_operand (operands[2], <MODE>mode) if (logical_const_operand (operands[2], <MODE>mode)
&& rs6000_gen_cell_microcode) && rs6000_gen_cell_microcode)
{ {
emit_insn (gen_and<mode>3_imm (operands[0], operands[1], operands[2])); emit_insn (gen_and<mode>3_imm (operands[0], operands[1], operands[2]));
DONE; DONE;
} }
if (rs6000_is_valid_2insn_and (operands[2], <MODE>mode)) if (rs6000_is_valid_2insn_and (operands[2], <MODE>mode))
{ {
rs6000_emit_2insn_and (<MODE>mode, operands, true, 0); rs6000_emit_2insn_and (<MODE>mode, operands, true, 0);
DONE; DONE;
} }
operands[2] = force_reg (<MODE>mode, operands[2]); operands[2] = force_reg (<MODE>mode, 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