arm.md (minmax_arithsi_non_canon): Emit canonical RTL form when subtracting a constant.

2013-08-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.md (minmax_arithsi_non_canon): Emit canonical RTL form
	when subtracting a constant.

From-SVN: r201412
This commit is contained in:
Kyrylo Tkachov 2013-08-01 15:02:19 +00:00 committed by Kyrylo Tkachov
parent c743b24643
commit ce852f9c3a
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2013-08-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.md (minmax_arithsi_non_canon): Emit canonical RTL form
when subtracting a constant.
2013-08-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.md (peepholes for eq (reg1) (reg2/imm)):

View File

@ -3717,8 +3717,7 @@
(match_dup 2))))
(cond_exec (match_op_dup 5 [(reg:CC CC_REGNUM) (const_int 0)])
(set (match_dup 0)
(minus:SI (match_dup 1)
(match_dup 3))))]
(match_dup 6)))]
{
enum machine_mode mode = SELECT_CC_MODE (GET_CODE (operands[1]),
operands[2], operands[3]);
@ -3731,6 +3730,10 @@
else
rc = reverse_condition (rc);
operands[5] = gen_rtx_fmt_ee (rc, SImode, operands[2], operands[3]);
if (CONST_INT_P (operands[3]))
operands[6] = plus_constant (SImode, operands[1], -INTVAL (operands[3]));
else
operands[6] = gen_rtx_MINUS (SImode, operands[1], operands[3]);
}
[(set_attr "conds" "clob")
(set (attr "length")