arm: vp9itxfm: Avoid .irp when it doesn't save any lines

Message ID 1486244257-17156-1-git-send-email-martin@martin.st
State Committed
Commit 3bc5b28d5a191864c54bba60646933a63da31656
Headers show

Commit Message

Martin Storsjö Feb. 4, 2017, 9:37 p.m.
This makes it more readable.
---
This was suggested by Janne in a review of a patch that added a
modified copy of this function; similar code already exists as well.
---
 libavcodec/arm/vp9itxfm_neon.S | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Comments

Janne Grunau Feb. 5, 2017, 9:39 a.m. | #1
On 2017-02-04 23:37:37 +0200, Martin Storsjö wrote:
> This makes it more readable.
> ---
> This was suggested by Janne in a review of a patch that added a
> modified copy of this function; similar code already exists as well.
> ---
>  libavcodec/arm/vp9itxfm_neon.S | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/libavcodec/arm/vp9itxfm_neon.S b/libavcodec/arm/vp9itxfm_neon.S
> index 5abe435..49b993f 100644
> --- a/libavcodec/arm/vp9itxfm_neon.S
> +++ b/libavcodec/arm/vp9itxfm_neon.S
> @@ -690,21 +690,21 @@ function \txfm\()16_1d_4x16_pass1_neon
>          @ for the first slice of the second pass (where it is the
>          @ last 4x4 block).
>          add             r0,  r0,  #8
> -.irp i, 20, 24, 28
> -        vst1.16         {d\i}, [r0,:64]!
> -.endr
> +        vst1.16         {d20}, [r0,:64]!
> +        vst1.16         {d24}, [r0,:64]!
> +        vst1.16         {d28}, [r0,:64]!
>          add             r0,  r0,  #8
> -.irp i, 21, 25, 29
> -        vst1.16         {d\i}, [r0,:64]!
> -.endr
> +        vst1.16         {d21}, [r0,:64]!
> +        vst1.16         {d25}, [r0,:64]!
> +        vst1.16         {d29}, [r0,:64]!
>          add             r0,  r0,  #8
> -.irp i, 22, 26, 30
> -        vst1.16         {d\i}, [r0,:64]!
> -.endr
> +        vst1.16         {d22}, [r0,:64]!
> +        vst1.16         {d26}, [r0,:64]!
> +        vst1.16         {d30}, [r0,:64]!
>          add             r0,  r0,  #8
> -.irp i, 23, 27, 31
> -        vst1.16         {d\i}, [r0,:64]!
> -.endr
> +        vst1.16         {d23}, [r0,:64]!
> +        vst1.16         {d27}, [r0,:64]!
> +        vst1.16         {d31}, [r0,:64]!
>          vmov            d28, d16
>          vmov            d29, d17
>          vmov            d30, d18

ok

Janne

Patch

diff --git a/libavcodec/arm/vp9itxfm_neon.S b/libavcodec/arm/vp9itxfm_neon.S
index 5abe435..49b993f 100644
--- a/libavcodec/arm/vp9itxfm_neon.S
+++ b/libavcodec/arm/vp9itxfm_neon.S
@@ -690,21 +690,21 @@  function \txfm\()16_1d_4x16_pass1_neon
         @ for the first slice of the second pass (where it is the
         @ last 4x4 block).
         add             r0,  r0,  #8
-.irp i, 20, 24, 28
-        vst1.16         {d\i}, [r0,:64]!
-.endr
+        vst1.16         {d20}, [r0,:64]!
+        vst1.16         {d24}, [r0,:64]!
+        vst1.16         {d28}, [r0,:64]!
         add             r0,  r0,  #8
-.irp i, 21, 25, 29
-        vst1.16         {d\i}, [r0,:64]!
-.endr
+        vst1.16         {d21}, [r0,:64]!
+        vst1.16         {d25}, [r0,:64]!
+        vst1.16         {d29}, [r0,:64]!
         add             r0,  r0,  #8
-.irp i, 22, 26, 30
-        vst1.16         {d\i}, [r0,:64]!
-.endr
+        vst1.16         {d22}, [r0,:64]!
+        vst1.16         {d26}, [r0,:64]!
+        vst1.16         {d30}, [r0,:64]!
         add             r0,  r0,  #8
-.irp i, 23, 27, 31
-        vst1.16         {d\i}, [r0,:64]!
-.endr
+        vst1.16         {d23}, [r0,:64]!
+        vst1.16         {d27}, [r0,:64]!
+        vst1.16         {d31}, [r0,:64]!
         vmov            d28, d16
         vmov            d29, d17
         vmov            d30, d18