[ARM] Define predicable attribute for arm_abssi2 and arm_neg_abssi2

Submitted by Kyrylo Tkachov on Nov. 19, 2012, 5:51 p.m.

Details

Message ID 00ab01cdc67e$72294a60$567bdf20$@tkachov@arm.com
State New
Headers show

Commit Message

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.

Comments

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 hide | download patch | download mbox

--- 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")]
 )