Patchwork [ARM] Define predicable attribute for arm_abssi2 and arm_neg_abssi2

login
register
mail settings
Submitter Kyrylo Tkachov
Date Nov. 19, 2012, 5:51 p.m.
Message ID <00ab01cdc67e$72294a60$567bdf20$@tkachov@arm.com>
Download mbox | patch
Permalink /patch/200054/
State New
Headers show

Comments

Kyrylo Tkachov - Nov. 19, 2012, 5:51 p.m.
Hi all,
This patch updates the arm_abssi2 and arm_neg_abssi2 patterns in the ARM
machine description.
We define the predicable attribute based on the alternative. When the
patterns were introduced it was not possible to do that.
Now the second alternative in each of the patterns that supports predication
is defined as predicable.

No regressions on arm-none-eabi with qemu.

Ok for trunk?

Thanks,
Kyrill


gcc/ChangeLog

2012-11-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.md (*arm_abssi2): Define predicable attribute.
	(*arm_neg_abssi2): Define predicable attribute.
Ramana Radhakrishnan - Nov. 19, 2012, 6:04 p.m.
On 11/19/12 17:51, Kyrylo Tkachov wrote:
> Hi all,
> This patch updates the arm_abssi2 and arm_neg_abssi2 patterns in the ARM
> machine description.
> We define the predicable attribute based on the alternative. When the
> patterns were introduced it was not possible to do that.
> Now the second alternative in each of the patterns that supports predication
> is defined as predicable.
>
> No regressions on arm-none-eabi with qemu.
>
> Ok for trunk?

Ok, please apply.

Ramana
Richard Earnshaw - Nov. 20, 2012, 9:17 a.m.
On 19/11/12 17:51, Kyrylo Tkachov wrote:
> Hi all,
> This patch updates the arm_abssi2 and arm_neg_abssi2 patterns in the ARM
> machine description.
> We define the predicable attribute based on the alternative. When the
> patterns were introduced it was not possible to do that.
> Now the second alternative in each of the patterns that supports predication
> is defined as predicable.
>
> No regressions on arm-none-eabi with qemu.
>
> Ok for trunk?
>
> Thanks,
> Kyrill
>
>
> gcc/ChangeLog
>
> 2012-11-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>
> 	* config/arm/arm.md (*arm_abssi2): Define predicable attribute.
> 	(*arm_neg_abssi2): Define predicable attribute.
>
>

There are equivalent patterns in thumb2.md as well.  Could you fix those 
too, please.

R.

> abssi_predicable.txt
>
>
> --- a/gcc/config/arm/arm.md
> +++ b/gcc/config/arm/arm.md
> @@ -4263,7 +4263,7 @@ (define_insn "*arm_abssi2"
>      eor%?\\t%0, %1, %1, asr #31\;sub%?\\t%0, %0, %1, asr #31"
>     [(set_attr "conds" "clob,*")
>      (set_attr "shift" "1")
> -   ;; predicable can't be set based on the variant, so left as no
> +   (set_attr "predicable" "no, yes")
>      (set_attr "length" "8")]
>   )
>
> @@ -4291,7 +4291,7 @@ (define_insn "*arm_neg_abssi2"
>      eor%?\\t%0, %1, %1, asr #31\;rsb%?\\t%0, %0, %1, asr #31"
>     [(set_attr "conds" "clob,*")
>      (set_attr "shift" "1")
> -   ;; predicable can't be set based on the variant, so left as no
> +   (set_attr "predicable" "no, yes")
>      (set_attr "length" "8")]
>   )
>
>

Patch

--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -4263,7 +4263,7 @@  (define_insn "*arm_abssi2"
    eor%?\\t%0, %1, %1, asr #31\;sub%?\\t%0, %0, %1, asr #31"
   [(set_attr "conds" "clob,*")
    (set_attr "shift" "1")
-   ;; predicable can't be set based on the variant, so left as no
+   (set_attr "predicable" "no, yes")
    (set_attr "length" "8")]
 )
 
@@ -4291,7 +4291,7 @@  (define_insn "*arm_neg_abssi2"
    eor%?\\t%0, %1, %1, asr #31\;rsb%?\\t%0, %0, %1, asr #31"
   [(set_attr "conds" "clob,*")
    (set_attr "shift" "1")
-   ;; predicable can't be set based on the variant, so left as no
+   (set_attr "predicable" "no, yes")
    (set_attr "length" "8")]
 )