Commit df45c0cc by Kyrylo Tkachov Committed by Kyrylo Tkachov

arm.md (arm_shiftsi3): New alternative l/l/M.

[gcc/]

	* config/arm/arm.md (arm_shiftsi3): New alternative l/l/M.


[gcc/testsuite]	

	* gcc.target/arm/thumb-ifcvt-2.c: New test.

From-SVN: r202493
parent 80ab0b19
2013-09-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.md (arm_shiftsi3): New alternative l/l/M.
2013-09-11 Richard Biener <rguenther@suse.de> 2013-09-11 Richard Biener <rguenther@suse.de>
* tree-data-ref.c (dump_rdg_vertex, debug_rdg_vertex, * tree-data-ref.c (dump_rdg_vertex, debug_rdg_vertex,
......
...@@ -4169,18 +4169,18 @@ ...@@ -4169,18 +4169,18 @@
) )
(define_insn "*arm_shiftsi3" (define_insn "*arm_shiftsi3"
[(set (match_operand:SI 0 "s_register_operand" "=l,r,r") [(set (match_operand:SI 0 "s_register_operand" "=l,l,r,r")
(match_operator:SI 3 "shift_operator" (match_operator:SI 3 "shift_operator"
[(match_operand:SI 1 "s_register_operand" "0,r,r") [(match_operand:SI 1 "s_register_operand" "0,l,r,r")
(match_operand:SI 2 "reg_or_int_operand" "l,M,r")]))] (match_operand:SI 2 "reg_or_int_operand" "l,M,M,r")]))]
"TARGET_32BIT" "TARGET_32BIT"
"* return arm_output_shift(operands, 0);" "* return arm_output_shift(operands, 0);"
[(set_attr "predicable" "yes") [(set_attr "predicable" "yes")
(set_attr "arch" "t2,*,*") (set_attr "arch" "t2,t2,*,*")
(set_attr "predicable_short_it" "yes,no,no") (set_attr "predicable_short_it" "yes,yes,no,no")
(set_attr "length" "4") (set_attr "length" "4")
(set_attr "shift" "1") (set_attr "shift" "1")
(set_attr "type" "alu_shift_reg,alu_shift_imm,alu_shift_reg")] (set_attr "type" "alu_shift_reg,alu_shift_imm,alu_shift_imm,alu_shift_reg")]
) )
(define_insn "*shiftsi3_compare" (define_insn "*shiftsi3_compare"
......
2013-09-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.target/arm/thumb-ifcvt-2.c: New test.
2013-09-10 Jeff Law <law@redhat.com> 2013-09-10 Jeff Law <law@redhat.com>
* g++.dg/torture/pr58380.C: New test. * g++.dg/torture/pr58380.C: New test.
......
/* Check that Thumb 16-bit shifts by immediate can be if-converted. */
/* { dg-do compile } */
/* { dg-require-effective-target arm_thumb2_ok } */
/* { dg-options "-O2 -mthumb" } */
int
foo (int a, int b)
{
if (a != b)
a = a << 1;
else
a = a >> 1;
return a + b;
}
/* { dg-final { scan-assembler "lslne" } } */
/* { dg-final { scan-assembler "asreq" } } */
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