Patchwork [ARM] Set attribute predicable

login
register
mail settings
Submitter Greta Yorsh
Date Feb. 14, 2013, 1:53 p.m.
Message ID <000d01ce0aba$bb75afd0$32610f70$@yorsh@arm.com>
Download mbox | patch
Permalink /patch/220447/
State New
Headers show

Comments

Greta Yorsh - Feb. 14, 2013, 1:53 p.m.
This patch sets attribute "predicable" to "yes" for patterns that handle add
with carry and already use %? in their output statements.

Ok for trunk?
Thanks,
Greta

gcc/

2013-02-14  Greta Yorsh  <Greta.Yorsh@arm.com>

	* config/arm/arm.md (addsi3_carryin_<optab>): Set attribute
	"predicable" to yes.
	(addsi3_carryin_alt2_<optab>,addsi3_carryin_shift_<optab>):
Likewise.
Richard Earnshaw - Feb. 14, 2013, 3:57 p.m.
On 14/02/13 13:53, Greta Yorsh wrote:
> This patch sets attribute "predicable" to "yes" for patterns that handle add
> with carry and already use %? in their output statements.
>
> Ok for trunk?
> Thanks,
> Greta
>
> gcc/
>
> 2013-02-14  Greta Yorsh  <Greta.Yorsh@arm.com>
>
> 	* config/arm/arm.md (addsi3_carryin_<optab>): Set attribute
> 	"predicable" to yes.
> 	(addsi3_carryin_alt2_<optab>,addsi3_carryin_shift_<optab>):
> Likewise.
>
>

OK when stage1 opens.

R.

Patch

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 1cb1515b1fa57c6052b68eb8701616c1b80e7416..35294dd6560ac63279d95eca6cf774257e06bd93 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -974,7 +974,8 @@  (define_insn "*addsi3_carryin_<optab>"
   "@
    adc%?\\t%0, %1, %2
    sbc%?\\t%0, %1, #%B2"
-  [(set_attr "conds" "use")]
+  [(set_attr "conds" "use")
+   (set_attr "predicable" "yes")]
 )
 
 (define_insn "*addsi3_carryin_alt2_<optab>"
@@ -986,7 +987,8 @@  (define_insn "*addsi3_carryin_alt2_<opta
   "@
    adc%?\\t%0, %1, %2
    sbc%?\\t%0, %1, #%B2"
-  [(set_attr "conds" "use")]
+  [(set_attr "conds" "use")
+   (set_attr "predicable" "yes")]
 )
 
 (define_insn "*addsi3_carryin_shift_<optab>"
@@ -1000,6 +1002,7 @@  (define_insn "*addsi3_carryin_shift_<opt
   "TARGET_32BIT"
   "adc%?\\t%0, %1, %3%S2"
   [(set_attr "conds" "use")
+   (set_attr "predicable" "yes")
    (set (attr "type") (if_then_else (match_operand 4 "const_int_operand" "")
 		      (const_string "alu_shift")
 		      (const_string "alu_shift_reg")))]