Commit 4bc72f35 by Kyrylo Tkachov Committed by Kyrylo Tkachov

[AArch64] Simplify ashl<mode>3 expander for SHORT modes

	* config/aarch64/aarch64.md (ashl<mode>3, SHORT modes):
	Use const_int_operand for operand 2 predicate.  Simplify expand code
	as a result.

From-SVN: r236812
parent 0561bcfb
2016-05-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.md (ashl<mode>3, SHORT modes):
Use const_int_operand for operand 2 predicate. Simplify expand code
as a result.
2016-05-27 Ilya Enkovich <ilya.enkovich@intel.com> 2016-05-27 Ilya Enkovich <ilya.enkovich@intel.com>
PR middle-end/71279 PR middle-end/71279
......
...@@ -3880,22 +3880,16 @@ ...@@ -3880,22 +3880,16 @@
(define_expand "ashl<mode>3" (define_expand "ashl<mode>3"
[(set (match_operand:SHORT 0 "register_operand") [(set (match_operand:SHORT 0 "register_operand")
(ashift:SHORT (match_operand:SHORT 1 "register_operand") (ashift:SHORT (match_operand:SHORT 1 "register_operand")
(match_operand:QI 2 "nonmemory_operand")))] (match_operand:QI 2 "const_int_operand")))]
"" ""
{ {
if (CONST_INT_P (operands[2])) operands[2] = GEN_INT (INTVAL (operands[2]) & GET_MODE_MASK (<MODE>mode));
{
operands[2] = GEN_INT (INTVAL (operands[2])
& (GET_MODE_BITSIZE (<MODE>mode) - 1));
if (operands[2] == const0_rtx) if (operands[2] == const0_rtx)
{ {
emit_insn (gen_mov<mode> (operands[0], operands[1])); emit_insn (gen_mov<mode> (operands[0], operands[1]));
DONE; DONE;
}
} }
else
FAIL;
} }
) )
......
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